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

Prompt Update - UI #372

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

Conversation

Pkcarreno
Copy link
Contributor

Closes #348

This time taking what was done in the previous PR and adding the visual/interaction side of the process.

There are two ways in which the user is "notified" that there is a new update, the first is through buttons on the interface that only appear when an update is available.

Screenshot 2024-06-29 132718
Screenshot 2024-06-30 151856

The second is by making use of the sonner library, showing a toast on the screen.

Screenshot 2024-06-29 132808
Screenshot 2024-06-30 144207
When clicking on the toast the app is immediately updated

In the case of clicking on one of the two buttons in the layout it generates a alert dialog before updating.

Screenshot 2024-06-29 132736

In this version only 2 dependencies were installed:

Also I created a context of the service worker state and placed it in the form of a provider to maintain consistency of the data in the app.

I placed this provider in src/index.tsx, if you don't like the position I gave it you can modify it without problem, the important thing is to keep the <Toaster /> component at the same level or higher than <PromptUpdateProvider />.

And the icon of "refresh" that was added is taken from featherIcon

Only one issue remains, it is ideal to check before updating that the status is "synchronized" or at least force the synchronization of the notes before refreshing the page. I left a comment to manage this, I could not fully understand the synchronization process and how to integrate it yet.

image
The above file is src/components/nav-bar.tsx line 329

What do you think of the UI and implementation? I look forward to any changes or suggestions.

Copy link

netlify bot commented Jun 30, 2024

👷 Deploy request for lumen-notes pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 4e7ed21

Copy link

netlify bot commented Jun 30, 2024

Deploy Preview for lumen-storybook ready!

Name Link
🔨 Latest commit 4e7ed21
🔍 Latest deploy log https://app.netlify.com/sites/lumen-storybook/deploys/6681b50f31a4760008681541
😎 Deploy Preview https://deploy-preview-372--lumen-storybook.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@Pkcarreno Pkcarreno changed the title Update PWA UI Prompt Update - UI Jun 30, 2024
@colebemis
Copy link
Member

Amazing @Pkcarreno 💖 I'll take a look soon!

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.

Indicated when updated version is available
2 participants