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

Enhance hook section UI #387

Open
renintw opened this issue Nov 20, 2023 · 5 comments
Open

Enhance hook section UI #387

renintw opened this issue Nov 20, 2023 · 5 comments

Comments

@renintw
Copy link
Contributor

renintw commented Nov 20, 2023

https://developer.wordpress.org/redesign-test/reference/functions/register_post_type/#hooks

  1. The description of a hook looks detached. Let's remove the indentation so it lines up with the code above.

  2. Replace the wrong size anchor link icon with WordPress icon.

Description Updated according to #387 (comment) and #387 (comment)

@renintw renintw added this to the MVP milestone Nov 20, 2023
@jasmussen
Copy link
Collaborator

Hey thanks for the ping. I'm not sure I understand the question, can you clarify it a little bit?

On a separate note, this anchor link icon looks squished:

Screenshot 2023-11-20 at 13 28 16

Looks like there's an icon height property that isn't working as intended:

Screenshot 2023-11-20 at 13 28 37

In general, WordPress icons should always be exactly 24x24px, never scaled except in a few notable exceptions. Let me know if you prefer I open a separate issue for this.

@renintw
Copy link
Contributor Author

renintw commented Nov 20, 2023

Ah, yes, sorry for not describing it clearly enough. Not sure if the image below clarifies it, if not, please let me know. (Ref)

image

@renintw
Copy link
Contributor Author

renintw commented Nov 20, 2023

squished anchor link icon

@jasmussen Seems that the original image was not 24px to begin with and it already looked squished. I've tried to remove the *0.75 from the height that appears on the screenshot you shared, but the icon size didn't change.

original image (24*13)
image
.

@jasmussen
Copy link
Collaborator

Right, thank you for the clarification. Two things going on, it seems:

  • The code is wrapping. Visually it's not a problem, because it's wrapping okay. Could it be a width change that causes the longer word WP_Post_Type to make the line wrap? It'd be worse if just the ) wrapped, for which there's a separate issue.
  • As far as a symbol, can we just remove the indentation so it lines up with the code above?

For the icon, you'r right, but I'm not sure where that icon is from, it looks wrong indeed. Can we use a WordPress icon instead?
Screenshot 2023-11-20 at 13 49 08

@renintw
Copy link
Contributor Author

renintw commented Nov 20, 2023

Could it be a width change that causes the longer word WP_Post_Type to make the line wrap

yeah, it wraps because of the width. I was originally thinking that the text was wrapping too early to the next line, leaving too much empty space on the right. But it seems extending the width to make it a single line looks even stranger. I think it's better to keep it as it is.

And I agree with removing the indentation, it is a good idea. I will do so in the PR for this ticket. Additionally, I'll also replace the correct icon image here, so there's no need to open another ticket for that. I will update the description as well. Thanks!

image

@renintw renintw changed the title Hook section format is off Enhance hook section UI Nov 20, 2023
@adamwoodnz adamwoodnz modified the milestones: MVP, Iteration 1 Dec 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants