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

UHF-9708 & UHF-10171: Survey styling and javascript functionalities #1009

Merged
merged 15 commits into from
Aug 13, 2024

Conversation

hyrsky
Copy link
Contributor

@hyrsky hyrsky commented Jun 14, 2024

UHF-9708 and UHF-10171

What was done

  • Styling for the survey component.
  • Javascript functionalities for the survey component.

How to install

How to test

  • After successfully installing the feature and adding your first survey it should appear where you have configured it to appear. There is currently 2 second delay configured in the code to make testing easier. This delay needs to be adjusted to the correct one later. Make sure the survey pops up after the timer is done.
  • The popup is configured so that it doesn't come up again after you have closed it so to get it back go to empty local-storages helfi-settings row.
  • The survey should look similar to what in these designs: https://www.figma.com/file/KzpwV4jzKnAgk7gy6x8Yfz/Kysely-pop-up?type=design&node-id=2501-94&mode=design
  • Make sure the translations work (remember to run make drush-locale-update drush-cr if it hasn't been mentioned elsewhere)
  • When the popup comes up make sure that the focus is moved to the survey title. If you close the popup the focus should return to where it was before the popup opened.
  • You should be able to close the popup with Esc button.
  • You shouldn't be able to scroll or move focus to the content on the back while the popup is in place.
  • When the popup appears the background shouldn't move about 15px because the scrollbar disappears but should remain exactly in the same place. The scrollbar is offset with padding on body.
  • Check that code follows our standards

Continuous documentation

  • This feature has been documented/the documentation has been updated
  • This change doesn't require updates to the documentation

Translations

  • Translations have been added to .po -files and included in this PR

Other PRs

Copy link

github-actions bot commented Jun 14, 2024

⚠️ Visual regression found! Please check if this change is wanted or accidental. You can check the output here: https://city-of-helsinki.github.io/drupal-hdbt/pull/1009/html_report/

@teroelonen
Copy link
Contributor

This should be reviewed again since it now has UHF-10171 tasks changes in it.

@teroelonen teroelonen requested a review from juho-lehmonen July 4, 2024 12:31
@teroelonen teroelonen changed the title UHF-9708: Add initial survey template UHF-9708: Survey styling and javascript functionalities Jul 4, 2024
@teroelonen teroelonen changed the title UHF-9708: Survey styling and javascript functionalities UHF-9708 & UHF-10171: Survey styling and javascript functionalities Jul 4, 2024
src/js/closable-surveys.js Show resolved Hide resolved
…me browsers will work correctly when survey pops up, changed English terms on the buttons
Copy link
Contributor

@teroelonen teroelonen left a comment

Choose a reason for hiding this comment

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

Very nice 🦖

@hyrsky hyrsky merged commit 04e7ec2 into main Aug 13, 2024
2 checks passed
@hyrsky hyrsky deleted the UHF-9708 branch August 13, 2024 05:25
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.

3 participants