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

Block audit: Code #8331

Closed
4 of 6 tasks
sarahmonster opened this issue Jul 31, 2018 · 3 comments
Closed
4 of 6 tasks

Block audit: Code #8331

sarahmonster opened this issue Jul 31, 2018 · 3 comments
Assignees
Labels
[Block] Code Affects the Code Block [Feature] Blocks Overall functionality of blocks [Type] Task Issues or PRs that have been broken down into an individual action to take

Comments

@sarahmonster
Copy link
Member

sarahmonster commented Jul 31, 2018

Note: We'll be doing these audits in waves and editing this as we work through the blocks, so this text will be updated and fleshed out as we progress. See the full picture here.

Overview

screenshot 2018-07-31 19 50 42

Name: Code
Description: Add text that respects your spacing and tabs -- perfect for displaying code.
Category: Formatting
CSS class: wp-block-code in frontend and editor
Can be converted to: nothing

States

Empty:
screenshot 2018-07-31 19 49 54

Selected:
screenshot 2018-07-31 19 51 29

Unselected:
screenshot 2018-07-31 19 51 35

Placeholder:
screenshot 2018-07-31 19 50 54

Primary (toolbar) settings

None

Secondary (sidebar) settings

Advanced: Additional CSS Class

Frontend appearance

Gutenberg starter theme:
screenshot 2018-08-01 12 39 02
screenshot 2018-08-01 12 39 10

Atomic Blocks
screenshot 2018-08-01 12 43 26
screenshot 2018-08-01 12 43 37

twentyseventeen:
screenshot 2018-08-01 12 37 53
screenshot 2018-08-01 12 38 03

twentyten:
screenshot 2018-08-01 12 28 57
screenshot 2018-08-01 12 29 05

Bugs/errors

Individual issues will be opened for these soon

Suggestions

Individual issues will be opened for these soon

@sarahmonster sarahmonster self-assigned this Jul 31, 2018
@sarahmonster sarahmonster added [Type] Task Issues or PRs that have been broken down into an individual action to take [Feature] Blocks Overall functionality of blocks labels Jul 31, 2018
@ZebulanStanphill
Copy link
Member

Nix the double-border. (Sometimes it's triple!)

This bothered me, but for some reason I never bothered to suggest changing it. Thank you. 😛

I was sort of expecting to see a bit more styling here—syntax highlighting would be really nice.

That sounds like a theme thing?

Maybe this should be convertible to preformatted?

I think so.

I suspect this wouldn't work for accessibility reasons, but I suspect people (especially WordPress people) might want to be able to type tabs into the code box.

I certainly would like to be able to use tabs here. The Custom HTML block allows inserting tabs by pressing Tab. You exit the block by pressing Esc and then pressing Tab.

@ZebulanStanphill
Copy link
Member

ZebulanStanphill commented Jul 31, 2018

Also, I think the Edit as HTML option should be available for this block. That would allow you to insert <var>s and other semantic elements or do your own syntax highlighting using <span>s.

See #6672.

@sarahmonster
Copy link
Member Author

All issues here have been filed as individual issues, so I'm going to go ahead and close out this tracking bug. Feel free to comment on if I missed anything, or open new issues as needed! 💪

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Code Affects the Code Block [Feature] Blocks Overall functionality of blocks [Type] Task Issues or PRs that have been broken down into an individual action to take
Projects
None yet
Development

No branches or pull requests

2 participants