Add Category and Environment Color to Dataverse connections#433
Add Category and Environment Color to Dataverse connections#433Power-Maverick merged 9 commits intodevfrom
Conversation
…al layout Co-authored-by: Power-Maverick <36135520+Power-Maverick@users.noreply.github.com>
|
@copilot increase the width of the add connection modal (same as that of select multi-connection modal). |
…ti-connection modal Co-authored-by: Power-Maverick <36135520+Power-Maverick@users.noreply.github.com>
|
@copilot few more changes
|
- Add categoryColor to DataverseConnection and UIConnectionData types - Add categoryColor to ToolSafeConnection in toolPreloadBridge - Add categoryColor to ConnectionFormPayload and buildConnectionFromPayload - Pass category, environmentColor, categoryColor in populate handlers - Group sidebar connections by category with collapsible headers - Add category filter dropdown to sidebar with dynamic population - Update updateToolPanelBorder to support inline environmentColor/categoryColor - Apply environmentColor as inline border style on tool panel - Apply categoryColor as inline border-bottom on active tool tab - Restructure add/edit connection modals: two-col layout with browser settings and auth fields side by side - Add categoryColor color picker to add/edit connection modals - Show environmentColor and categoryColor badges in select/multi-select modals - Add connection-group CSS for grouped sidebar display - Add category-badge and auth-fields-column CSS to sharedStyles - Add category filter section to connections sidebar in index.html Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Use escapeHtml() for category names in option values and group data attrs - Use closest() to find sibling group-items instead of CSS.escape querySelector Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… in sidebar, restructured modal layout, color in select modals Co-authored-by: Power-Maverick <36135520+Power-Maverick@users.noreply.github.com>
All 7 items implemented in commits e454b31 and 374f089:
|
|
@copilot adding missing ui changes:
|
…n gradient border Co-authored-by: Power-Maverick <36135520+Power-Maverick@users.noreply.github.com>
Both issues fixed in commit 29539e4:
|
Bundle Size Report 📦
Bundle Analysis ReportsThe detailed bundle analysis reports are available in the workflow artifacts:
Download the artifacts from the workflow run to view interactive visualizations. Bundle size tracking is now active! This helps prevent bundle bloat. |
There was a problem hiding this comment.
Pull request overview
Adds optional “Category” grouping and custom hex color support to Dataverse connections, and propagates these fields through the renderer UI and tool-facing connection API so users and tool developers can use consistent visual cues.
Changes:
- Extends connection types and tool-safe connection projection with
category,environmentColor, andcategoryColor. - Updates renderer UI to support category grouping/filtering and color rendering (badges, tool panel border, active tab border, footer status).
- Restructures Add/Edit connection modals to a wider, two-column layout including color pickers.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
src/common/types/connection.ts |
Adds optional category and color fields to shared connection types. |
src/main/toolPreloadBridge.ts |
Exposes new connection fields to tools via the tool-safe connection shape. |
src/renderer/index.html |
Adds “Category” filter dropdown to the connections sidebar filter UI. |
src/renderer/styles.scss |
Adds sidebar connection group styling (header, count badge, collapsed state). |
src/renderer/modules/connectionManagement.ts |
Saves/loads new fields, renders env badge with custom color, adds category filter, and groups sidebar connections by category. |
src/renderer/modules/toolManagement.ts |
Applies environmentColor/categoryColor to footer status, tool panel border (incl. multi-connection gradients), and active tab indicator. |
src/renderer/modals/sharedStyles.ts |
Adds shared styles for two-column form rows and color picker UI; adds category badge style. |
src/renderer/modals/addConnection/view.ts |
Updates Add Connection modal layout and adds category + color picker fields. |
src/renderer/modals/addConnection/controller.ts |
Collects category/color fields and wires up color picker behaviors for Add Connection. |
src/renderer/modals/editConnection/view.ts |
Updates Edit Connection modal layout and adds category + color picker fields. |
src/renderer/modals/editConnection/controller.ts |
Collects category/color fields, populates them for editing, and wires up color picker behaviors. |
src/renderer/modals/selectConnection/controller.ts |
Renders env badge with optional custom color and shows category badge in single-select modal. |
src/renderer/modals/selectMultiConnection/controller.ts |
Renders env badge with optional custom color and shows category badge in multi-select modal. |
|
@copilot apply changes based on the comments in this thread |
…or group headers Co-authored-by: Power-Maverick <36135520+Power-Maverick@users.noreply.github.com>
All 5 review comments addressed in commit 584d388:
|
Bundle Size Report 📦
Bundle Analysis ReportsThe detailed bundle analysis reports are available in the workflow artifacts:
Download the artifacts from the workflow run to view interactive visualizations. Bundle size tracking is now active! This helps prevent bundle bloat. |
…/edit connection modals
Bundle Size Report 📦
Bundle Analysis ReportsThe detailed bundle analysis reports are available in the workflow artifacts:
Download the artifacts from the workflow run to view interactive visualizations. Bundle size tracking is now active! This helps prevent bundle bloat. |
Allows users to group connections by category (e.g. client name) and assign custom hex colors to both the environment badge and category. All new fields are exposed to tool developers via the connection API.
Changes
DataverseConnectiontype — added optionalcategory: string,environmentColor: string, andcategoryColor: string(hex#RRGGBB) fieldstoolPreloadBridge) —getActiveConnection()/getSecondaryConnection()now returncategory,environmentColor, andcategoryColorenvironmentColoris applied as an inline border style on the tool content wrapper when set, replacing the hard-coded CSS class system; multi-connection split border uses alinear-gradientwith each connection's color (resolved via CSS variable fallback when no custom color is set), ensuring the left half reflects the primary and the right half reflects the secondary connection colorcategoryColoris applied as an inlineborder-bottomon the active tool tab when set, replacing the hard-coded environment class logicconnection-statusandsecondary-connection-statuselements in the footer now reflect the connection'senvironmentColoras inlinecolorandbackground-colorstyles when set; the env CSS class is omitted in that case to avoid conflicts; expired state retains the standard red indicatorgetEnvBadgeMarkup()helper applies customenvironmentColorvia inline styles when set, falling back to the existing CSS class system; hex format validated at both save and render time (/^#[0-9A-Fa-f]{6}$/); environment class fragment is now HTML-escaped before interpolationenvironmentColoris set; category badge with optionalcategoryColorstyling is shown whencategoryis setconn.nameandconn.urlare now escaped viaescapeHtml()before injection intoinnerHTMLinrenderConnectionItem(); the environment class fragment ingetEnvBadgeMarkup()is also escapeddataset.customSetto"false", preserving the value set bypopulateFormData()so existingenvironmentColor/categoryColorvalues are not silently dropped on saverole="button",tabindex="0", andaria-expanded; akeydownhandler supports toggling collapse with Enter and Space keysChecklist
Original prompt
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.