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

Refactor opening times picker with stimulus controller #1434

Merged
merged 33 commits into from
Aug 31, 2022

Conversation

aaaaargZombies
Copy link
Contributor

@aaaaargZombies aaaaargZombies commented Aug 16, 2022

Opening a draft with the suggestion of merging this part of the work in early as it's completed.

fixes #1417

  • Opening times picker just uses Stimulus instead
  • Systems tests exist for picker

Currently doesn't fix

  • Vue removed as dependency

The last part has a lot of sprawling bits that seem to reach beyond the opening times picker and might be better approached in it's own issue/PR

@github-actions github-actions bot added chore patch Bump version 0.0.X labels Aug 16, 2022
@aaaaargZombies
Copy link
Contributor Author

Also now would be a good time for UI feedback

@aaaaargZombies aaaaargZombies force-pushed the 1417-opening-times-stimulus-controller branch from 8df2e86 to 1e5872e Compare August 16, 2022 17:15
@kimadactyl
Copy link
Member

Looking good! UI needs a little love obvi but great start. It currenlty looks like this for me - i think 'all day' checkbox last and get it all on one line but assume you're already on it.

The 'all day' thing does create some funky states but I think it's no big deal.

It should prob make it easier to add in the next day after selecting the current one too - maybe after entering a time it incremenets the day?

Screenshot 2022-08-17 at 10 36 50

@aaaaargZombies aaaaargZombies force-pushed the 1417-opening-times-stimulus-controller branch from f83fc70 to 24e6a33 Compare August 30, 2022 11:24
@aaaaargZombies aaaaargZombies marked this pull request as ready for review August 30, 2022 15:15
@aaaaargZombies aaaaargZombies force-pushed the 1417-opening-times-stimulus-controller branch from 27c0650 to b2e6bd0 Compare August 31, 2022 11:29
]);

const nextDay = (day) => {
const index =
Copy link
Contributor

Choose a reason for hiding this comment

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

tip: let nextIndex = (dayOrder.indexOf(day) + 1) % dayOrder.length;

Copy link
Contributor

@ivan-kocienski-gfsc ivan-kocienski-gfsc left a comment

Choose a reason for hiding this comment

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

Looks okay to me

@aaaaargZombies aaaaargZombies merged commit 02ca93d into main Aug 31, 2022
@aaaaargZombies aaaaargZombies deleted the 1417-opening-times-stimulus-controller branch August 31, 2022 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch Bump version 0.0.X
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rewrite opening times picker in Stimulus
3 participants