WIP: Fixed issue #843 #858
Draft
alvinche
wants to merge 1 commit from
issue-843-active-filter into main
pull from: issue-843-active-filter
merge into: ScottyLabs:main
ScottyLabs:main
ScottyLabs:kennel-no-mapkit-backend
ScottyLabs:eats-kennel
ScottyLabs:Issue#833Fix
ScottyLabs:staging
ScottyLabs:unblocking-search-bar
ScottyLabs:sort-by-rating
ScottyLabs:cirex-web-patch-1
ScottyLabs:copilot/add-user-settings-feature
ScottyLabs:uncorrupted-version
ScottyLabs:raffle_greeting
ScottyLabs:tweaks/mobile-drawer
ScottyLabs:sort-locations-by-distance
ScottyLabs:edit-readme
ScottyLabs:delete
ScottyLabs:remove_collegecart_cards
ScottyLabs:revert-812-feat/collegecart-theme-apr-11-13
ScottyLabs:searchable_menus
ScottyLabs:ui/refactored-mobile-redesign-staged
ScottyLabs:ox-tooling
ScottyLabs:april-fools-2026
ScottyLabs:grubhub_links
ScottyLabs:rating-display
ScottyLabs:sort-by-distance
ScottyLabs:easter-theme
ScottyLabs:map-filter
ScottyLabs:feat/gallo-perm-close
ScottyLabs:feat/miku-day-2026
ScottyLabs:bruh3
ScottyLabs:report-system
ScottyLabs:valentines
ScottyLabs:review_system_promo_banner
ScottyLabs:banner-component
ScottyLabs:card-header-dropdown
ScottyLabs:listpage-offline-alert-fix
ScottyLabs:feat/review-system
ScottyLabs:compact-mode-style-tweaks
ScottyLabs:wrapped-analysis-2025
ScottyLabs:search-bar-query-delay
ScottyLabs:context-refactor-uhh
ScottyLabs:copilot/sub-pr-741
ScottyLabs:copilot/sub-pr-741-again
ScottyLabs:block_periods
ScottyLabs:eatery-card-refactor
ScottyLabs:sponsor_carousel
ScottyLabs:ui/refactored-mobile-redesign
ScottyLabs:google_auth
ScottyLabs:banner-update
ScottyLabs:chore/tiny-refactor
ScottyLabs:style/tweak-pin-and-hide-buttons
ScottyLabs:card-refactor
ScottyLabs:bye_nova_25
ScottyLabs:hide-location
ScottyLabs:add_nova_banner
ScottyLabs:swtich_to_pnpm
ScottyLabs:schatz-menu-link
ScottyLabs:ui/mobile-redesign
ScottyLabs:fix/search-bar
ScottyLabs:increase_form_visibility
ScottyLabs:feat/pinned-cards-on-map
ScottyLabs:feat/banner
ScottyLabs:copilot/fix-13c3c122-a651-43d2-8d62-56ddf22bdcf1
ScottyLabs:copilot/fix-9c1d6fe9-b606-44d1-a5b1-a90f3133e0b9
ScottyLabs:fix/error-reporting-2
ScottyLabs:fix/error-reporting
ScottyLabs:fix/time-sorting
ScottyLabs:fix/weekly-times
ScottyLabs:Readme
ScottyLabs:bruh2
ScottyLabs:chore/update-staging
ScottyLabs:staging-reset
ScottyLabs:fix/404
ScottyLabs:update-footer
ScottyLabs:literally-a-single-line-change-unless-I-reset-wrong
ScottyLabs:fix/copilot-suggestions
ScottyLabs:test/pwa
ScottyLabs:fix/pwa
ScottyLabs:fix/dot-flashing
ScottyLabs:fix/env
ScottyLabs:feature/dynamic-email-contacts
ScottyLabs:Fix-readme
ScottyLabs:star_items_v2
ScottyLabs:quick-fix
ScottyLabs:chore/upd-staging
ScottyLabs:Yuxiang-Huang-patch-2
ScottyLabs:Yuxiang-Huang-patch-1
ScottyLabs:emergency-url-fix
ScottyLabs:tsurbs-patch-1
ScottyLabs:Footer-link
ScottyLabs:Footer-name
ScottyLabs:style/code-cleanup
ScottyLabs:style/times-popup
ScottyLabs:fix/map-color
ScottyLabs:timesdatesbetter-hurebranch2
ScottyLabs:fix/aaaaaaaa
ScottyLabs:bruh
ScottyLabs:fix/a-bit-of-refactoring
ScottyLabs:april-fools
ScottyLabs:time_filter
ScottyLabs:location-filter
ScottyLabs:star_items
ScottyLabs:cmueats_filters_food
ScottyLabs:style/a-bit-of-animation
ScottyLabs:evelyn-branch
ScottyLabs:map-almost-closed-view
ScottyLabs:feedback-form
ScottyLabs:nutrition-details
ScottyLabs:discard
ScottyLabs:hurebranch
ScottyLabs:alex_branch
ScottyLabs:no-merge
ScottyLabs:css-improvements-2
ScottyLabs:railway-test
ScottyLabs:nicolas/fix-ci
ScottyLabs:nettlin/update-email
ScottyLabs:update-mapkit-js-token
ScottyLabs:fix-menus
ScottyLabs:fix-specials
ScottyLabs:nettlin/add-map
ScottyLabs:nettlin/fix-css-syntax
ScottyLabs:modern-react
No reviewers
Labels
Clear labels
bad first issue
bootcamp
Bootcamp Task
bug
Something isn't working
cmueats 2.0
codebase
Codebase or developer experience (DX) improvements
complexity: low
complexity: medium
complexity: nontrivial
dependencies
Pull requests that update a dependency file
design needed
documentation
Improvements or additions to documentation
duplicate
This issue or pull request already exists
enhancement
New feature or request
github_actions
Pull requests that update GitHub Actions code
good first issue
Good for newcomers
help wanted
Extra attention is needed
high priority
important
invalid
This doesn't seem right
javascript
Pull requests that update JavaScript code
low pri
math heavy
outdated
The pull request is outdated and there's a newer pull request for the issue
question
Further information is requested
theory heavy
typescript
Pull requests that update TypeScript code
ui/ux
UI and/or UX improvements
wontfix
This will not be worked on
needs/docs
Must have documentation written
needs/research
Discuss the ideal implementation with the tech lead
needs/upstream
Needs a contribution to an upstream project
type/bug
Something not working as intended
type/external
Lives outside of code
type/feature
New functionality
type/refactor
Improving existing code
urgency
high
This is currently causing issues
urgency
immediate
This is making a project or feature unusable
urgency
low
This can happen whenever
urgency
medium
This is expected to cause issues soon
No labels
bad first issue
bootcamp
bug
cmueats 2.0
codebase
complexity: low
complexity: medium
complexity: nontrivial
dependencies
design needed
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
high priority
important
invalid
javascript
low pri
math heavy
outdated
question
theory heavy
typescript
ui/ux
wontfix
needs/docs
needs/research
needs/upstream
type/bug
type/external
type/feature
type/refactor
urgency
high
urgency
immediate
urgency
low
urgency
medium
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Dependencies
No dependencies set
Reference
ScottyLabs/eats!858
Loading…
Reference in a new issue
No description provided.
Delete branch "issue-843-active-filter"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Passed locationFilterQuery to SelectLocation, compared to default state values and added an 'icon-div--active' css class with border, tinted background, and filled icon
Short and concise changes for this feature, but the details can be more polished!
@ -21,1 +23,4 @@}.icon-div--active {border-color: var(--hover-accent-color);background: color-mix(in srgb, var(--red-600) 20%, var(--input-bg));to be more consistent with the context, i think we can make the first color to blend together to be
--hover-accent-color?@ -22,0 +28,4 @@svg {fill: currentColor;}I do not really like the filled version. Also, the filled "sorting" icon looks kinda bad. It's a personal choice to fill the filter button or not though. So what do you think?
@ -24,1 +35,3 @@transition: all 0.5s;transition:box-shadow 0.5s,border-color 0.5s;I think we can just delete all of these to inherit from the non-hover case
@ -12,3 +14,3 @@}function SelectLocation({ setLocationFilterQuery, locations }: SelectLocationProps) {function SelectLocation({ locationFilterQuery, setLocationFilterQuery, locations }: SelectLocationProps) {nice and clean method to detect if an filter is active. my initial thought was more complicated than this!
@ -19,3 +20,3 @@return (<div className={css.container}><div className={css['icon-div']}><div className={clsx(css['icon-div'], sortBy !== 'open' && css['icon-div--active'])}>this
'open'and''above for SelectLocation is kinda like magic strings, that they are not self-explanatory that they are the default options . For maintainability, I think we could make export constants likeLOCATION_DEFAULTandSORT_DEFAULTto replace these two magic stringsFixed issue #843to WIP: Fixed issue #843Oh I also found this bug. When you active the filter, there is a flick in size of the icon. This is because of the
box-sizing: border-boxthat shrinks the box inwards so that the whole thing don't grow in size. For fix, I think we can make the default state to have a 2px border, but only draw 1px of line when hoveredFor title, I think it is better to name it as the actual feature you are working on, and you can mention which issue the pr fixes in the discussion section of the pr. And for naming of the commit message, you can check https://www.conventionalcommits.org/en/v1.0.0/ for better conventions
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.