WIP: Add popover to indicate the current meal block period #712

Draft
laasyaaki wants to merge 15 commits from block_periods into staging
laasyaaki commented 2025-10-17 07:16:18 +00:00 (Migrated from github.com)

#706

based on feedback form request

#706 based on feedback form request
GhostOf0days (Migrated from github.com) reviewed 2025-10-17 07:16:18 +00:00
JackHurew (Migrated from github.com) reviewed 2025-10-17 07:16:18 +00:00
vercel[bot] commented 2025-10-17 07:16:25 +00:00 (Migrated from github.com)

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
cmueats Ready Ready Preview Dec 19, 2025 5:47pm
[vc]: #IH8zpL5u/kTNjKy4wCZnzcjSqGGlACmXWhYK/MEA86U=:eyJpc01vbm9yZXBvIjp0cnVlLCJ0eXBlIjoiZ2l0aHViIiwicHJvamVjdHMiOlt7Im5hbWUiOiJjbXVlYXRzIiwiaW5zcGVjdG9yVXJsIjoiaHR0cHM6Ly92ZXJjZWwuY29tL3Njb3R0eWxhYnMvY211ZWF0cy9GYllzZHBKaFg3N0h6dEdSNmtMVlIyUm5FcFVYIiwicHJldmlld1VybCI6ImNtdWVhdHMtZ2l0LWJsb2NrcGVyaW9kcy1zY290dHlsYWJzLnZlcmNlbC5hcHAiLCJuZXh0Q29tbWl0U3RhdHVzIjoiREVQTE9ZRUQiLCJyb290RGlyZWN0b3J5IjpudWxsfV19 The latest updates on your projects. Learn more about [Vercel for GitHub](https://vercel.link/github-learn-more). | Project | Deployment | Review | Updated (UTC) | | :--- | :----- | :------ | :------ | | [cmueats](https://vercel.com/scottylabs/cmueats) | ![Ready](https://vercel.com/static/status/ready.svg) [Ready](https://vercel.com/scottylabs/cmueats/FbYsdpJhX77HztGR6kLVR2RnEpUX) | [Preview](https://cmueats-git-blockperiods-scottylabs.vercel.app) | Dec 19, 2025 5:47pm |
cirex-web commented 2025-10-30 01:59:46 +00:00 (Migrated from github.com)

oh yea also I have like three midterms next week 😭 so feel free to approve and merge other ppl's PRs without my approval. I think main thing is just make sure the class names are named well and that css modules are used whenever possible.

oh yea also I have like three midterms next week 😭 so feel free to approve and merge other ppl's PRs without my approval. I think main thing is just make sure the class names are named well and that css modules are used whenever possible.
GhostOf0days commented 2025-10-31 02:50:17 +00:00 (Migrated from github.com)

試験がんばってね、エリック!
image

試験がんばってね、エリック! <img width="273" height="264" alt="image" src="https://github.com/user-attachments/assets/1d65c3a5-6a60-4f07-8c7d-33e64923dd8a" />
cirex-web commented 2025-11-10 23:02:20 +00:00 (Migrated from github.com)

I like how you bold the active row here!
image

thoughts on this revision of your design? (filter has been moved to the right, closer to the search bar, which makes more sense I think) I also added a button so ppl on mobile can click on it (actually we can probably make the whole row clickable and hoverable)
Figma link: https://www.figma.com/design/dp9RzhJtoMFWiUGjVCd6K7/CMUEats?node-id=1626-13703&t=ziZxOqbwwu2MDqOy-11

image image image image
I like how you bold the active row here! <img width="330" height="205" alt="image" src="https://github.com/user-attachments/assets/19a4d436-db84-4684-aeec-e377e8e94cb8" /> thoughts on this revision of your design? (filter has been moved to the right, closer to the search bar, which makes more sense I think) I also added a button so ppl on mobile can click on it (actually we can probably make the whole row clickable and hoverable) Figma link: https://www.figma.com/design/dp9RzhJtoMFWiUGjVCd6K7/CMUEats?node-id=1626-13703&t=ziZxOqbwwu2MDqOy-11 <img width="2560" height="1664" alt="image" src="https://github.com/user-attachments/assets/0bd249f3-dc95-4606-8012-351651d9f584" /> <img width="2560" height="1664" alt="image" src="https://github.com/user-attachments/assets/753bbb27-fc60-4b7b-9391-15388501d159" /> <img width="286" height="1704" alt="image" src="https://github.com/user-attachments/assets/1315b3bc-7d67-4faf-a133-584208ed9032" /> <img width="286" height="1704" alt="image" src="https://github.com/user-attachments/assets/1cb31573-796d-4e03-8129-2440430b2828" />
cirex-web (Migrated from github.com) reviewed 2025-11-10 23:08:27 +00:00
cirex-web (Migrated from github.com) commented 2025-11-10 23:08:27 +00:00

I'm 90% sure this doesn't do what you think it does - this is probably equivalent to const pittsbughTime = new Date() (and new Date().getHours() defaults to whatever timezone your computer is set to)

You can use the luxon package's DateTime.now().setZone('America/New_York') instead to force the timezone to be in pittsburgh time, no matter what the computer's local timezone is

I'm 90% sure this doesn't do what you think it does - this is probably equivalent to `const pittsbughTime = new Date()` (and new Date().getHours() defaults to whatever timezone your computer is set to) You can use the `luxon` package's `DateTime.now().setZone('America/New_York')` instead to force the timezone to be in pittsburgh time, no matter what the computer's local timezone is
cirex-web (Migrated from github.com) reviewed 2025-11-10 23:10:18 +00:00
cirex-web (Migrated from github.com) commented 2025-11-10 23:10:18 +00:00

might be good to make getBlockPeriod a pure function that takes in the current time instead. (helps with testing and re-rendering if we decide to periodically update what "now" represents)

might be good to make `getBlockPeriod` a pure function that takes in the current time instead. (helps with testing and re-rendering if we decide to periodically update what "now" represents)
cirex-web (Migrated from github.com) reviewed 2025-11-10 23:11:01 +00:00
cirex-web (Migrated from github.com) commented 2025-11-10 23:11:01 +00:00

any reason why this is decoupled from

    const breakfastStart = 3 * 3600 + 30 * 60;
    const lunchStart = 10 * 3600 + 30 * 60;
    const dinnerStart = 16 * 3600 + 30 * 60;
    const lateNightStart = 21 * 3600;
any reason why this is decoupled from ```ts const breakfastStart = 3 * 3600 + 30 * 60; const lunchStart = 10 * 3600 + 30 * 60; const dinnerStart = 16 * 3600 + 30 * 60; const lateNightStart = 21 * 3600; ```
cirex-web (Migrated from github.com) reviewed 2025-11-10 23:12:14 +00:00
cirex-web (Migrated from github.com) commented 2025-11-10 23:12:13 +00:00

might be good to extract all of this into a separate component/file (its functionality is completely separate from everything else)

might be good to extract all of this into a separate component/file (its functionality is completely separate from everything else)
laasyaaki (Migrated from github.com) reviewed 2025-11-15 21:06:16 +00:00
laasyaaki (Migrated from github.com) commented 2025-11-15 21:06:16 +00:00

I made this in MN (cst) and it worked out fine then! but i'll test a bit more

I made this in MN (cst) and it worked out fine then! but i'll test a bit more
laasyaaki (Migrated from github.com) reviewed 2025-11-15 21:09:55 +00:00
laasyaaki (Migrated from github.com) commented 2025-11-15 21:09:55 +00:00

math is hard :/

math is hard :/
laasyaaki commented 2025-11-15 21:31:52 +00:00 (Migrated from github.com)
image

I like the buttons you added i think it could be helpful for mobile!
i'm not really sure how I like this design because it looks a bit out of place from the cmueats theme, and on mobile it kind of seperates the screen, but we can get some more opinions on what's more user friendly!

<img alt="image" width="286" height="1704" src="https://private-user-images.githubusercontent.com/57322506/512426845-1cb31573-796d-4e03-8129-2440430b2828.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NjMyNDA4NjAsIm5iZiI6MTc2MzI0MDU2MCwicGF0aCI6Ii81NzMyMjUwNi81MTI0MjY4NDUtMWNiMzE1NzMtNzk2ZC00ZTAzLTgxMjktMjQ0MDQzMGIyODI4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTExMTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUxMTE1VDIxMDI0MFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTA0Yjg0ZjJmNjFiOGE0ZmY1NzU2NDZlODZhMTJiNjE4YjkzMmQ3ZTE1NTM0ODVkNWExYTVjMTU0NTdjYWZiMWUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.kVrphoFptiRicLCTPziIC7mKhwET9MvQZoJJx0ddS0E"> I like the buttons you added i think it could be helpful for mobile! i'm not really sure how I like this design because it looks a bit out of place from the cmueats theme, and on mobile it kind of seperates the screen, but we can get some more opinions on what's more user friendly!
cirex-web commented 2025-11-16 17:47:44 +00:00 (Migrated from github.com)

What specifically about this feels off?

image

and yea maybe we can pick a better font but I think having a monospaced one helps with readability
image

or ig this (Inter) is fine
image

How about de-emphasizing the text a bit for mobile?
image

or maybe two lines?
image

What specifically about this feels off? <img width="1560" height="1664" alt="image" src="https://github.com/user-attachments/assets/ed2c9729-d8c6-4ca8-b6ee-0e76417e962e" /> and yea maybe we can pick a better font but I think having a monospaced one helps with readability <img width="458" height="203" alt="image" src="https://github.com/user-attachments/assets/5ada9102-dbf8-4649-a708-ca146bf95c96" /> or ig this (Inter) is fine <img width="342" height="146" alt="image" src="https://github.com/user-attachments/assets/ffcd5673-4f37-4eb5-aaca-552c97541819" /> How about de-emphasizing the text a bit for mobile? <img width="186" height="1704" alt="image" src="https://github.com/user-attachments/assets/94666bc8-782e-418e-a731-8d6d715e33b3" /> or maybe two lines? <img width="186" height="1704" alt="image" src="https://github.com/user-attachments/assets/6a9bfd9a-7953-4bf9-9ef1-bc70e98ea362" />
cirex-web commented 2025-11-17 16:07:58 +00:00 (Migrated from github.com)

or this?
image
image

or this? <img width="186" height="1704" alt="image" src="https://github.com/user-attachments/assets/c37ce068-0bce-400f-933c-e775c761eb73" /> <img width="186" height="1704" alt="image" src="https://github.com/user-attachments/assets/1d7b9e71-06f3-48ed-bc91-adbc84b7f38b" />
laasyaaki commented 2025-11-18 04:43:26 +00:00 (Migrated from github.com)

What specifically about this feels off?

image

I prefer the popup under the searchbar, and I don't really like how it disrupts the margin and comes in from the right. But I like your idea to have a different font, I like the monospaced font.

> What specifically about this feels off? > > <img alt="image" width="1560" height="1664" src="https://private-user-images.githubusercontent.com/57322506/514903365-ed2c9729-d8c6-4ca8-b6ee-0e76417e962e.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NjM0NDExNjUsIm5iZiI6MTc2MzQ0MDg2NSwicGF0aCI6Ii81NzMyMjUwNi81MTQ5MDMzNjUtZWQyYzk3MjktZDhjNi00Y2E4LWI2ZWUtMGU3NjQxN2U5NjJlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTExMTglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUxMTE4VDA0NDEwNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWQyYmY3Y2VhZTdiYmExN2ZlZWEwZWQ1MjNiZjVhODZhZjYzZTYzYzMxZWM3OWYwYWY4N2I3MGU3MWMyYjNhMjUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.jnnBeICqfRlXvOqPMHYasU6so1dkbSupY55gE3Y9YcQ"> I prefer the popup under the searchbar, and I don't really like how it disrupts the margin and comes in from the right. But I like your idea to have a different font, I like the monospaced font.
laasyaaki commented 2025-11-18 04:44:40 +00:00 (Migrated from github.com)

