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

Load initial data for grants and hide dark mode toggle #39

Merged
merged 13 commits into from
Feb 26, 2024

Conversation

Pabl0cks
Copy link
Member

@Pabl0cks Pabl0cks commented Feb 22, 2024

Load initial data for grants, grabbing the final projects completed from Batches 0 and 1.

Data questions:

Not related but also hided the dark mode toggle button until we implement dark mode.

Closes #29
Closes #30

Copy link

vercel bot commented Feb 22, 2024

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

Name Status Preview Comments Updated (UTC)
grants-bg ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 26, 2024 10:39am

@technophile-04
Copy link
Member

Hey Pablo, could you also please update :

<ThemeProvider enableSystem>

to <ThemeProvider enableSystem={false} defaultTheme="light">

Because if not, it will launch the website in dark mode if the users system theme is dark, lol sorry of commenting while the PR is in draft, just came to my mind and I didn't wanted to forget it 🙌

@Pabl0cks
Copy link
Member Author

Because if not, it will launch the website in dark mode if the users system theme is dark, lol sorry of commenting while the PR is in draft, just came to my mind and I didn't wanted to forget it 🙌

TYSM Shiv!! I'd probably missed that one, because it was loading on Light to me after testing other branch 🙌

@Pabl0cks Pabl0cks marked this pull request as ready for review February 23, 2024 00:39
Copy link
Contributor

@carletex carletex left a comment

Choose a reason for hiding this comment

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

Thanks @Pabl0cks !

Left a few comments and open questions!

@carletex
Copy link
Contributor

Batch 1 haven't received grant yet, right? I can mark them as "status": "approved" for now.

Yes! Let's do this (so we have data for WIP grants)

@Pabl0cks
Copy link
Member Author

Pabl0cks commented Feb 23, 2024

@technophile-04 going back for a bit to the dark mode disabling, for some reason in my laptop I had localstorage "theme" set as "dark" (first time loading grants, and OS set to light), and it wouldn't change to "light" refreshing.

Doing some tests:

  • If I use forcedTheme="light" works for me.
  • If I delete the localstorage key it gets added again with "system" value, and it shows the theme from my OS, even if I have enableSystem={false}.
    In that case if I use forcedTheme it ignores my system and sets that theme (even if localstorage stays as system)

Should we temporary use forcedTheme="light" to prevent cases like this, until we implement "dark" mode and set everything back to normal? Or should we dig more into this issue.

TYSM

@technophile-04
Copy link
Member

If I use forcedTheme="light" works for me.

Ohh yes !! This makes sense , Lets do it for now until we have proper dark theme, Tsym 🙌

To prevent any edge case loading dark mode and not being able to switch to light
@Pabl0cks
Copy link
Member Author

Ohh yes !! This makes sense , Lets do it for now until we have proper dark theme, Tsym 🙌

Ok great! Pushed this change.

Yes! Let's do this (so we have data for WIP grants)

Done!

Thanks @Pabl0cks !

Left a few comments and open questions!

TYSM for the review! Just pushed the changes to fix the comments, hope I didn't miss any! 🙌

@carletex
Copy link
Contributor

carletex commented Feb 26, 2024

Thanks all!

Made some tweaks before merging:

df5db68

  • Grants can't have a link + status = approved. If they have a link it means that they already submitted the grant (submitted) or the admin has already approved/rejected.
  • Changed the amount to 0.25 which is the grant amount for the batches
  • Marked them as completed (yesterday we sent the grant)

(Feel free to tweak for local testing)

f003c09

  • When you request a grant, no link is needed (only when submitting the result)
  • Make the "link" optional (it will be empty until the builder submits the result)

90538e8

  • I prefer the option to have fresh firestore IDS, so add an option to the seed script (since we'll be importing to the live database at some point: only the "grants" collection)

@carletex carletex merged commit ee67250 into main Feb 26, 2024
2 of 3 checks passed
@Pabl0cks Pabl0cks deleted the grants-dataload branch February 26, 2024 23:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants