Conversation
c4284d2 to
d85d948
Compare
|
When clicking on day, it unselects the current day. |
|
Is |
|
There is perhaps a problem with the workflow.
🎬 Video of demonstration: |
Also known behaviour since we get the number of days for 'this quarter' and we treat it as a range, the |
We just reused |
I made the separators lighter, |
This was discussed with Pedro a last Monday. We made the decision to use this workflow for now. This is the reason this was added to the |
…ectly in the calendar if we refresh tha page
…To controls, and separating out hash sync resolver
…s well; also updating less file so that we use css variables for colour
…period type but not selecting anything.
caddoo
left a comment
There was a problem hiding this comment.
Tested manually as many paths as i could think of.
…24139) * adding date presets * adding the date range preset class; adding tests * refactoring to PresetDateRanges to a vue component instead of just a ts class/object * fixing bug that seems to always click the 'Periods' initially then 'Presets' on the second click. * refactoring out PeriodOptions into its own vue component. fixing some bugs found and adding new tests * refactoring out PresetDateRange so that it is its own module and not cluttering PresetDateRanges.vue * udating PresetDateRangeResolver.ts so that it uses magic strings we already have in Matomo for the lastXdays * fixing a bug that causes some issues with PeriodSelector closing the panel before 'Apply' has been clicked when a preset is being clicked. * fixing space difference for compare checkbox * fixing bug where the Period selector panel when switching from a single calendar view, to a double calendar view * added a 'gate' so that we can stop click event from going into date range picker if its coming from Preset date options. * making some cosmetic changes * adding tests and comments for using the magic keys in the URL for bookmarking * fixing move period bug can go over min/max dates; adding tests * made apply button show all the time again * fixing P1 where staged state can leak across report navigation if date/period is unchanged * adding tests for new watcher resync * fixing bug where changing some preset options immediately changes some parts of the UI when 'Apply' has not been clicked * making sure we include idSite and segment when trying to decide if context has changed. also adding tests so that its clear that preset options block calendar interactions and period options allow them * adding tests so that we check that preset mode exits when a period option is selected * hide preset date options for periods disabled in enabled_periods_UI * removed unused translation * making getContextKeyFromParsed more robust and not just be based on hard coded url params * added compareSegments to context to ignore * updating tests; transferred some ui dom tests to jest * moved the periods and preset date options to the left and the calendar to the right * added jest test to make sure clicking outside just closes the panel and does not apply pending presets * removed test that is already covered by jest test in PresetDateRanges.component.spec.ts. This test was changing some screenshot tests because it moved the selection * updated screenshot tests so that it actually types in the actual dates * making changes to the UI so that we follow the spec * adding tests and updating built files * adding hover colour to Period selection; also making the 'Apply' button not be clickable when Period options are selected except for 'Custom date range' option * fixing UI test * Adding keyboard accessibility and updating tests * adding a fix so that magic strings in the URL still reflect back correctly in the calendar if we refresh tha page * refactoring period selector by creating new vue component for CompareTo controls, and separating out hash sync resolver * changing spec names * update built file * updating screenshots * applying a bit of refactor for readability * disabling the whole calendar when we click on a Preset date option * updating tests so that we do not use nextTick; updating screenshots as well; also updating less file so that we use css variables for colour * fixing bug that sometimes enables the Apply button even when on period options * Build vue files * adding some changes from initial review * fixing issue where we unselect selected period option when we change period type but not selecting anything. * updating screenshots;updating unit test so and comment so that behaviour is explicit * renaming state names so that its more descriptive and also removing redundant states * Build vue files * updating screenshot --------- Co-authored-by: innocraft-automation <innocraft-automation@users.noreply.github.com>











Description
DEV-19875
This PR will fix and be used to review and test:
We want to update the look and feel of our calendar. This is the initial start to add some preset options (DEV-19876), moving the date options to the left(DEV-19874) and differentiating the Period Options from Preset Options
NOTE:
PeriodSelector.vue is a bit too long now and would require more refactors by splitting this component more into some more components and helper modules.
I plan to add that refactor in the next JIRA ticket since that will be the time we try to refresh the UI (w/o changing libraries).
I think this will help more to make it easy to review at that point as I think there are a lot of changes in this PR already.
Acceptance Criteria (took from the 3 JIRA issues above)
Applybutton is always disabled for Period Options (Day, Week, Month, Year) except 'date range' (Custom date range).Checklist
Review