or this? image image

I like this! I just think the header should be the first thing people see and the block periods popup should be with the rest of the filters and I would make it the dark gray color of the rest of the filtering and search stuff

> or this? <img alt="image" width="186" height="1704" src="https://private-user-images.githubusercontent.com/57322506/515276263-c37ce068-0bce-400f-933c-e775c761eb73.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NjM0NDExNjUsIm5iZiI6MTc2MzQ0MDg2NSwicGF0aCI6Ii81NzMyMjUwNi81MTUyNzYyNjMtYzM3Y2UwNjgtMGJjZS00MDBmLTkzM2MtZTc3NWM3NjFlYjczLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTExMTglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUxMTE4VDA0NDEwNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWYwNzg1ODRmMTRhZWVjYWE0NmFlOWE2NTJkMzNmMGNiMzUzM2M0NDhhOWQ4ZDA2MzkzMWRhNWYyMDViZDQ4MTUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.0jCSAYnNd_YU3zuUsqI9wVKxL0eOFRagPYHRHu-7LSw"> <img alt="image" width="186" height="1704" src="https://private-user-images.githubusercontent.com/57322506/515341306-1d7b9e71-06f3-48ed-bc91-adbc84b7f38b.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NjM0NDExNjUsIm5iZiI6MTc2MzQ0MDg2NSwicGF0aCI6Ii81NzMyMjUwNi81MTUzNDEzMDYtMWQ3YjllNzEtMDZmMy00OGVkLWJjOTEtYWRiYzg0YjdmMzhiLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTExMTglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUxMTE4VDA0NDEwNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTEyYjQ5NzEwYzU2NjkxZjA0OTQxYjYwNjI1MWIyYTJiNmEyNjlhZDY3YmE5YjAxNzkwNzMxODQ0MGE0ZmU5NWMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.N_1-gQ7cd7ozC3Pxdb6jxKSEx0B44C8EGL_Ka90ARUU"> I like this! I just think the header should be the first thing people see and the block periods popup should be with the rest of the filters and I would make it the dark gray color of the rest of the filtering and search stuff
cirex-web commented 2025-11-20 16:16:20 +00:00 (Migrated from github.com)

I just think the header should be the first thing people see and the block periods popup should be with the rest of the filters and I would make it the dark gray color of the rest of the filtering and search stuff

you don't think that making it the same color as the filtering and search might cause confusion? cuz it's not really part of the search functionality lol

> I just think the header should be the first thing people see and the block periods popup should be with the rest of the filters and I would make it the dark gray color of the rest of the filtering and search stuff you don't think that making it the same color as the filtering and search might cause confusion? cuz it's not really part of the search functionality lol
laasyaaki commented 2025-11-21 05:45:12 +00:00 (Migrated from github.com)

I just think the header should be the first thing people see and the block periods popup should be with the rest of the filters and I would make it the dark gray color of the rest of the filtering and search stuff

you don't think that making it the same color as the filtering and search might cause confusion? cuz it's not really part of the search functionality lol

no lol I think it's all part of the side functionality and not the main eatery card functionality. Also, If its on the other side there's some space between the block period popover and the other filters. Maybe we can switch the sides of the filters to group all of the filters together, but I still think the popover should follow the same color scheme and styling as the filtering stuff. we can poll slack?

> > I just think the header should be the first thing people see and the block periods popup should be with the rest of the filters and I would make it the dark gray color of the rest of the filtering and search stuff > > you don't think that making it the same color as the filtering and search might cause confusion? cuz it's not really part of the search functionality lol no lol I think it's all part of the side functionality and not the main eatery card functionality. Also, If its on the other side there's some space between the block period popover and the other filters. Maybe we can switch the sides of the filters to group all of the filters together, but I still think the popover should follow the same color scheme and styling as the filtering stuff. we can poll slack?
cirex-web commented 2025-11-21 17:10:51 +00:00 (Migrated from github.com)

but I still think the popover should follow the same color scheme and styling as the filtering stuff. we can poll slack?

