Repository navigation
Fix integration icons in production #532
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,81 @@ | ||
| <!doctype html> | ||
| <html lang="en" class="dark"> | ||
| <head> | ||
| <meta charset="utf-8" /> | ||
| <title>Integration icon CSS regression test</title> | ||
| <link rel="stylesheet" href="/style.css" /> | ||
| <style> | ||
| #navigation-items button { | ||
| display: flex; | ||
| flex-direction: row-reverse; | ||
| align-items: center; | ||
| gap: 12px; | ||
| width: 320px; | ||
| } | ||
| </style> | ||
| </head> | ||
| <body> | ||
| <nav id="navigation-items"> | ||
| <ul> | ||
| <li> | ||
| <button id="local-icon" type="button"> | ||
| <div><svg width="16" height="16" aria-hidden="true"></svg></div> | ||
| <div><img src="/images/integration-icons/claude.svg" alt="" /></div> | ||
| <div>Local asset URL</div> | ||
| </button> | ||
| </li> | ||
| <li> | ||
| <button id="cdn-icon" type="button"> | ||
| <div><svg width="16" height="16" aria-hidden="true"></svg></div> | ||
| <div> | ||
| <img | ||
| src="https://mintcdn.com/tbd-6fc993ce/example/images/integration-icons/claude.svg?fit=max&auto=format&n=example&q=85&s=example" | ||
| alt="" | ||
| /> | ||
| </div> | ||
| <div>Mintlify CDN URL</div> | ||
| </button> | ||
| </li> | ||
| </ul> | ||
| </nav> | ||
| <pre id="result">Running…</pre> | ||
| <script> | ||
| window.addEventListener("load", () => { | ||
| const inspect = (id) => { | ||
| const button = document.getElementById(id); | ||
| const icon = button.children[1]; | ||
| const label = button.children[2]; | ||
| const image = icon.querySelector("img"); | ||
| const styles = getComputedStyle(image); | ||
|
|
||
| return { | ||
| iconLeft: icon.getBoundingClientRect().left < label.getBoundingClientRect().left, | ||
| width: styles.width, | ||
| height: styles.height, | ||
| opacity: styles.opacity, | ||
| filter: styles.filter, | ||
| }; | ||
| }; | ||
|
|
||
| const results = { | ||
| local: inspect("local-icon"), | ||
| cdn: inspect("cdn-icon"), | ||
| }; | ||
| const expected = (result) => | ||
| result.iconLeft && | ||
| result.width === "14px" && | ||
| result.height === "14px" && | ||
| result.opacity === "0.68" && | ||
| result.filter === "invert(1)"; | ||
| const passed = expected(results.local) && expected(results.cdn); | ||
|
|
||
| document.body.dataset.testStatus = passed ? "passed" : "failed"; | ||
| document.getElementById("result").textContent = JSON.stringify( | ||
| { passed, ...results }, | ||
| null, | ||
| 2, | ||
| ); | ||
| }); | ||
| </script> | ||
| </body> | ||
| </html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Custom integration sidebar icons reintroduced
Medium Severity
This change restores custom
iconvalues on Integrations groups and pages, new assets underimages/integration-icons/, and CSS that sizes, scales, reorders, and dark-mode-inverts those sidebar icons. Integration nav items stay text-only after those icons were reverted.Additional Locations (2)
style.css#L255-L310integrations/1password.mdx#L3-L4Triggered by learned rule: Do not add custom icons to Integrations nav or pages
Reviewed by Cursor Bugbot for commit c528f9b. Configure here.