-
-
Notifications
You must be signed in to change notification settings - Fork 686
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
Does not show borders in addon block inputs #5898
Conversation
✅ Deploy Preview for volto canceled.
|
✅ Deploy Preview for plone-components canceled.
|
@wesleybl you wrote a cypress test to show some css changes, man that is dedication :) |
I appreciate the effort but I would be careful about doing a lot of this. Each new cypress test adds to the amount of time it takes to run the acceptance tests on every pull request. IMO It would make more sense to add the assertion at the end of an existing test that already creates a table block, instead of adding a new test that does the steps to create the block again. |
@davisagli testing times are already high. Having a few more seconds won't make much difference to the total time. We often let the PR tests run and go have a drink of water. I think this is better than "contaminating" existing tests with something that is not related to that test. I only added these tests because it was a side effect of a lib update. So I did a test to make sure future updates don't cause any problems. |
@wesleybl I know I praised your effort and although I got @davisagli again somehow to disagree with my judgment :), I actually tend to think he is right regarding checking if there is an existing test and adding another assert statement. |
@davisagli @ichim-david Okay I'll change that. In any case, some blocks did not have tests. So the new test will have to be small in these cases. |
@davisagli @ichim-david done. |
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.
My other doubt here: maybe there are blocks that expect the default focus outline to remain visible?
@davisagli the blocks already have their own border indicator for "active/focused block" |
@tiberiuichim then it makes sense when the slate editor covers the entire area of the block, but that's not always the case. |
@wesleybl @tiberiuichim Actually @davisagli is right, it seems I am becoming his cheerleader again :). I have made a video that showcases the effect of this rule on the focus indicator when trying to tab around. focus-visible-removal.mp4 |
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.
@wesleybl see my comment #5898 (comment)
I am +1 with @ichim-david we have to be careful about a11y in these ones. Not an expert here, I can't help much. When in doubt, I always rely on taking a look how the Adobe guys do it in RAC. |
@davisagli @ichim-david Ok. Can I create a new class "block-editor-no-outline" and add this class to blocks that cannot have an outline? So I can use this class in addos. |
This could be done with a new |
@wesleybl I am going to defer to the decision of @davisagli, @sneridagh and @tiberiuichim, naming is hard and if we are to introduce new block settings I am not comfortable saying yay or nay. I am looking better at the issue you've added and the outline problem that was flagged by @tiberiuichim in the slate update At the same time you run into issues with an add-on input and that can easily be fixed by having a simple css rule in your blocks.less equivalent and I don't know if it's worth trying todo something about it in core. As we get into comments about pros on cons we might run into situations where we deem that it's better not to introduce some change such as the pull request with changing the toolbar icon from user to the cog. I hope that we can avoid this scenario, I would think that it would be useful to see how to add a generic class to slate fields but again maybe the other core developers have a better suggestion than what I write here, so let's wait and see what they will say. |
@ichim-david the Slate doesn't have a class, but I can pass the I think I'll do it like this. |
humm but that wouldn't solve my problem that the all Slate in Volto doesn't have border. |
@ichim-david @davisagli @tiberiuichim the Slate has no class but has a div with the Can you take a look please? |
@wesleybl it's Friday night 21:15PM so no test for me tonight we'll test it tomorrow morning. |
@ichim-david I changed the code only to: [data-slate-editor='true'] {
outline: none;
} This works and we don't need to use has. |
We made the css selector more generic, so that it can also be applied to addon blocks
@wesleybl indeed it does, I tested locally with volto-18 and every block available and I had focus-visible present where needed as such this is the cleanest possible fix without crazy selectors and messing with the focus-visible. |
@ichim-david thanks for your help! |
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.
LGTM, but asking the @davisagli for a last review.
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.
OK with me.
* main: (28 commits) Bump vite from 5.1.5 to 5.1.7 (#5946) Fix pt_BR translation of invalid email message (#5953) Fix markup shortcuts for bold, italic and strikethough fix (#5606) Release 18.0.0-alpha.27 Release @plone/types 1.0.0-alpha.10 Improve color widget picker and types (#5948) Enhanced navigation reducer in Volto (#5817) Release 18.0.0-alpha.26 Rename news item Release @plone/slate 18.0.0-alpha.11 Release @plone/registry 1.5.5 Release @plone/types 1.0.0-alpha.9 docs: Cleanup obsolete EEA projects and update info about EEA main website (#5943) Bump vite from 5.1.4 to 5.1.5 (#5942) Add a new label `needs: triage` to new bug reports (#5940) Fix redirect of `https://sustainability.eionet.europa.eu` to `https:/… (#5941) Does not show borders in addon block inputs (#5898) Fix edge case in search options mangling when the options are false-ish (#5869) Add additional parameters to ContentsUploadModal to be reusable in different scenarios (#5881) fix(slate): fix insert/remove element edgecase bug in slate (#5926) ...
We made the css selector more generic, so that it can also be applied to addon blocks.
Fixes #5894