Skip to content

Conversation

cetevolte
Copy link

Elements Default PR Template

In general, make sure you have: (check the boxes to acknowledge you've followed this template)

Summary

This PR enhances the Table of Contents (sidebar) to visually indicate deprecated API endpoints by applying a strikethrough style to their titles.

Why

Currently, the only way to see if an endpoint is deprecated is to click into its detail view. This change improves visibility and helps developers quickly identify deprecated operations from the sidebar.

Changes

  • Propagate the deprecated flag into the TableOfContentsNode data
  • Extend TableOfContentsNode type to include a data.deprecated boolean
  • Add UI logic to apply line-through style when deprecated is true

Related issue

Implements the idea suggested in an existing issue:

“A suggested solution is for example to strikethrough the text on the sidebar to show that it is deprecated.”

image

Other Available PR Templates:

cetevolte added 4 commits May 9, 2025 10:05
… field

This allows the UI to detect whether a node is deprecated and display visual indicators accordingly.
Extracts 'deprecated? from each node’s data and assigns it to the TOC structure so the sidebar can reflect it visually.
@cetevolte cetevolte requested a review from a team as a code owner May 9, 2025 08:40
@cetevolte cetevolte requested a review from Relionnn May 9, 2025 08:40
@cetevolte
Copy link
Author

Hi! 👋
This PR addresses the issue with identifying deprecated endpoints in the sidebar by visually striking through the titles of deprecated operations.
The deprecated flag is now extracted from the operation data and passed into the TableOfContentsNode, and the UI adjusts styling accordingly.

Copy link

netlify bot commented May 9, 2025

Deploy Preview for stoplight-elements-demo ready!

Name Link
🔨 Latest commit 28cc399
🔍 Latest deploy log https://app.netlify.com/sites/stoplight-elements-demo/deploys/6821deb3e01c7500089068b9
😎 Deploy Preview https://deploy-preview-2795--stoplight-elements-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented May 9, 2025

Deploy Preview for stoplight-elements ready!

Name Link
🔨 Latest commit 28cc399
🔍 Latest deploy log https://app.netlify.com/sites/stoplight-elements/deploys/6821deb32c4fb70008035c55
😎 Deploy Preview https://deploy-preview-2795--stoplight-elements.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@cetevolte
Copy link
Author

Hi @Relionnn,
In my local setup ESLint doesn’t show any errors (simple-import-sort/imports passes fine), so I’m not sure what needs to be changed to fix the CI failure.
Let me know if you spot anything specific I should adjust — happy to update it!

Thanks in advance!

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.

1 participant