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

Link to Prismic pages from the API toolbar #8037

Merged
merged 3 commits into from
May 27, 2022
Merged

Link to Prismic pages from the API toolbar #8037

merged 3 commits into from
May 27, 2022

Conversation

alexwlchan
Copy link
Contributor

Who is this for?

Content editors. Also me.

What is it doing for them?

Making it easier to find where a page is defined in the Prismic web editor, by adding an inferred link to the API toolbar.

Screenshot 2022-05-27 at 14 56 40

This has several shortcomings:

  • Some pages won't have it, in particular ones where we infer the page ID (the homepage, /visit-us, /collections, /stories)
  • It's not 100% guaranteed to be a working URL – it's using a crude heuristic, not anything we get from Prismic itself. In particular I think it might fail for unpublished pages, but those are probably near the top of the list of entries in Prismic.
  • Is it part of the API? Ehhhhhh… but this component is not exactly designed or curated; it's a collection of quick wins to make staff's lives easier rather than a properly-designed component, and this doesn't make it better or worse.

@alexwlchan alexwlchan requested a review from a team May 27, 2022 14:02
@github-actions
Copy link

Size Change: +488 B (0%)

Total Size: 1.12 MB

ℹ️ View Unchanged
Filename Size Change
catalogue/webapp/.next/static/chunks/00a8a139.********************.js 54.3 kB 0 B
catalogue/webapp/.next/static/chunks/321-********************.js 19.2 kB 0 B
catalogue/webapp/.next/static/chunks/33.********************.js 1.84 kB 0 B
catalogue/webapp/.next/static/chunks/682-********************.js 12.5 kB 0 B
catalogue/webapp/.next/static/chunks/735.********************.js 19.3 kB 0 B
catalogue/webapp/.next/static/chunks/813-********************.js 4.34 kB 0 B
catalogue/webapp/.next/static/chunks/814-********************.js 3.04 kB 0 B
catalogue/webapp/.next/static/chunks/819-********************.js 3.73 kB 0 B
catalogue/webapp/.next/static/chunks/907-********************.js 3.19 kB 0 B
catalogue/webapp/.next/static/chunks/916-********************.js 7.05 kB 0 B
catalogue/webapp/.next/static/chunks/956-********************.js 4.88 kB 0 B
catalogue/webapp/.next/static/chunks/997-********************.js 4.1 kB 0 B
catalogue/webapp/.next/static/chunks/framework-********************.js 42.6 kB 0 B
catalogue/webapp/.next/static/chunks/main-********************.js 23.6 kB 0 B
catalogue/webapp/.next/static/chunks/pages/_app-********************.js 129 kB +186 B (0%)
catalogue/webapp/.next/static/chunks/pages/_error-********************.js 319 B 0 B
catalogue/webapp/.next/static/chunks/pages/404-********************.js 261 B 0 B
catalogue/webapp/.next/static/chunks/pages/download-********************.js 6.98 kB 0 B
catalogue/webapp/.next/static/chunks/pages/image-********************.js 3.31 kB 0 B
catalogue/webapp/.next/static/chunks/pages/images-********************.js 5.23 kB 0 B
catalogue/webapp/.next/static/chunks/pages/item-********************.js 4.82 kB 0 B
catalogue/webapp/.next/static/chunks/pages/work-********************.js 21.2 kB 0 B
catalogue/webapp/.next/static/chunks/pages/works-********************.js 3.28 kB 0 B
catalogue/webapp/.next/static/chunks/polyfills-a40ef1678bae11e696dba45124eadd70.js 31 kB 0 B
catalogue/webapp/.next/static/chunks/webpack-********************.js 1.61 kB 0 B
content/webapp/.next/static/chunks/205-********************.js 3.62 kB 0 B
content/webapp/.next/static/chunks/219-********************.js 5.94 kB 0 B
content/webapp/.next/static/chunks/353-********************.js 994 B 0 B
content/webapp/.next/static/chunks/493-********************.js 3.52 kB 0 B
content/webapp/.next/static/chunks/501-********************.js 5.51 kB 0 B
content/webapp/.next/static/chunks/553-********************.js 5.1 kB 0 B
content/webapp/.next/static/chunks/577-********************.js 3.38 kB 0 B
content/webapp/.next/static/chunks/594-********************.js 1.75 kB 0 B
content/webapp/.next/static/chunks/602-********************.js 3.32 kB 0 B
content/webapp/.next/static/chunks/735.********************.js 19.3 kB 0 B
content/webapp/.next/static/chunks/739-********************.js 3.93 kB 0 B
content/webapp/.next/static/chunks/833-********************.js 32.2 kB 0 B
content/webapp/.next/static/chunks/901.********************.js 1.44 kB 0 B
content/webapp/.next/static/chunks/framework-********************.js 42.6 kB 0 B
content/webapp/.next/static/chunks/main-********************.js 23.6 kB 0 B
content/webapp/.next/static/chunks/pages/_app-********************.js 133 kB +157 B (0%)
content/webapp/.next/static/chunks/pages/_error-********************.js 330 B 0 B
content/webapp/.next/static/chunks/pages/404-********************.js 259 B 0 B
content/webapp/.next/static/chunks/pages/article-********************.js 3.92 kB -1 B (0%)
content/webapp/.next/static/chunks/pages/article-series-********************.js 1.99 kB 0 B
content/webapp/.next/static/chunks/pages/articles-********************.js 2.58 kB 0 B
content/webapp/.next/static/chunks/pages/book-********************.js 1.75 kB 0 B
content/webapp/.next/static/chunks/pages/books-********************.js 2.58 kB +1 B (0%)
content/webapp/.next/static/chunks/pages/collections-********************.js 15 kB -1 B (0%)
content/webapp/.next/static/chunks/pages/event-********************.js 6.84 kB +2 B (0%)
content/webapp/.next/static/chunks/pages/event-series-********************.js 1.98 kB -1 B (0%)
content/webapp/.next/static/chunks/pages/events-********************.js 2.75 kB 0 B
content/webapp/.next/static/chunks/pages/exhibition-********************.js 4.47 kB +1 B (0%)
content/webapp/.next/static/chunks/pages/exhibitions-********************.js 2.65 kB +1 B (0%)
content/webapp/.next/static/chunks/pages/guides-********************.js 4.97 kB +1 B (0%)
content/webapp/.next/static/chunks/pages/homepage-********************.js 3.86 kB 0 B
content/webapp/.next/static/chunks/pages/newsletter-********************.js 3.63 kB 0 B
content/webapp/.next/static/chunks/pages/page-********************.js 2.12 kB -1 B (0%)
content/webapp/.next/static/chunks/pages/season-********************.js 1.67 kB +1 B (0%)
content/webapp/.next/static/chunks/pages/stories-********************.js 1.3 kB +3 B (0%)
content/webapp/.next/static/chunks/pages/visit-us-********************.js 2.61 kB 0 B
content/webapp/.next/static/chunks/pages/whats-on-********************.js 5.72 kB -1 B (0%)
content/webapp/.next/static/chunks/polyfills-a40ef1678bae11e696dba45124eadd70.js 31 kB 0 B
content/webapp/.next/static/chunks/webpack-********************.js 1.57 kB 0 B
identity/webapp/.next/static/chunks/357-********************.js 10.7 kB 0 B
identity/webapp/.next/static/chunks/442-********************.js 8.18 kB 0 B
identity/webapp/.next/static/chunks/735.********************.js 19.3 kB 0 B
identity/webapp/.next/static/chunks/framework-********************.js 42.4 kB 0 B
identity/webapp/.next/static/chunks/main-********************.js 23.6 kB 0 B
identity/webapp/.next/static/chunks/pages/_app-********************.js 154 kB +140 B (0%)
identity/webapp/.next/static/chunks/pages/_error-********************.js 193 B 0 B
identity/webapp/.next/static/chunks/pages/delete-requested-********************.js 1.47 kB 0 B
identity/webapp/.next/static/chunks/pages/error-********************.js 1.55 kB 0 B
identity/webapp/.next/static/chunks/pages/index-********************.js 11.5 kB 0 B
identity/webapp/.next/static/chunks/pages/registration-********************.js 4.54 kB 0 B
identity/webapp/.next/static/chunks/pages/validated-********************.js 3.46 kB 0 B
identity/webapp/.next/static/chunks/polyfills-a40ef1678bae11e696dba45124eadd70.js 31 kB 0 B
identity/webapp/.next/static/chunks/webpack-********************.js 1.54 kB 0 B

compressed-size-action

Copy link
Contributor

@gestchild gestchild left a comment

Choose a reason for hiding this comment

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

❇️

@alexwlchan alexwlchan merged commit 05d8d2a into main May 27, 2022
@alexwlchan alexwlchan deleted the prismic-toolbar branch May 27, 2022 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants