Skip to content

Add option for specifying the capture attr on the file input #415

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 20, 2023
Merged

Add option for specifying the capture attr on the file input #415

merged 1 commit into from
Jan 20, 2023

Conversation

carlobeltrame
Copy link
Contributor

@carlobeltrame carlobeltrame commented Jan 14, 2023

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Build-related changes
  • Other, please describe:

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

If yes, please describe the impact and migration path for existing applications:

The PR fulfills these requirements:

  • When resolving a specific issue, it's referenced in the PR's title (e.g. fix #xxx[,#xxx], where "xxx" is the issue number)
  • All tests are passing (there aren't any, but I adapted the mock-data file)

If adding a new feature, the PR's description includes:

  • A convincing reason for adding this feature (to avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it)

Reasoning

On mobile chat apps, it is very common nowadays to send photos which are captured directly in the app. In HTML5, we fortunately have the capture attribute on file inputs, which helps us acheive mostly the same user experience. When activating a file input with the capture attribute set to either true, "user" or "environment", the user gets the option to directly capture an image or video to populate the file input.

Other information:

@carlobeltrame
Copy link
Contributor Author

@antoine92190 any input on this? Ideally I'd need this before the beginning of February, for a yearly event I'm writing the software for. Otherwise I'll have to keep my fork of this project as a git submodule in my project and keep transpiling it myself...

@antoine92190
Copy link
Collaborator

Look good, thanks

@antoine92190 antoine92190 merged commit d35896a into advanced-chat:master Jan 20, 2023
@carlobeltrame carlobeltrame deleted the capture-file branch January 20, 2023 20:50
@carlobeltrame
Copy link
Contributor Author

Thanks a lot for merging. Could you also publish a release? Otherwise I cannot use it (without publishing my own fork)

@antoine92190
Copy link
Collaborator

Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants