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

Allow text size configuration in text panels #424

Merged
merged 1 commit into from
Nov 29, 2024

Conversation

gordlin
Copy link
Member

@gordlin gordlin commented Nov 18, 2024

Related Item(s)

Issue #391

Changes

  • [FEATURE] Add a toolbar item in the text editor to modify text size
  • [FIX] Change existing toolbar buttons to select content inside the markdown tag(s), so it can be easily changed

Notes

I chose the <span> method as it allows for more granular modifications of text size, where you could edit a single sentence, a few paragraphs, or the whole document. Using customStyles would mean you could only modify the entire slide at once.

Testing

Steps:

  1. Go to any product (e.g. 00000000-0000-0000-0000-000000000000)
  2. Go to any text editor.
  3. Add some text, then highlight it. Go to the 'text size' option (Aa) and change the text size. It should show up in the preview.
  4. Unselect all text, then change text size. <span>'s should wrap a new string "resize", with the new font size.
  5. Try using Superscript or any other Storylines-custom toolbar items. Notice that the content text (here, the text between the tags) is selected, making it easy to modify. Before, it would leave the cursor after the final tag.

This change is Reviewable

@gordlin gordlin added the PR: Frontend PR that primarily involves frontend changes. UI experts and CSS Wizards are asked to review. label Nov 18, 2024
Copy link

Your demo site is ready! 🚀 Visit it here: https://ramp4-pcar4.github.io/storylines-editor/text-size

Copy link
Member

@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.

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

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 1 of 1 files at r1, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @gordlin)

Copy link
Member

@IshavSohal IshavSohal left a comment

Choose a reason for hiding this comment

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

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

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.

Couldn't directly test as the build is out of date. Just did a code sanity check.

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

@yileifeng yileifeng merged commit d8f60c9 into ramp4-pcar4:main Nov 29, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: Frontend PR that primarily involves frontend changes. UI experts and CSS Wizards are asked to review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants