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

Event date facet (DDFFORM-67) #562

Open
wants to merge 10 commits into
base: develop
Choose a base branch
from
Open

Event date facet (DDFFORM-67) #562

wants to merge 10 commits into from

Commits on Mar 19, 2024

  1. Reformat date calendar story title

    Generally we do not use PascalCase for story titles.
    kasperg committed Mar 19, 2024
    Configuration menu
    Copy the full SHA
    c0af83f View commit details
    Browse the repository at this point in the history

Commits on Mar 20, 2024

  1. Refactor/rename date calendar component to date range

    This allows us to make the component usable in more situations - e.g.
    show the calendar with a form field.
    
    This also allows us to move styling that was currently placed in the
    pause modal component into the generic component.
    
    Styling specific to Flatpickr has been moved to a separate SCSS file.
    kasperg committed Mar 20, 2024
    Configuration menu
    Copy the full SHA
    4c5a1c3 View commit details
    Browse the repository at this point in the history
  2. Add support for showing the calendar as open or closed in Storybook

    This supports our usage of visual testing.
    kasperg committed Mar 20, 2024
    Configuration menu
    Copy the full SHA
    30ce9fd View commit details
    Browse the repository at this point in the history

Commits on Mar 21, 2024

  1. Convert date range component from pure React to Vanilla JS

    This allows us to reuse the logic in the CMS.
    kasperg committed Mar 21, 2024
    Configuration menu
    Copy the full SHA
    2096990 View commit details
    Browse the repository at this point in the history
  2. Use defaultValue instead of value for initial date range values

    This is recommended by React DevTools.
    kasperg committed Mar 21, 2024
    Configuration menu
    Copy the full SHA
    486e286 View commit details
    Browse the repository at this point in the history
  3. Add a modifier to style date ranges like a filter

    Filters have black borders.
    
    Add a story to showcase this.
    kasperg committed Mar 21, 2024
    Configuration menu
    Copy the full SHA
    e0586c0 View commit details
    Browse the repository at this point in the history
  4. Add a date range filter to the content list

    This goes to the right of the filters on desktop.
    
    We also want to control the width. Instead of setting the width on the
    element like we do for dropdowns we instead set it on the surrounding
    elements. This makes it easier to use across different contexts.
    kasperg committed Mar 21, 2024
    Configuration menu
    Copy the full SHA
    b59e78b View commit details
    Browse the repository at this point in the history
  5. Show the date and calendar in a somewhat localized format

    Localization will not work inside storybook so this is the best we
    can do.
    
    To use this format we have to set an alt input. This requires updates
    to our asynchronous clicking as there are now multiple input elements
    from Flatpickr.
    
    This also allows us to lower the waiting time before we click.
    kasperg committed Mar 21, 2024
    Configuration menu
    Copy the full SHA
    7d50af0 View commit details
    Browse the repository at this point in the history
  6. Split up creating a date range and doing so on page load

    By splitting the two we can create a date range for content that
    has been loaded asynchronously.
    kasperg committed Mar 21, 2024
    Configuration menu
    Copy the full SHA
    a492763 View commit details
    Browse the repository at this point in the history

Commits on Mar 22, 2024

  1. Remove margin-bottom from date-range filters

    The component gets its bottom margin from the origin implementation
    but this is not needed here.
    kasperg committed Mar 22, 2024
    Configuration menu
    Copy the full SHA
    734b9d2 View commit details
    Browse the repository at this point in the history