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

DDFFORM 69 #595

Merged
merged 4 commits into from
Apr 19, 2024
Merged

DDFFORM 69 #595

merged 4 commits into from
Apr 19, 2024

Conversation

LasseStaus
Copy link
Contributor

@LasseStaus LasseStaus commented Apr 17, 2024

Link to issue

DDFFORM-69

This PR depends on a PR in the design system : danskernesdigitalebibliotek/dpl-cms#1002

Description

This PR adds the markup for the new component "Filtered event list".

  • Add component, story, test data and css for filtered event list.
  • extend/refactor show-more.js logic with more functionality for controlling wheter a button should be displayed or not after a list is expanded. Moved some namings/data-attributes around.

Comment on this logic and test it out please.

  • Update existing components using show-more.js logic. Currently this should only be <TagList/>. If you think this is incorrect comment it.

Chromatic is left unaccepted on purpose to see changes. Will accept once approved.

Once again, we see weird chromatic changes that should not be associated with these changes.

Screenshot of the result

image

@LasseStaus LasseStaus changed the base branch from develop to release/hermod-sprint-12 April 17, 2024 12:37
@LasseStaus LasseStaus force-pushed the DDFFORM-69 branch 2 times, most recently from 2103a5a to 6bd0d9d Compare April 17, 2024 12:51
@kasperg kasperg assigned kasperg and unassigned kasperg, rasben and kasperbirch1 Apr 19, 2024
Copy link
Contributor

@kasperg kasperg left a comment

Choose a reason for hiding this comment

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

👍 LGTM

I have some suggestions for you to consider before merging.

src/stories/Library/tag/tag-list/TagList.tsx Show resolved Hide resolved
src/stories/utils/show-more.js Outdated Show resolved Hide resolved
src/stories/utils/show-more.js Outdated Show resolved Hide resolved
src/stories/utils/show-more.md Outdated Show resolved Hide resolved
This adds the markup for the new component filteredEventList.

Styling & JS depends on other commits.

DDFFORM-69
This commit updates the show-more js file which can be used for multiple components that require a fold in/ fold out functionality.

The refactor aims to keep the existing funtionality aswell as add to it. This includes
- Make it possible to select whether the list-button show be visible or not after expanding a list.
- Determine how many list items show be initially shown, with a fallback of the amount of list-elements if not specified.
- Automatically hide the button if there are no more elements to show than specified through the
- Automatically handle aria-control linking between list/button.
- Moved some data-attributes to other elements as well as renaming some variables.

If you see any improvements to something or another feature that would be nice feel free to comment.

Currently it is only possible to use this, if the button/list exists in the same wrapper. This could be change later if relevant but  currently it isn't.

Updated .md file also to reflect these changes.

DDFFORM-69
This updates the logic for the taglist with the new refactored show-more logic.

DDFFORM-69
@LasseStaus LasseStaus merged commit d68ddd6 into release/hermod-sprint-12 Apr 19, 2024
8 checks passed
@LasseStaus LasseStaus deleted the DDFFORM-69 branch April 19, 2024 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants