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

dark mode toggle, modularization into Svelte components, filter "and/or" mode #295

Merged
merged 12 commits into from
Jul 25, 2023

Conversation

dmlb
Copy link
Contributor

@dmlb dmlb commented Jul 11, 2023

Describe your changes

  • create component for dark mode toggle logic
    • update tailwind dark mode config to be class-based
    • check os settings when initializing and save user selection in local storage
    • toggle classes for dark mode
    • update tag dark mode CSS to use classes
  • create component button/button links for consistent styles dark/hover/disable
  • create component tag wrapper
  • create component checkbox
  • create component for back to top scroll button (and add to youtube page)
  • create component for resource nav
  • create component for Filter Form
  • move functions into lib/utils
  • move scrolling constants to lib/constants
  • replace items with components in the resource and youtube page
  • update the resources filter to do and/or based on user switch
Screen Shot 2023-07-13 at 8 14 54 PM Screen Shot 2023-07-13 at 8 15 05 PM

Related issue number/link

Dark mode button: #282 (comment)
Refactoring: Contributes to #299 (previously #209)
Filter mode: Fixes #141

dmlb and others added 2 commits July 13, 2023 19:53
- update tailwind darkmode config to be class based
- check os settings when initilizing and save user selection in local storage
- toggle classes for dark mode
- update tag dark mode css to use classes
- componentize button/button links for consistent styles dark/hover/disable
- componentize tag wrapper
- componentize checkbox
- create component for dark mode toggle logic
- create component for back to top scroll button (and add to youtube page)
- create component for resource nav
- create component for Filter Form
- move functions into lib/utils
- move scrolling constants to lib/constants
- update tag wrapper component
- replace forms in resource and youtube page with component
pre-commit-ci bot and others added 3 commits July 14, 2023 02:12
- lower the contrast on the un-selected item
- add label updates for selected item on screen reader
@VeckoTheGecko
Copy link
Collaborator

We use Bootstrap Icons for the icons (I'll update the README in another PR with this info).

Icons ideas:

@VeckoTheGecko
Copy link
Collaborator

Updated icons:
image
image

Copy link
Collaborator

@VeckoTheGecko VeckoTheGecko left a comment

Choose a reason for hiding this comment

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

Thanks @dmlb for this featureset! Great usability progress and welcome features with the filter modes and dark mode toggle.

Still some work to be done with refactoring (namely reducing duplication in filter handlers), but this is a huge step in the right direction. Further refactoring can be done in other PRs.

A couple minor points to address before shipping.

src/lib/components/FilterForm.svelte Show resolved Hide resolved
src/lib/components/FilterForm.svelte Show resolved Hide resolved
tailwind.config.cjs Show resolved Hide resolved
@VeckoTheGecko
Copy link
Collaborator

Any opinions on using TypeScript enums for categorical options in the codebase rather than strings? No need to push any changes re. them (the types <string> | <string> are expressive as is), just curious whether you've encountered them before and whether its something to consider in the codebase in general for some items.

@VeckoTheGecko VeckoTheGecko changed the title add dark mode toggle dark mode toggle, modularization into Svelte components, filter "and/or" mode Jul 22, 2023
@VeckoTheGecko
Copy link
Collaborator

I think that all good now. Let me know if we're good to merge @dmlb and we'll get this shipped

@dmlb
Copy link
Contributor Author

dmlb commented Jul 24, 2023

I think that all good now. Let me know if we're good to merge @dmlb and we'll get this shipped

good to go 👍

@VeckoTheGecko VeckoTheGecko merged commit 0e86224 into ClimateTown:main Jul 25, 2023
2 checks passed
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.

[FEATURE] Add toggle to allow user to search tags with OR logic or AND logic
2 participants