Making WordPress.org

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#5151 closed defect (bug) (fixed)

Update Edit link to not include branch for Gutenberg Developer Documentation

Reported by: mkaz's profile mkaz Owned by: coffee2code's profile coffee2code
Milestone: Priority: normal
Component: Handbooks Keywords:
Cc:

Description

The Github Edit link at the top of Gutenberg developer documentation links to the wp/5.4 branch because that is where the docs are coming from.
Example: https://developer.wordpress.org/block-editor/developers/

When a user clicks Edit to make a change, the PR created is against that branch, but we don't want to commit against the branch, but upstream against the master branch.

So ideally we can alter so the Edit button will go against master and not the branch.

I believe the code with the edit link is here:

https://meta.trac.wordpress.org/browser/sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/import-block-editor.php#L190

Change History (8)

This ticket was mentioned in Slack in #docs by mkaz. View the logs.


4 years ago

#2 @coffee2code
4 years ago

  • Owner set to coffee2code
  • Status changed from new to accepted

#3 @ocean90
4 years ago

Linking to the master branch will probably get confusing if content has been removed or moved around in the master branch but still exists in the current release branch.

#4 @mkaz
4 years ago

@ocean90 That is true, but I'm not sure if that is more confusing than creating a PR that can't be merged, especially if the content has changed.

This ticket was mentioned in Slack in #core-editor by mkaz. View the logs.


4 years ago

#6 @coffee2code
4 years ago

In 9763:

Markdown Importer: Add filter 'wporg_markdown_edit_link' to allow filtering of URL used for editing Markdown source.

See #5151.

#7 @coffee2code
4 years ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 9764:

Developer theme: Filter Markdown edit URL for imported block editor handbook pages to point to the source repo's master branch instead of branch for current WP release.

Props mkaz, coffee2code.
Fixes #5151.

#8 @coffee2code
4 years ago

In order to mitigate ocean90's legitimate concern, it'd be worth considering a way to explain to a potential contributor that what they're being linked to is the most current version of the document, which may be different than what they're seeing in the Block Editor handbook.

Of course, a separate ticket for whatever is deemed best would be appropriate.

Note: See TracTickets for help on using tickets.