Skip to content
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

add android id in the hf manifest #1328

Merged
merged 10 commits into from
Aug 6, 2024
Merged

add android id in the hf manifest #1328

merged 10 commits into from
Aug 6, 2024

Conversation

alak
Copy link
Contributor

@alak alak commented Jul 5, 2024

No description provided.

@alak alak requested a review from nsarrazin July 5, 2024 11:29
@nsarrazin
Copy link
Collaborator

Screenshot from 2024-07-05 14-22-46

Added a small button that shows up when beforeinstallprompt fires, you can close it with the X, and if you click on it elsewhere it should trigger the native app install prompt flow

kinda hard to test the android flow locally tbh, any clue on how to do that?

I can make the button show up by running this in the devtools console of my browser

event = new Event('beforeinstallprompt')
window.dispatchEvent(event)

but the native install flow doesn't work afterwards

@gary149
Copy link
Collaborator

gary149 commented Jul 9, 2024

This seems complicated and not sure it will work very well. let's just use the user agent to detect if the user is on android and display a dismissable banner on top of the app if it is the case imo.

edit with a design like this:

image image

@nsarrazin
Copy link
Collaborator

here it is dark/light with portrait & landscape

Screenshot from 2024-07-11 14-44-56 Screenshot from 2024-07-11 14-45-45

we use the following logic to display it

  • is hugging chat
  • is android user agent
  • is not android app user agent
  • modalLastSeen is not defined OR it's been >72 hours (date stored in localStorage)

@nsarrazin nsarrazin added enhancement New feature or request front This issue is related to the front-end of the app. huggingchat For issues related to HuggingChat specifically labels Jul 12, 2024
src/routes/+layout.svelte Outdated Show resolved Hide resolved
Copy link
Collaborator

@gary149 gary149 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Appart from my little comment on showing it every time I think we can merge.

@alak
Copy link
Contributor Author

alak commented Aug 6, 2024

lgtm

@nsarrazin nsarrazin merged commit 9b5f4b3 into main Aug 6, 2024
4 checks passed
@nsarrazin nsarrazin deleted the add-android-manifest branch August 6, 2024 09:57
ice91 pushed a commit to ice91/chat-ui that referenced this pull request Oct 30, 2024
* add android id in the hf manifest

* Add simple button

* Add extra icon sizes

* fix typo

* updated android modal

* revert unneeded changes to declarations

* debug timer

* show modal everytime

---------

Co-authored-by: Kevin CATHALY <[email protected]>
Co-authored-by: Nathan Sarrazin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request front This issue is related to the front-end of the app. huggingchat For issues related to HuggingChat specifically
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants