Skip to content

Conversation

@jamiehenson
Copy link
Member

@jamiehenson jamiehenson commented Dec 12, 2025

The ticket namesake for this PR is FTF-426, which reintroduces the external link icon to links in the left nav which go off-site.

Additionally, the PR includes the following items as rapid hotfixes to the launch of the new nav:

  • fixes an issue raised by @VeskeR whereby the inkeep form rerendered on top of itself multiple times when pressing "Cmd+K" (now it's just the once, in default Search mode)
  • rips out a bunch of old, unused SearchBar component logic and nav config
  • adds a "Markdown" section to the PageHeader including links to both view and copy the related page markdown content (made possible now via [WEB-4447] Add MDX to Markdown transpilation with content negotiation #3000)
Screenshot 2025-12-12 at 14 31 53
  • includes intro frontmatter in generated markdown content as a paragraph
  • actually hooks up the logout button to log the user out, whereas before it was an overlooked stub
  • when navigating between pages, the leftsidebar scrolls to the relevant item. Issue is that this also affected the main page scrolling - no more

To test, go on the review app and:

  • expand the left nav and expand Spaces > API References. The link within should have an external icon, and it should open in a new tab
  • press cmd+k, you should only get one inkeep form
  • look at any page, you should get a "Markdown" section in the page header, and the view and copy buttons should work as expected
  • in the generated markdown, we should have the intro frontmatter (might be hard to test, not sure which pages currently have an intro)
  • navigate between pages using the left nav, ensure that the main page scrolling is not impacted
  • for the logout button, hard to test, but the logic is fairly standard and it's better than the current state

@coderabbitai
Copy link

coderabbitai bot commented Dec 12, 2025

Important

Review skipped

Auto reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch ftf-426-external-icon

Comment @coderabbitai help to get the list of available commands and usage tips.

@jamiehenson jamiehenson added the review-app Create a Heroku review app label Dec 12, 2025
@ably-ci ably-ci temporarily deployed to ably-docs-ftf-426-exter-lfvs3o December 12, 2025 14:30 Inactive
@jamiehenson jamiehenson force-pushed the ftf-426-external-icon branch from f21a3ae to 2742567 Compare December 12, 2025 14:31
@jamiehenson jamiehenson temporarily deployed to ably-docs-ftf-426-exter-lfvs3o December 12, 2025 14:31 Inactive
@jamiehenson jamiehenson temporarily deployed to ably-docs-ftf-426-exter-lfvs3o December 12, 2025 14:41 Inactive
@jamiehenson jamiehenson changed the title [FTF-426] Post-nav launch fixes, including reintroduction of external link icon [FTF-426] Post-nav launch fixes Dec 12, 2025
@jamiehenson jamiehenson force-pushed the ftf-426-external-icon branch from dd8112a to 8115a37 Compare December 12, 2025 14:48
@jamiehenson jamiehenson temporarily deployed to ably-docs-ftf-426-exter-lfvs3o December 12, 2025 14:49 Inactive
import { DEFAULT_LANGUAGE } from './constants';
import { writeRedirectToConfigFile, getRedirectCount } from './writeRedirectToConfigFile';
import { siteMetadata } from '../../gatsby-config';
import { GatsbyNode, Reporter } from 'gatsby';
Copy link
Member Author

Choose a reason for hiding this comment

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

This wasn't used

contentOrderedList,
contentMenu: contentMenuObject,
script,
layout: { leftSidebar: true, rightSidebar: true, searchBar: true, template: 'base' },
Copy link
Member Author

Choose a reason for hiding this comment

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

searchBar no longer used


// Stage 9: Prepend title as markdown heading
const finalContent = `# ${title}\n\n${content}`;
const finalContent = `# ${title}\n\n${intro ? `${intro}\n\n` : ''}${content}`;
Copy link
Member Author

Choose a reason for hiding this comment

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

All other changes here are prettier - this is the key change.

const handleLogout = useCallback(async () => {
if (sessionState.logOut.href && sessionState.logOut.token) {
try {
await fetch(sessionState.logOut.href, {
Copy link
Member Author

Choose a reason for hiding this comment

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

Replicates the hidden form approach of logging out elsewhere

behavior: 'smooth',
block: 'center',
});
const element = activeTriggerRef.current;
Copy link
Member Author

Choose a reason for hiding this comment

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

Instead of scrollIntoView, which takes the whole page, localise the scrolling to a particular container housing the nav

@jamiehenson jamiehenson force-pushed the ftf-426-external-icon branch from 8115a37 to 33ca7c8 Compare December 12, 2025 15:01
@jamiehenson jamiehenson temporarily deployed to ably-docs-ftf-426-exter-lfvs3o December 12, 2025 15:01 Inactive
Copy link
Member

@kennethkalmer kennethkalmer left a comment

Choose a reason for hiding this comment

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

Initial feedback, I'm reconfiguring the review app to have inkeep enabled

Multi-line JSX comment
with multiple lines
*/}
{/_
Copy link
Member

Choose a reason for hiding this comment

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

[question] unexpected changes from Prettier?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yep, Prettier butchered it. I've ignored this file in the config for now, and will review from here how it does with other MDX files (didn't want to disable it wholesale for MDX files)

)}
tabIndex={-1}
{...(page.external && {
target: '_blank',
Copy link
Member

Choose a reason for hiding this comment

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

[observation] the Spaces > API References > JavaScript link has the icon, but it doesn't open a in a new window 🤔

Copy link
Member Author

Choose a reason for hiding this comment

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

Sorry, I did the classic "request review but notice an issue and push after it", this should be in place now

Copy link
Member

Choose a reason for hiding this comment

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

aka Fridays

@kennethkalmer kennethkalmer temporarily deployed to ably-docs-ftf-426-exter-lfvs3o December 12, 2025 15:12 Inactive
@kennethkalmer
Copy link
Member

@jamiehenson it looks great btw, apologies for the terse comment earlier

@jamiehenson jamiehenson force-pushed the ftf-426-external-icon branch from 33ca7c8 to 52eca7d Compare December 12, 2025 15:16
@jamiehenson jamiehenson temporarily deployed to ably-docs-ftf-426-exter-lfvs3o December 12, 2025 15:16 Inactive
@jamiehenson jamiehenson force-pushed the ftf-426-external-icon branch from 52eca7d to 4e40cf6 Compare December 12, 2025 15:28
@jamiehenson jamiehenson temporarily deployed to ably-docs-ftf-426-exter-lfvs3o December 12, 2025 15:28 Inactive
@jamiehenson jamiehenson force-pushed the ftf-426-external-icon branch from 4e40cf6 to 78afeab Compare December 12, 2025 15:29
@jamiehenson jamiehenson temporarily deployed to ably-docs-ftf-426-exter-lfvs3o December 12, 2025 15:30 Inactive
@jamiehenson
Copy link
Member Author

@jamiehenson it looks great btw, apologies for the terse comment earlier

Unaware of the comment, but thanks! Ready for another round

Copy link
Member

@kennethkalmer kennethkalmer left a comment

Choose a reason for hiding this comment

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

Thing of beauty

}

const content = await response.text();
await navigator.clipboard.writeText(content);
Copy link
Member

Choose a reason for hiding this comment

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

Sadly in Safari this doesn't work, I get NotAllowedError: The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission logged in the console. That said I think that can be a separate fix as it works in Firefox

Copy link
Member Author

Choose a reason for hiding this comment

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

Apple tax

Copy link
Member

Choose a reason for hiding this comment

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

We have to pay for the peace offering one way or another 🙄

Copy link
Member Author

Choose a reason for hiding this comment

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

@jamiehenson jamiehenson merged commit 350ef73 into main Dec 12, 2025
7 checks passed
@jamiehenson jamiehenson deleted the ftf-426-external-icon branch December 12, 2025 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review-app Create a Heroku review app

Development

Successfully merging this pull request may close these issues.

4 participants