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

[design] Focused vs. unfocused styles #9

Closed
dkoo opened this issue Nov 6, 2020 · 7 comments · Fixed by #14
Closed

[design] Focused vs. unfocused styles #9

dkoo opened this issue Nov 6, 2020 · 7 comments · Fixed by #14

Comments

@dkoo
Copy link
Contributor

dkoo commented Nov 6, 2020

Screenshot 2020-11-06 at 10 50 23

When the Curated List block is unfocused, we shouldn't see the borders, paddings, [+], etc...

Originally posted by @thomasguillot in #6 (comment)

@dkoo dkoo added the enhancement New feature or request label Nov 6, 2020
@dkoo dkoo changed the title ![Screenshot 2020-11-06 at 10 50 23](https://user-images.githubusercontent.com/177929/98357989-ef8bf780-201d-11eb-8a19-08d30cf63d4e.png) [design] Focused vs. unfocused styles Nov 6, 2020
@dkoo
Copy link
Contributor Author

dkoo commented Nov 23, 2020

Moving the discussion here:

My thought with this was that without the borders, it becomes really hard to tell that the listings are part of the same "parent" list when you have more than a few items in a list. Also, if we have no borders/padding when the block is unfocused, but add borders/padding when it is focused, won't that cause jitter and text reflow when the padding is added? Or require us to maintain extra padding which might look janky without visible borders?

@thomasguillot
Copy link
Contributor

thomasguillot commented Nov 24, 2020

it becomes really hard to tell that the listings are part of the same "parent" list when you have more than a few items in a list

Think of the group block, with child blocks.

if we have no borders/padding when the block is unfocused, but add borders/padding when it is focused, won't that cause jitter and text reflow when the padding is added?

I guess we should just use an outline like Core blocks.

Kapture 2020-11-24 at 08 36 42

@dkoo
Copy link
Contributor Author

dkoo commented Dec 3, 2020

I started implementing this, removing the borders and padding from Curated Lists blocks and individual listing blocks inside. What I'm finding is that it makes it nearly impossible to focus the Curated List parent block (where most of the display attributes are set) once it's been populated with inner listing blocks—because it has no padding, anywhere you click inside will end up focusing one of its inner blocks.

I'd suggest we table this for now and keep the borders and padding, unless you have some ideas how how to handle this?

@thomasguillot
Copy link
Contributor

@dkoo What if we just keep .newspack-listings__curated-list-editor { padding: 1px 0; } That would leave users with 2 areas to access the block.
And they can always use the block navigation.

Screenshot 2020-12-04 at 08 41 57

Kapture 2020-12-04 at 08 47 37

@dkoo
Copy link
Contributor Author

dkoo commented Dec 4, 2020

How does this look/work to you? #14

I retained a bit of padding on the sides of the Curated List block and applied negative margins so that it's still possible to click on the Curated List block in the editor body to focus it. I guess I'm obsessed with making sure that's possible because it's mainly how I use the block editor. 😄

@dkoo dkoo added this to the Phase 1 (Release) milestone Dec 15, 2020
@dkoo dkoo closed this as completed in #14 Dec 16, 2020
@matticbot
Copy link
Contributor

🎉 This issue has been resolved in version 1.1.0-alpha.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@matticbot
Copy link
Contributor

🎉 This issue has been resolved in version 1.1.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants