Conversation
ea688fc to
6c3c0e7
Compare
6c3c0e7 to
d8ae9a6
Compare
d8ae9a6 to
f6c2cfe
Compare
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the Integrations page to drive content from a JSON configuration and introduces a modal dialog for detailed integration descriptions.
- Introduces
SimpleMarkdownfor basic markdown rendering and modal functionality for integration items. - Replaces hardcoded tab content with dynamic rendering using
integrationConfig. - Adds dynamic style injection for hover effects and updates CSS for responsive images.
Reviewed Changes
Copilot reviewed 2 out of 7 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/pages/integrations.js | Added JSON-driven integration rendering, modal logic, markdown parser, and inline style injection |
| src/css/custom.css | Extended styles for .tab-box img and added .box-linbit color |
Comments suppressed due to low confidence (2)
src/pages/integrations.js:1
- Missing import of React; add
import React from 'react';at the top to ensureReact.useStateandReact.useEffectwork correctly.
import React from 'react';
src/pages/integrations.js:542
- [nitpick] The key 'stack console' contains a space and is inconsistent with other identifiers; consider using a hyphenated or camelCase key for reliability.
},
| const [modalContent, setModalContent] = React.useState({}); | ||
|
|
||
| // Add hover styles and clickable indicators | ||
| React.useEffect(() => { |
There was a problem hiding this comment.
[nitpick] Injecting large CSS blocks via JavaScript can complicate maintenance and cause flash-of-unstyled-content; consider moving these styles into your external CSS file.
| }, | ||
| { | ||
| key: "vmware-nsx", | ||
| title: "Vmware NSX", |
There was a problem hiding this comment.
The product name 'Vmware NSX' has incorrect casing; it should be 'VMware NSX' to match official branding.
| title: "Vmware NSX", | |
| title: "VMware NSX", |
| <div className="modal-overlay" onClick={closeModal} style={{ | ||
| position: 'fixed', | ||
| top: 0, | ||
| left: 0, | ||
| right: 0, | ||
| bottom: 0, | ||
| backgroundColor: 'rgba(0, 0, 0, 0.5)', | ||
| display: 'flex', | ||
| justifyContent: 'center', | ||
| alignItems: 'center', | ||
| zIndex: 1000 | ||
| }}> | ||
| <div className="modal-content" onClick={(e) => e.stopPropagation()} style={{ | ||
| backgroundColor: 'white', | ||
| padding: '2rem', | ||
| borderRadius: '8px', | ||
| maxWidth: '600px', | ||
| width: '90%', | ||
| maxHeight: '80vh', | ||
| overflowY: 'auto', | ||
| boxShadow: '0 4px 6px rgba(0, 0, 0, 0.1)' | ||
| }}> |
There was a problem hiding this comment.
The modal overlay lacks ARIA roles (e.g., role="dialog", aria-modal="true") and focus management; consider using an accessible modal component or enhancing keyboard and screen-reader support.
| <div className="modal-overlay" onClick={closeModal} style={{ | |
| position: 'fixed', | |
| top: 0, | |
| left: 0, | |
| right: 0, | |
| bottom: 0, | |
| backgroundColor: 'rgba(0, 0, 0, 0.5)', | |
| display: 'flex', | |
| justifyContent: 'center', | |
| alignItems: 'center', | |
| zIndex: 1000 | |
| }}> | |
| <div className="modal-content" onClick={(e) => e.stopPropagation()} style={{ | |
| backgroundColor: 'white', | |
| padding: '2rem', | |
| borderRadius: '8px', | |
| maxWidth: '600px', | |
| width: '90%', | |
| maxHeight: '80vh', | |
| overflowY: 'auto', | |
| boxShadow: '0 4px 6px rgba(0, 0, 0, 0.1)' | |
| }}> | |
| <div | |
| className="modal-overlay" | |
| onClick={closeModal} | |
| style={{ | |
| position: 'fixed', | |
| top: 0, | |
| left: 0, | |
| right: 0, | |
| bottom: 0, | |
| backgroundColor: 'rgba(0, 0, 0, 0.5)', | |
| display: 'flex', | |
| justifyContent: 'center', | |
| alignItems: 'center', | |
| zIndex: 1000 | |
| }} | |
| > | |
| <div | |
| className="modal-content" | |
| role="dialog" | |
| aria-modal="true" | |
| aria-labelledby="modal-title" | |
| tabIndex="-1" | |
| ref={modalRef} | |
| onClick={(e) => e.stopPropagation()} | |
| style={{ | |
| backgroundColor: 'white', | |
| padding: '2rem', | |
| borderRadius: '8px', | |
| maxWidth: '600px', | |
| width: '90%', | |
| maxHeight: '80vh', | |
| overflowY: 'auto', | |
| boxShadow: '0 4px 6px rgba(0, 0, 0, 0.1)' | |
| }} | |
| > |
This PR adds new entries in Integrations page and also some new features around it. When you click on the image for an integration, it will now open a modal with a description.
Also refactored the code to generate the integration entries using a JSON object.