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

add support for transitional background images #417

Merged
merged 1 commit into from
Apr 15, 2024

Conversation

RyanCoulsonCA
Copy link
Member

@RyanCoulsonCA RyanCoulsonCA commented Apr 2, 2024

Related Item(s)

#401

Changes

  • Adds support for transitional background images. The configuration flag is backgroundImage and takes a path to an image.
  • When a background is active, text components (text slides, captions, titles, etc.) will be placed in a semi-transparent container to keep an accessible contrast.

Testing

Steps:

  1. Open the sample page and scroll down.
  2. Ensure that contrast is OK for text, captions, titles, etc.
  3. Ensure that everything is working well on mobile.

This change is Reviewable

Copy link

github-actions bot commented Apr 2, 2024

Your demo site is ready! 🚀 Visit it here: https://ramp4-pcar4.github.io/story-ramp/fix-401/#/en/00000000-0000-0000-0000-000000000000

Copy link
Member

@yileifeng yileifeng left a comment

Choose a reason for hiding this comment

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

Reviewed 11 of 11 files at r1, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @RyanCoulsonCA)

Copy link
Member

@KashishMistry KashishMistry left a comment

Choose a reason for hiding this comment

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

Reviewed 11 of 11 files at r1, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @RyanCoulsonCA)

Copy link
Member

@szczz szczz left a comment

Choose a reason for hiding this comment

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

Looks great, I might have missed it, but is the text colour in the text components configurable? The lack of contrast between black text and darker images likely violates some accessibility rules / UI standards.

Reviewed 11 of 11 files at r1, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @RyanCoulsonCA)

Copy link
Member Author

@RyanCoulsonCA RyanCoulsonCA left a comment

Choose a reason for hiding this comment

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

I set the opacity of the background such that the contrast should be fine (and the few I tested did pass), but either way I think adding an option to configure the colour would be a good idea. I'll add that in!

Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @RyanCoulsonCA)

Copy link
Member Author

@RyanCoulsonCA RyanCoulsonCA left a comment

Choose a reason for hiding this comment

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

I've added a config option to dynamic and text panels to customize the colour of the text. There's a minor issue with bolded text still showing in black (as a result of the prose class), but we can make a new issue for this. I've also updated the schema to reflect the config changes made in this PR.

Reviewable status: 8 of 12 files reviewed, all discussions resolved (waiting on @KashishMistry, @szczz, and @yileifeng)

Copy link
Member

@szczz szczz left a comment

Choose a reason for hiding this comment

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

Reviewed 4 of 4 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @RyanCoulsonCA)

Copy link
Member

@yileifeng yileifeng left a comment

Choose a reason for hiding this comment

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

Reviewed 4 of 4 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @RyanCoulsonCA)

@yileifeng yileifeng merged commit d75f62e into ramp4-pcar4:main Apr 15, 2024
3 checks passed
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