-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Fix/drop cap #15066
Fix/drop cap #15066
Conversation
Hey @rebeccaj1211! Thanks for taking this on. A couple minor notes:
Thanks again! |
@@ -119,6 +119,8 @@ class RSSEdit extends Component { | |||
onChange={ ( value ) => setAttributes( { itemsToShow: value } ) } | |||
min={ DEFAULT_MIN_ITEMS } | |||
max={ DEFAULT_MAX_ITEMS } | |||
allowReset={ true } | |||
initialValue={ 5 } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these changes meant to be included here? I don't see the relation to the original issue #11756.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whoops! you're right. This was for another issue that I was fixing.
@kjellr |
Thanks, @rebeccaj1211!
I think it'd make sense to remember the drop cap setting for a couple reasons:
I'd love to get some more feedback on that though — it's entirely possible I'm overthinking. 🙂 |
I'd tend toward leaving the drop cap enabled if the user switches back to an alignment that supports it, mostly because the setting isn't, strictly speaking, tied to the paragraph alignment itself. How does this work with RTL languages? |
Hello, I also gave it a run. On LTR, the drop cap turns off and the toggle disappears from the sidebar when the user selects a right or center text-align. Although that feels ok to me, I see @kjellr’s point on why to remember the drop cap setting. On RTL same thing is happening with a text-align: Left/Center. Another thing that doesn’t feel right is removing the toggle in front of me while I’m changing the alignment. For example: “Drop Cap is disabled”. |
I have the same feeling about this.
You should be able to achieve it by wrapping the toggle the As for the visual handling for this logic, I'd recommend doing it with CSS only because it would cover both, front-end and editor. For ex. we could apply the drop cap styles only when the .has-drop-cap.has-text-align-left {
float: left
...
} Does that make sense, @rebeccaj1211 @thanasakleas? |
I agree with leaving the Drop Cap checked if the user specifically turned it on before switching alignment. Also agree with disabling the component instead of removing it, the helper text could indicate that it requires left (or right, see below) justification. However, on the Right-to-left, shouldn't it be activated on right justified and not left justified? |
We are discussing this issue/PR right now during the Gutenberg Design Triage. In general we feel that the current solution of choosing not to use dropcap works well enough. |
Does it mean that this PR should be closed? |
Closing this PR out due to lack of momentum and in light of the last messages on here. Feel free to re-open if someone wants to revisit finding a solution! |
Description
In reference to #11756.
If the text is left aligned, the user can activate drop cap. If it is center or right aligned, then the drop cap button is turned off and hidden from the user.
How has this been tested?
Manually tested and passed all unit tests.
Screenshots <!-- if applicable -
https://giphy.com/gifs/YWWAstvJJjeQWrzDQI
Types of changes
Bug fix (non-breaking change which fixes an issue)
Checklist: