mazipan / tanyaaja.in

❓Kumpulkan pertanyaan secara anonim dari siapa saja dengan mudah
https://tanyaaja.in
MIT License
138 stars 38 forks source link

feat: add account visibility reminder component #51

Closed Namchee closed 1 year ago

Namchee commented 1 year ago

Closes #22

Description

This pull request adds reminder for account visibility settings in account settings page. It will be shown weekly whenever account visibility is not public.

Current Tasks

vercel[bot] commented 1 year ago

Someone is attempting to deploy a commit to a Personal Account owned by @mazipan on Vercel.

@mazipan first needs to authorize it.

mazipan commented 1 year ago

Most visited page for a logged in user is /account, it is like a landing page for a logged in user.

/account/settings on the other hand, have a lower visit numbers.

By using this info, how about we prioritize to showing the reminder on the /account?

Also I am thinking about using https://ui.shadcn.com/docs/components/alert with a dismiss button, what do you think?

Namchee commented 1 year ago

Good idea, I'll show the callout on /account page then and utilize shadcn for that.

Namchee commented 1 year ago

After tidying this up, I think using Toast with infinite duration is better solution than using Alert because:

  1. Toast is dismissable while Alert is not, which is better suited for reminders like this. While you can 'dismiss' alert by adding buttons to it, it is still faster to set Toast with infinite duration instead since it has built-in removal.
  2. Account visibility is not a destructive state, therefore it should 'float' in non-obstructive way, which is a good use-case of Toast. Alert on the other hand is designed to be 'integrated' with the page flow.

This implementation will change if we can integrate the alert somewhere in the content. Do you have a UI design I can follow for this?

vercel[bot] commented 1 year ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
tanyaaja ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 13, 2023 6:42am