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

Update HTML anchor explaination text #16142

Merged
merged 11 commits into from
Jul 8, 2019
Merged

Conversation

melchoyce
Copy link
Contributor

@melchoyce melchoyce commented Jun 13, 2019

Description

The HTML anchor text was unclear to anyone who didn't already know what HTML anchors are. This PR updates that text to be more user friendly, with copy written by @michelleweber.

See #15306.

Screenshots

Before:
image

After:
image

Issues

  • I'd like to add 1em of space between paragraphs, but there's currently no CSS file for adding new styles to this section. How should I approach this? Okay, this is fixed, but... now there are p's indented into p's.
  • We don't have any HelpHub documentation on HTML anchors, as far as I can tell, which stops us from being able to link to anything right now. WordPress.com has really great docs on this; maybe we could copy them over? https://en.support.wordpress.com/splitting-content/page-jumps/. Is there someone I can ping about this?

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.

@melchoyce melchoyce added the [Block] Heading Affects the Headings Block label Jun 13, 2019
Copy link
Member

@noisysocks noisysocks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested this locally and it's working perfectly! Code looks good—let's just update it to use smart quotes and fix up that placeholder link.

{ __( 'Enter a word or two — without spaces — to make a unique web address just for this heading, called an "anchor." Then, you\'ll be able link directly to this section of your page.' ) }
</p>
<p className="components-base-control__learn-more">
<ExternalLink href={ __( 'https://wordpress.org/support/article/#/' ) }>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This URL doesn't go anywhere useful.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to sub it in for https://wordpress.org/support/article/page-jumps/ now that the page exists

packages/block-editor/src/hooks/anchor.js Outdated Show resolved Hide resolved
packages/block-editor/src/hooks/anchor.js Outdated Show resolved Hide resolved
@atachibana
Copy link
Contributor

I created new pages in HelpHub. Pleas link to this page.
https://wordpress.org/support/article/page-jumps/

Embedded image will be updated after this merge.

melchoyce and others added 2 commits June 20, 2019 04:21
Smart quotes

Co-Authored-By: Robert Anderson <robert@noisysocks.com>
Co-Authored-By: Robert Anderson <robert@noisysocks.com>
@noisysocks noisysocks marked this pull request as ready for review July 4, 2019 23:44
Copy link
Contributor

@tellthemachines tellthemachines left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall, apart from a couple of niggles I left comments about, and the link to docs still needs updating.

help={ __( 'Anchors lets you link directly to a section on a page.' ) }
help={ (
<>
<p>
Copy link
Contributor

@tellthemachines tellthemachines Jul 5, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't love the idea of adding extra markup in order to style the component. It's not a huge amount of work to create a stylesheet for this section (and I volunteer to do it myself if needed), is there any good reason not to though?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feel free to have a play and push to this branch!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

packages/block-editor/src/hooks/anchor.js Outdated Show resolved Hide resolved
@noisysocks noisysocks self-assigned this Jul 5, 2019
@noisysocks noisysocks merged commit d6cd349 into master Jul 8, 2019
@noisysocks noisysocks deleted the update/html-anchor/copy branch July 8, 2019 00:58
@noisysocks
Copy link
Member

Thanks @tellthemachines!

@youknowriad youknowriad added this to the Gutenberg 6.1 milestone Jul 8, 2019
daniloercoli added a commit that referenced this pull request Jul 8, 2019
…rnmobile/track-unsupported-blocks

* 'master' of https://github.com/WordPress/gutenberg:
  Bump plugin version to 6.1.0-rc.1
  Update HTML anchor explaination text (#16142)
  Move post permalink to beneath title on mobile. (#16277)
  Export cloneBlock method to the mobile (#16441)
  Fix inconsistent references to Settings Sidebar (#16138)
  Adds a cache key to the blocks reducer in order to optimize the getBlock selector (#16407)
  Track the parent block to optimize hierarchy selectors (#16392)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Heading Affects the Headings Block
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants