Make WordPress Core

Opened 6 months ago

Last modified 2 months ago

#64520 new enhancement

Gutenberg assets: show hash in the version footer

Reported by: ellatrix Owned by:
Priority: low Milestone: Awaiting Review
Component: Build/Test Tools Version:
Severity: normal Keywords: has-patch
Cc: Focuses:

Description

It would be cool to show a (short) hash of the Gutenberg checkout in the footer, perhaps with a link to the commit, so you can quickly see what version you're on. I'd only find it useful if it was linked to the version that is build. So if the hash has change but the build hasn't updated yet, it should show the old hash imo.

Attachments (1)

at-a-glance.png (81.6 KB ) - added by desrosj 2 months ago.

Download all attachments as: .zip

Change History (5)

#1 @youknowriad
6 months ago

Great idea :)

There's a .gutenberg-hash file that contains the last hash used to generate the built files. That could serve as the source of truth for that link.

#2 @audrasjb
2 months ago

Removing trunk version as this is not going to be shipped with WP 7.0 but in the next releases.

@desrosj
2 months ago

#3 @desrosj
2 months ago

  • Summary Gutenberg checkout: show hash in the version footerGutenberg assets: show hash in the version footer
  • Version trunk

I agree that this could be helpful to include. In addition to the bottom, at-a-glance.png shows how it could be included in the At a Glance dashboard widget.

However, I'm of the opinion that this should only be displayed if the site is:

  • running a development version
  • has WP_ENVIRONMENT_TYPE set to either local or development (possibly staging).

There's also one thing preventing this, though: the hash used to used to include files maintained in the Gutenberg repository is not included anywhere in the resulting built files. I think the best and only way to include this would be to introduce a new global variable in the wp-includes/versions.php file and update the build process to set the value to same value as gutenberg.sha in package.json.

This ticket was mentioned in PR #11889 on WordPress/wordpress-develop by @sukhendu2002.


2 months ago
#4

  • Keywords has-patch added
Note: See TracTickets for help on using tickets.