sure

> but I still think the popover should follow the same color scheme and styling as the filtering stuff. we can poll slack? sure
cirex-web commented 2025-12-13 21:35:29 +00:00 (Migrated from github.com)

Very cool, thanks!

  • Why is the font size so small on mobile?
image
  • Maybe we can have the entire popup expand on desktop on hover, rather than on click (at least that was what I was thinking lol)
  • Can we close the box on tap anywhere outside the box as well? I used composedPath for detecting clicks outside the dropdown in a chrome extension I built last month, if you want an example
  // close dropdown when an outside click occurs
  useEffect(() => {
    if (!isOpen) return;
    const onClick = (ev: PointerEvent) => {
      if (dropdownRef.current === null || plusButtonRef.current === null)
        return;
      if (
        !ev.composedPath().includes(dropdownRef.current) &&
        !ev.composedPath().includes(plusButtonRef.current)
      ) {
        onClose();
      }
    };
    document.body.addEventListener("click", onClick);
    return () => document.body.removeEventListener("click", onClick);
  }, [isOpen]);
Very cool, thanks! - Why is the font size so small on mobile? <img width="185" height="355" alt="image" src="https://github.com/user-attachments/assets/2f123fd5-fc5f-474f-8d91-511e7ca15738" /> - Maybe we can have the entire popup expand on desktop on hover, rather than on click (at least that was what I was thinking lol) - Can we close the box on tap anywhere outside the box as well? I used `composedPath` for detecting clicks outside the dropdown in a chrome extension I built last month, if you want an example ```ts // close dropdown when an outside click occurs useEffect(() => { if (!isOpen) return; const onClick = (ev: PointerEvent) => { if (dropdownRef.current === null || plusButtonRef.current === null) return; if ( !ev.composedPath().includes(dropdownRef.current) && !ev.composedPath().includes(plusButtonRef.current) ) { onClose(); } }; document.body.addEventListener("click", onClick); return () => document.body.removeEventListener("click", onClick); }, [isOpen]); ```
cirex-web commented 2025-12-18 03:17:49 +00:00 (Migrated from github.com)

hi Laasya! I can wrap this up if you're busy over the next few days

hi Laasya! I can wrap this up if you're busy over the next few days
laasyaaki commented 2025-12-18 05:12:39 +00:00 (Migrated from github.com)

hi Laasya! I can wrap this up if you're busy over the next few days

Hey I can wrap this up, I'm sorry I didn't see your comment on my latest changes

> hi Laasya! I can wrap this up if you're busy over the next few days Hey I can wrap this up, I'm sorry I didn't see your comment on my latest changes
Arom1a commented 2025-12-24 02:56:30 +00:00 (Migrated from github.com)

The div is too wide so that hovering on any area will trigger the expansion

Snipaste_2025-12-24_10-54-59 Snipaste_2025-12-24_10-51-17
The div is too wide so that hovering on any area will trigger the expansion <img width="2329" height="298" alt="Snipaste_2025-12-24_10-54-59" src="https://github.com/user-attachments/assets/1b297ae4-a1b7-448b-b61f-2c2b02a0b412" /> <img width="2332" height="156" alt="Snipaste_2025-12-24_10-51-17" src="https://github.com/user-attachments/assets/540f03c2-c0c6-4f55-96e9-74f681162d51" />
This pull request has changes conflicting with the target branch.
  • src/assets/control_buttons/expand_arrow.svg
  • src/assets/control_buttons/x.svg
  • src/components/SelectLocation.css
  • src/pages/ListPage.css
  • src/pages/ListPage.tsx
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin block_periods:block_periods
git switch block_periods

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch staging
git merge --no-ff block_periods
git switch block_periods
git rebase staging
git switch staging
git merge --ff-only block_periods
git switch block_periods
git rebase staging
git switch staging
git merge --no-ff block_periods
git switch staging
git merge --squash block_periods
git switch staging
git merge --ff-only block_periods
git switch staging
git merge block_periods
git push origin staging
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
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!712
No description provided.