Skip to content

style: enhance syntax highlighting in GQL Docs and Doc Gen#6640

Merged
bijin-bruno merged 3 commits intomainfrom
feat/docgen-and-gqldocs-theming
Jan 2, 2026
Merged

style: enhance syntax highlighting in GQL Docs and Doc Gen#6640
bijin-bruno merged 3 commits intomainfrom
feat/docgen-and-gqldocs-theming

Conversation

@helloanoop
Copy link
Contributor

@helloanoop helloanoop commented Jan 2, 2026

Enhance syntax highlighting in GQL Docs and Doc Gen

Summary by CodeRabbit

  • New Features

    • Documentation export now produces standalone HTML files with a refreshed generation UI and clear success/error feedback; shows a modal if a collection is missing.
  • Style

    • Unified, theme-driven syntax highlighting across editor themes and explicit valid/invalid variable colors.
    • Updated GraphQL docs explorer theming (colors, borders, hover states).
    • Refined documentation UI typography and warning text; editor/toolbars adopt modal background and streamlined spacing.
    • Smaller copy-to-clipboard icon.

✏️ Tip: You can customize this high-level summary in your review settings.

Copilot AI review requested due to automatic review settings January 2, 2026 16:47
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 2, 2026

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Walkthrough

Centralizes CodeMirror token colors into theme-driven rules, adds GraphQL docs theming, refactors several StyledWrappers for modal/editor visuals, and fully rewrites GenerateDocumentation to a hook-driven HTML/YAML generation flow with CDN assets and a collection-not-found UI path.

Changes

Cohort / File(s) Summary
CodeMirror Token Theming
packages/bruno-app/src/components/RequestPane/QueryEditor/StyledWrapper.js
Consolidates hard-coded monokai/default color blocks into theme-driven selectors for .cm-s-default and .cm-s-monokai, mapping token classes to props.theme.codemirror.tokens.* and adding cm-variable-valid / cm-variable-invalid.
GraphQL Docs Theming
packages/bruno-app/src/components/RequestTabPanel/StyledWrapper.js
Adds theme-based color overrides and style rules for GraphQL docs explorer UI (.doc-explorer-rhs and related selectors): text, borders, backgrounds, hover/focus states (styling-only).
GenerateDocumentation Styling Refactor
packages/bruno-app/src/components/Sidebar/Collections/Collection/GenerateDocumentation/StyledWrapper.js
Replaces .info-card/.note-section with .content/.title/.description, introduces .features and .check-icon, adds .note/.text-warning, adjusts typography and line-height.
GenerateDocumentation Component Overhaul
packages/bruno-app/src/components/Sidebar/Collections/Collection/GenerateDocumentation/index.js
Reimplements component with hooks (useSelector, useMemo, useCallback), adds helpers (transformCollectionToSaveToExportAsFile, buildHtmlDocument, escapeForTemplate), uses CDN assets, adds CollectionNotFound path, generates HTML embedding YAML, saves sanitized file, and updates modal UI and toasts.
Modal / CodeView UI tweaks
packages/bruno-app/src/components/Sidebar/.../CodeView/StyledWrapper.js, .../CodeView/index.js, .../CodeViewToolbar/StyledWrapper.js, .../GenerateCodeItem/StyledWrapper.js
Switches editor/backgrounds to theme.modal.bg / transparent, removes borders, adjusts gutters, reduces copy icon size, removes toolbar padding and border—visual/styling changes only.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant UI as GenerateDocumentation (Modal)
    participant Store as Redux Store
    participant Transformer as transformCollectionToSaveToExportAsFile
    participant Builder as buildHtmlDocument
    participant FS as FileSaver
    participant Toast as Toast Notifier

    User->>UI: Open modal / Click "Generate"
    UI->>Store: findCollectionByUid(collectionUid)
    Store-->>UI: collection data or null
    alt collection not found
        UI->>User: render CollectionNotFound modal
    else collection found
        UI->>UI: compute loading state (useMemo)
        alt loading
            UI->>User: show loading indicator
        else ready
            User->>UI: Confirm generation
            UI->>Transformer: transform collection → YAML/asset bundle
            Transformer-->>Builder: YAML + metadata
            Builder->>Builder: buildHtmlDocument (escape content, inject CDN refs)
            Builder-->>UI: generated HTML blob
            UI->>FS: saveAs(generated HTML, sanitizedName)
            FS-->>UI: saved confirmation
            UI->>Toast: show success toast
            Toast-->>User: display success
        end
    end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

  • PR #6583 — Edits the same GenerateDocumentation component and StyledWrapper; likely overlapping UI/logic changes.
  • PR #6633 — Modifies CodeMirror styling for validation/error colors in RequestPane, closely related to token theming changes.
  • PR #6616 — Introduces theme token definitions for CodeMirror that these styling changes depend on.

Suggested reviewers

  • lohit-bruno
  • naman-bruno
  • bijin-bruno

Poem

Theme-tuned tokens hum in line,
YAML folds into HTML fine,
CDN winds whisper assets near,
A modal clicks — the docs appear,
Small styles, big applause 🎉

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main changes: theme-driven styling enhancements for GraphQL Docs and Doc Gen components, with improved syntax highlighting via CodeMirror token mapping.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR enhances syntax highlighting in GraphQL documentation and the Documentation Generator by migrating from hardcoded color values to theme-based color tokens. The changes improve consistency, maintainability, and support for theming across the application.

Key Changes:

  • Refactored the Generate Documentation component for better code organization with extracted helper functions and proper React hooks usage
  • Replaced hardcoded color values with theme token references (props.theme.codemirror.tokens.*) for CodeMirror syntax highlighting
  • Added comprehensive GraphQL documentation styling overrides using theme properties

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
packages/bruno-app/src/components/Sidebar/Collections/Collection/GenerateDocumentation/index.js Major refactor: extracted helper functions, improved component structure with hooks (useCallback/useMemo), and enhanced UI with better layout and messaging
packages/bruno-app/src/components/Sidebar/Collections/Collection/GenerateDocumentation/StyledWrapper.js Simplified styling by removing unused rgba import and consolidating styles; switched from card-based layout to cleaner content-based styling
packages/bruno-app/src/components/RequestTabPanel/StyledWrapper.js Added extensive GraphQL docs color overrides for consistent theming including syntax elements, search UI, and deprecation warnings
packages/bruno-app/src/components/RequestPane/QueryEditor/StyledWrapper.js Consolidated duplicate syntax highlighting rules and migrated all hardcoded colors to theme tokens for better theme support

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

display: flex;
}

// GraphQL docs color overrides
Copy link

Copilot AI Jan 2, 2026

Choose a reason for hiding this comment

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

This comment uses JavaScript syntax (//) inside a CSS template literal. It should use CSS comment syntax (/* */) instead. JavaScript-style comments can cause parsing issues in styled-components.

Suggested change
// GraphQL docs color overrides
/* GraphQL docs color overrides */

Copilot uses AI. Check for mistakes.
color: ${(props) => props.theme.codemirror.variable.invalid};
}


Copy link

Copilot AI Jan 2, 2026

Choose a reason for hiding this comment

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

Extra blank line that appears to be unnecessary. This adds inconsistent spacing in the stylesheet.

Suggested change

Copilot uses AI. Check for mistakes.
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (2)
packages/bruno-app/src/components/RequestPane/QueryEditor/StyledWrapper.js (1)

61-67: Consider moving validation colors to the theme.

These hard-coded hex values (#5fad89, #d17b7b) diverge from the theme-driven approach used elsewhere in this file. Based on learnings, styled-components should use props.theme for colors.

🔎 Suggested refactor
   /* Variable validation colors */
   .cm-variable-valid {
-    color: #5fad89 !important; /* Soft sage */
+    color: ${(props) => props.theme.codemirror.validation?.valid ?? '#5fad89'} !important;
   }
   .cm-variable-invalid {
-    color: #d17b7b !important; /* Soft coral */
+    color: ${(props) => props.theme.codemirror.validation?.invalid ?? '#d17b7b'} !important;
   }

This keeps fallback values while enabling theme customization. Adjust the theme path to match your theme structure.

packages/bruno-app/src/components/Sidebar/Collections/Collection/GenerateDocumentation/index.js (1)

17-17: Consider moving CDN URL to environment configuration.

The CDN is accessible and working correctly. However, this hardcoded URL differs from the project's pattern of using environment variables for external endpoints (e.g., BRUNO_INFO_ENDPOINT). Move CDN_BASE_URL to .env.production for consistency and flexibility across environments.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2d76c44 and ea202be.

📒 Files selected for processing (4)
  • packages/bruno-app/src/components/RequestPane/QueryEditor/StyledWrapper.js
  • packages/bruno-app/src/components/RequestTabPanel/StyledWrapper.js
  • packages/bruno-app/src/components/Sidebar/Collections/Collection/GenerateDocumentation/StyledWrapper.js
  • packages/bruno-app/src/components/Sidebar/Collections/Collection/GenerateDocumentation/index.js
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{js,jsx,ts,tsx}

📄 CodeRabbit inference engine (CODING_STANDARDS.md)

**/*.{js,jsx,ts,tsx}: Use 2 spaces for indentation. No tabs, just spaces
Stick to single quotes for strings. For JSX/TSX attributes, use double quotes (e.g., )
Always add semicolons at the end of statements
No trailing commas
Always use parentheses around parameters in arrow functions, even for single params
For multiline constructs, put opening braces on the same line, and ensure consistency. Minimum 2 elements for multiline
No newlines inside function parentheses
Space before and after the arrow in arrow functions. () => {} is good
No space between function name and parentheses. func() not func ()
Semicolons go at the end of the line, not on a new line
Names for functions need to be concise and descriptive
Add in JSDoc comments to add more details to the abstractions if needed
Add in meaningful comments instead of obvious ones where complex code flow is explained properly

Files:

  • packages/bruno-app/src/components/RequestTabPanel/StyledWrapper.js
  • packages/bruno-app/src/components/Sidebar/Collections/Collection/GenerateDocumentation/index.js
  • packages/bruno-app/src/components/Sidebar/Collections/Collection/GenerateDocumentation/StyledWrapper.js
  • packages/bruno-app/src/components/RequestPane/QueryEditor/StyledWrapper.js
🧠 Learnings (5)
📓 Common learnings
Learnt from: CR
Repo: usebruno/bruno PR: 0
File: CODING_STANDARDS.md:0-0
Timestamp: 2025-12-05T20:31:33.005Z
Learning: Applies to **/*.{jsx,tsx} : Use styled component's theme prop to manage CSS colors and not CSS variables when in the context of a styled component or any React component using the styled component
📚 Learning: 2025-12-05T20:31:33.005Z
Learnt from: CR
Repo: usebruno/bruno PR: 0
File: CODING_STANDARDS.md:0-0
Timestamp: 2025-12-05T20:31:33.005Z
Learning: Applies to **/*.{jsx,tsx} : Use styled component's theme prop to manage CSS colors and not CSS variables when in the context of a styled component or any React component using the styled component

Applied to files:

  • packages/bruno-app/src/components/RequestTabPanel/StyledWrapper.js
  • packages/bruno-app/src/components/Sidebar/Collections/Collection/GenerateDocumentation/StyledWrapper.js
  • packages/bruno-app/src/components/RequestPane/QueryEditor/StyledWrapper.js
📚 Learning: 2025-12-05T20:31:33.005Z
Learnt from: CR
Repo: usebruno/bruno PR: 0
File: CODING_STANDARDS.md:0-0
Timestamp: 2025-12-05T20:31:33.005Z
Learning: Applies to **/*.{jsx,tsx} : Styled Component CSS might also change layout but Tailwind classes shouldn't define colors

Applied to files:

  • packages/bruno-app/src/components/RequestTabPanel/StyledWrapper.js
  • packages/bruno-app/src/components/Sidebar/Collections/Collection/GenerateDocumentation/StyledWrapper.js
  • packages/bruno-app/src/components/RequestPane/QueryEditor/StyledWrapper.js
📚 Learning: 2025-12-05T20:31:33.005Z
Learnt from: CR
Repo: usebruno/bruno PR: 0
File: CODING_STANDARDS.md:0-0
Timestamp: 2025-12-05T20:31:33.005Z
Learning: Applies to **/*.{jsx,tsx} : Styled Components are used as wrappers to define both self and children components style; Tailwind classes are used specifically for layout based styles

Applied to files:

  • packages/bruno-app/src/components/RequestTabPanel/StyledWrapper.js
  • packages/bruno-app/src/components/Sidebar/Collections/Collection/GenerateDocumentation/StyledWrapper.js
  • packages/bruno-app/src/components/RequestPane/QueryEditor/StyledWrapper.js
📚 Learning: 2025-12-17T21:41:24.730Z
Learnt from: naman-bruno
Repo: usebruno/bruno PR: 6407
File: packages/bruno-app/src/components/Environments/ConfirmCloseEnvironment/index.js:5-41
Timestamp: 2025-12-17T21:41:24.730Z
Learning: Do not suggest PropTypes validation for React components in the Bruno codebase. The project does not use PropTypes, so reviews should avoid proposing PropTypes and rely on the existing typing/validation approach (e.g., TypeScript or alternative runtime checks) if applicable. This guideline applies broadly to all JavaScript/JSX components in the repo.

Applied to files:

  • packages/bruno-app/src/components/RequestTabPanel/StyledWrapper.js
  • packages/bruno-app/src/components/Sidebar/Collections/Collection/GenerateDocumentation/index.js
  • packages/bruno-app/src/components/Sidebar/Collections/Collection/GenerateDocumentation/StyledWrapper.js
  • packages/bruno-app/src/components/RequestPane/QueryEditor/StyledWrapper.js
🔇 Additional comments (8)
packages/bruno-app/src/components/RequestTabPanel/StyledWrapper.js (1)

99-185: Well-structured GraphQL docs theming.

Clean implementation using theme props throughout. The token coloring aligns with the CodeMirror theming approach in the sibling file, maintaining consistency across the app. Based on learnings, using props.theme for colors in styled-components is the correct approach here.

packages/bruno-app/src/components/RequestPane/QueryEditor/StyledWrapper.js (1)

25-59: Nice consolidation of CodeMirror token theming.

Good refactor combining both .cm-s-default and .cm-s-monokai under a single rule set with theme-driven colors. This eliminates duplication and ensures consistent theming across editor modes.

packages/bruno-app/src/components/Sidebar/Collections/Collection/GenerateDocumentation/StyledWrapper.js (1)

3-38: Clean styling refactor.

Good simplification of the structure. All colors correctly use theme props, and the hierarchy is clear. The removal of polished dependency for rgba is a sensible cleanup.

packages/bruno-app/src/components/Sidebar/Collections/Collection/GenerateDocumentation/index.js (5)

25-26: Escaping logic looks correct but verify edge cases.

The function handles backslashes, backticks, and dollar signs for safe template literal embedding. However, ensure YAML content won't contain sequences that could break out of the template literal context after escaping (e.g., \n becoming a literal newline).


28-52: HTML template construction is sound.

The structure is clean. Note that collectionName is escaped via escapeHtml at the call site (line 99), and yamlContent goes through escapeForTemplate. The inline script initialization pattern is standard for self-contained HTML docs.


54-63: CollectionNotFound handles the edge case appropriately.

Good defensive UI for missing collections. The modal provides clear messaging without crashing the app.


65-116: Solid hook-based refactor.

Good use of useSelector with findCollectionByUid, useMemo for derived loading state, and useCallback for the generate action with proper dependencies. Error handling with try/catch and toast notifications is appropriate.

One minor note: cloneDeep on line 78 is necessary since the transform mutates the collection—good defensive practice.


118-162: Clean conditional rendering and UI structure.

Loading state handling and feature list rendering are well-implemented. The layout uses Tailwind for structure (correct per coding standards) while colors come from StyledWrapper (also correct).

Minor: Line 136 uses mt-2 and font-medium Tailwind classes for layout/typography, which aligns with guidelines.

@github-actions
Copy link

github-actions bot commented Jan 2, 2026

CLI Test Results

  1 files  ±0  140 suites  ±0   47s ⏱️ -9s
235 tests ±0  235 ✅ ±0  0 💤 ±0  0 ❌ ±0 
301 runs  ±0  300 ✅ ±0  1 💤 ±0  0 ❌ ±0 

Results for commit 3dee277. ± Comparison against base commit 2d76c44.

♻️ This comment has been updated with latest results.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/GenerateCodeItem/CodeView/StyledWrapper.js (1)

13-16: Consider removing redundant background declaration.

Line 13 sets background: ${(props) => props.theme.modal.bg}, but line 16 immediately overrides it with transparent !important. The first declaration appears redundant—consider removing line 13 to simplify the code.

🔎 Proposed simplification
     .CodeMirror {
       height: 100%;
       font-size: ${(props) => props.theme.font.size.sm};
-      background: ${(props) => props.theme.modal.bg};
       line-height: 1.5;
       padding: 0;
       background: transparent !important;
       border: none;
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f479a92 and 3dee277.

📒 Files selected for processing (4)
  • packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/GenerateCodeItem/CodeView/StyledWrapper.js
  • packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/GenerateCodeItem/CodeView/index.js
  • packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/GenerateCodeItem/CodeViewToolbar/StyledWrapper.js
  • packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/GenerateCodeItem/StyledWrapper.js
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{js,jsx,ts,tsx}

📄 CodeRabbit inference engine (CODING_STANDARDS.md)

**/*.{js,jsx,ts,tsx}: Use 2 spaces for indentation. No tabs, just spaces
Stick to single quotes for strings. For JSX/TSX attributes, use double quotes (e.g., )
Always add semicolons at the end of statements
No trailing commas
Always use parentheses around parameters in arrow functions, even for single params
For multiline constructs, put opening braces on the same line, and ensure consistency. Minimum 2 elements for multiline
No newlines inside function parentheses
Space before and after the arrow in arrow functions. () => {} is good
No space between function name and parentheses. func() not func ()
Semicolons go at the end of the line, not on a new line
Names for functions need to be concise and descriptive
Add in JSDoc comments to add more details to the abstractions if needed
Add in meaningful comments instead of obvious ones where complex code flow is explained properly

Files:

  • packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/GenerateCodeItem/CodeView/StyledWrapper.js
  • packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/GenerateCodeItem/StyledWrapper.js
  • packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/GenerateCodeItem/CodeView/index.js
  • packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/GenerateCodeItem/CodeViewToolbar/StyledWrapper.js
🧠 Learnings (6)
📓 Common learnings
Learnt from: CR
Repo: usebruno/bruno PR: 0
File: CODING_STANDARDS.md:0-0
Timestamp: 2025-12-05T20:31:33.005Z
Learning: Applies to **/*.{jsx,tsx} : Use styled component's theme prop to manage CSS colors and not CSS variables when in the context of a styled component or any React component using the styled component
📚 Learning: 2025-12-05T20:31:33.005Z
Learnt from: CR
Repo: usebruno/bruno PR: 0
File: CODING_STANDARDS.md:0-0
Timestamp: 2025-12-05T20:31:33.005Z
Learning: Applies to **/*.{jsx,tsx} : Styled Component CSS might also change layout but Tailwind classes shouldn't define colors

Applied to files:

  • packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/GenerateCodeItem/CodeView/StyledWrapper.js
  • packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/GenerateCodeItem/StyledWrapper.js
  • packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/GenerateCodeItem/CodeViewToolbar/StyledWrapper.js
📚 Learning: 2025-12-05T20:31:33.005Z
Learnt from: CR
Repo: usebruno/bruno PR: 0
File: CODING_STANDARDS.md:0-0
Timestamp: 2025-12-05T20:31:33.005Z
Learning: Applies to **/*.{jsx,tsx} : Styled Components are used as wrappers to define both self and children components style; Tailwind classes are used specifically for layout based styles

Applied to files:

  • packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/GenerateCodeItem/CodeView/StyledWrapper.js
  • packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/GenerateCodeItem/StyledWrapper.js
  • packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/GenerateCodeItem/CodeViewToolbar/StyledWrapper.js
📚 Learning: 2025-12-05T20:31:33.005Z
Learnt from: CR
Repo: usebruno/bruno PR: 0
File: CODING_STANDARDS.md:0-0
Timestamp: 2025-12-05T20:31:33.005Z
Learning: Applies to **/*.{jsx,tsx} : Use styled component's theme prop to manage CSS colors and not CSS variables when in the context of a styled component or any React component using the styled component

Applied to files:

  • packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/GenerateCodeItem/CodeView/StyledWrapper.js
  • packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/GenerateCodeItem/StyledWrapper.js
📚 Learning: 2025-12-17T21:41:24.730Z
Learnt from: naman-bruno
Repo: usebruno/bruno PR: 6407
File: packages/bruno-app/src/components/Environments/ConfirmCloseEnvironment/index.js:5-41
Timestamp: 2025-12-17T21:41:24.730Z
Learning: Do not suggest PropTypes validation for React components in the Bruno codebase. The project does not use PropTypes, so reviews should avoid proposing PropTypes and rely on the existing typing/validation approach (e.g., TypeScript or alternative runtime checks) if applicable. This guideline applies broadly to all JavaScript/JSX components in the repo.

Applied to files:

  • packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/GenerateCodeItem/CodeView/StyledWrapper.js
  • packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/GenerateCodeItem/StyledWrapper.js
  • packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/GenerateCodeItem/CodeView/index.js
  • packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/GenerateCodeItem/CodeViewToolbar/StyledWrapper.js
📚 Learning: 2025-12-02T09:45:31.709Z
Learnt from: sid-bruno
Repo: usebruno/bruno PR: 6266
File: packages/bruno-app/src/components/ResponsePane/ResponseCopy/index.js:38-38
Timestamp: 2025-12-02T09:45:31.709Z
Learning: In the ResponseCopy component (packages/bruno-app/src/components/ResponsePane/ResponseCopy/index.js), the copy button is intentionally disabled using `!response.data` to prevent copying stream resets which result in empty strings.

Applied to files:

  • packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/GenerateCodeItem/CodeView/index.js
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
  • GitHub Check: Playwright E2E Tests
  • GitHub Check: Unit Tests
  • GitHub Check: SSL Tests - Windows
  • GitHub Check: SSL Tests - macOS
  • GitHub Check: SSL Tests - Linux
🔇 Additional comments (5)
packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/GenerateCodeItem/CodeView/index.js (1)

50-50: LGTM! Icon size reduction aligns with modal theming.

The smaller copy icon size (20 vs 25) fits better with the refined modal-based UI styling introduced in this PR.

packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/GenerateCodeItem/StyledWrapper.js (1)

7-21: LGTM! Modal theming and layout adjustments are well-structured.

The transition to theme.modal.bg and the addition of min-height: 0 on the flex child are consistent with the PR's modal-based theming approach. The spacing adjustment with margin-top: 0.5rem provides appropriate visual separation.

packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/GenerateCodeItem/CodeViewToolbar/StyledWrapper.js (2)

8-8: LGTM! Background change aligns with modal theming.

The switch to theme.modal.bg is consistent with the broader UI theming updates in this PR.


46-47: LGTM! Base reset with explicit focus styles.

Setting outline: none and box-shadow: none at the base level, then explicitly providing focus indication via the :focus rule (lines 54-56) is a valid pattern that maintains accessibility.

packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/GenerateCodeItem/CodeView/StyledWrapper.js (1)

17-21: LGTM! Border removal and transparent gutters create seamless modal UI.

The removal of borders and the transparent gutter background align well with the modal-based theming approach, creating a cleaner, more integrated editor appearance.

@bijin-bruno bijin-bruno merged commit 4757078 into main Jan 2, 2026
9 checks passed
bijin-bruno added a commit that referenced this pull request Feb 13, 2026
* fix: use themes within protobuf section (#6575)

* fix: use themes within protobuf section

* chore: fix font weight for protobuf settings

---------

Co-authored-by: Bijin A B <bijin@usebruno.com>

* fix: radios buttons to use primary color (#6576)

* fix: cookie modal theme (#6580)

* fix: cookie modal theme

* update toggle switch to use primary color

* style: enhance theme dropdown and security settings with improved styles and active indicators (#6582)

* style: enhance CodeMirror dropdown styles with theme integration  (#6577)

* style: enhance CodeMirror dropdown styles with theme integration for improved consistency

* style: refine dropdown and CodeMirror hint styles for improved consistency and usability

* style: clean up scrollbar and CodeMirror hint styles for improved readability

* remove max height for keybinding table (#6586)

* fix: Add New Request CTA alignment in tabs (#6584)

* fix: Add New Request CTA alignment in tabs
- Moved the '+' icon before the chevron to maintain alignment once chevrons appear
- Added padding to the '+' icon for better spacing.

* refactor: streamline New Request button rendering in RequestTabs component

- Simplified the rendering logic for the New Request button by removing unnecessary conditional wrappers.
- Ensured the button remains functional and maintains its styling within the tab layout.

* chore: update delete confirmation modals to use danger button color (#6589)

* refactor: remove size prop from Button components for consistency across modals and improve styling

* style: update confirm button colors in modal components for consistency

* fix: oauth2 callback url field placeholder text update (#6588)

* Fix auth panel UI updates (#6590)

* style: update padding and font size in OAuth2 and Table components for improved consistency

* style: update font styles in OAuth2 components for improved readability

* fix: add missing semicolon in StyledWrapper.js for consistent styling

* fix: standardize table border colors and improve table styling (#6597)

* style: update OAuth2 section labels for improved consistency and readability (#6598)

* fix: prefrence modal width (#6595)

* fix: theme within grpc timeline (#6581)

* fix: theme within grpc timeline

* fix: use font from the theme

* remove y padding to make timeline item more compact

* fix: font

* fix: padding

* fix: use fira code

* fix: icon spacing

* add border to the method  search

* show bg for message section within request

* fix: collection already opened in other workspace (#6574)

* fix: collection already opened in other workspace

* fix

* fixes

* Merge pull request #6583 from naman-bruno/add/collection-docs

add: collection-docs

* add: beta tag for opencollection & fix create collection location behaviour (#6594)

* add: beta tag for opencollection

* fixes

* fix

* feat: improved dark mode color (#6616)

* fix: resolve request pane tooltip visibility issue (#6615)

* Feat/update file picker (#6614)

* styling: file-picker editor component

* use filepicker component within filebody and response example filebody

* edit example to use button components

* fix: hide delete, disable checkbox in preview mode

* make label italic

* chore: change example cta buttons to filled style

---------

Co-authored-by: Bijin A B <bijin@usebruno.com>

* fix: folder docs save button visibility issue (#6617)

* refactor: improve theme handling in ThemeProvider for better responsiveness to system preferences (#6606)

* refactor: improve theme handling in ThemeProvider for better responsiveness to system preferences

- Introduced helper functions to determine effective theme and apply it to the root element.
- Updated theme application logic to respond to system theme changes more efficiently.
- Simplified theme computation to avoid race conditions by directly using storedTheme.

* fix: update displayedTheme initialization in ThemeProvider to use storedTheme for consistency

* fix: use theme styling within timeline (#6604)

* fix: use theme styling within timeline

* fix: remove inline styling and use css classes

* fix: network logs within dev tools

* compact timeline for grpc

* refactor: standardize CSS class naming in StyledWrapper components for better readability

* remove styling configuration from Network component

* fix: update colors

* update colors

* fix: color

* feat: improve RunnerResults filter bar to use theme system (#6613)

* feat: integrate theme support in RunnerResults component for improved styling

* refactor: simplify RunnerResults component and enhance filter button styling

* style: adjust padding in StyledWrapper and remove aria-pressed from FilterButton

* add: global env and workspace flag (#6534)

* add: global env and workspace flag

* rm: await

* update: option name

* fix

* fix

* fix: invalid collection in workspace (#6612)

* fix: update Notifications and StatusBar components for improved functionality and styling (#6607)

* feat: use theme colors for Console method badges (#6603)

* feat: use theme colors for Console method badges

* chore(theme): bruno devtools UX updates

---------

Co-authored-by: Bijin A B <bijin@usebruno.com>

* fix: update @opencollection/types to version 0.6.0 and refactor auth handling in request items (#6619)

* feat: enhance HttpMethodSelector to include caret indicator when creating new request (#6620)

* feat(theme): update secondary button styles (#6621)

* feat: update toast UI to match theme (#6622)

* Improve delete collection in workspace overview (#6587)

* Improve delete collection in workspace overview

* fixes

* Feat/v3 UI updates (#6618)

* style: enhance button layout and input styles across multiple components for improved UI consistency

* style: update RequestsNotLoaded component with new warning styles and enhance theme color definitions for status indicators

* refactor: update theme usage across components for consistency

- Changed color references from theme.brand to theme.primary.text in various StyledWrapper components.
- Added hover effects to enhance UI interactivity in CollectionSettings and FolderSettings.
- Removed unnecessary margin and padding adjustments in several components for cleaner layout.
- Improved accessibility by ensuring aria attributes are correctly set in MenuDropdown.
- Standardized styling for method indicators in RequestPane components.

These changes aim to create a more cohesive look and feel across the application while adhering to the updated theme guidelines.

* refactor: clean up method selector styling in NewRequest component

* chore: temp playwright test fixes

* refactor: update modal sizes across various components for consistency

- Changed modal size from "sm" to "md" in RenameWorkspace, CreateApiSpec, CloneCollection, DeleteCollectionItem, and RenameCollection components.
- Improved styling in HttpMethodSelector by adding padding for better layout.
- Updated theme color references in multiple theme files to use a new palette structure for consistency and maintainability.

* refactor: enhance styling and theme integration in TimelineItem components

- Updated HttpMethodSelector to clarify padding calculation in comments.
- Integrated theme colors for OAuth2 indicator and timestamp in TimelineItem for better visual consistency.
- Adjusted Method component to use uppercase styling for method display.
- Modified RelativeTime component to apply muted text color for improved readability.
- Updated INFO color in dark and light themes for better contrast and accessibility.

* refactor: remove duplicate import statements in theme files

- Cleaned up import statements in vscode.js and light-pastel.js by removing redundant lines for improved code clarity and maintainability.

* refactor: improve styling and theme integration in various components

- Added accent color and cursor style for checkbox inputs in Modal's StyledWrapper.
- Updated border-radius values in HttpMethodSelector and NewRequest StyledWrapper components to use theme variables for consistency.
- Introduced a new textbox class in NewRequest StyledWrapper for better styling control.
- Changed modal size from "sm" to "md" in CreateEnvironment for improved layout.

---------

Co-authored-by: Bijin A B <bijin@usebruno.com>

* fix(UX): fix sandbox selector options background color (#6626)

* update cdn links (#6628)

* fix: toggle switch color (#6627)

* fix: modal icon colors to match button colors (#6624)

* style: update warning icon color in RemoveCollection and ConfirmSwitchEnv components to use theme colors

* fix: font size in BulkEditor

* style: update error message styling to use theme colors in QueryResult component

* style: update warning icon color

* style: update warning color in ConfirmSwitchEnv

* chore: minor pr comment

---------

Co-authored-by: Bijin A B <bijin@usebruno.com>

* fix: folder settings var panel table alignment (#6631)

* style: remove font size class from button (#6630)

* fix: authmode in graphql (#6636)

* fix: file picker component overflow (#6635)

* fix: tooltip styling (#6632)

* refactor: update color references in OAuth2 components to use theme.primary.text for improved consistency (#6629)

* refactor: update color references in OAuth2 components to use theme.primary.text for improved consistency

* refactor: update modal size in ImportCollectionLocation component for improved consistency

* refactor: set isActiveTab prop in QueryResponse component and update active color in StyledWrapper for consistency

* feat: update "Show in Folder" label based on platform in ManageWorkspace, Collection, CollectionItem, and WorkspaceHome components (#6623)

* feat: update "Show in Folder" label based on platform in ManageWorkspace, Collection, CollectionItem, and WorkspaceHome components

* refactor: remove duplicate "Rename" item push in CollectionItem component

* style: update text color classes and button hover effects in RunnerResults (#6637)

* style: update text color classes and button hover effects in RunnerResults and StyledWrapper components

* Update StyledWrapper.jsx

---------

Co-authored-by: Bijin A B <bijin@usebruno.com>

* style: update variable validation colors in StyledWrapper components to use theme colors (#6633)

* refactor: update Tabs component structure and theme colors (#6638)

- Replaced the div wrapper in the Tabs component with StyledWrapper for improved styling.
- Simplified TabsList and TabsTrigger components by removing theme dependency and using classnames for styling.
- Updated inactive background colors in multiple theme files to enhance visual consistency across themes.

* feat: integrate theme support in ImportCollection component (#6639)

* feat: integrate theme support in ImportCollection component for improved styling consistency

* chore: remove debug console log from ImportCollection component

* refactor: update theme import in ImportCollection component for improved consistency

* style: enhance syntax highlighting in GQL Docs and Doc Gen (#6640)

* style: enhance syntax highlighting and theme integration in QueryEditor and GenerateDocs components

* fix: fixed generate code theming issues

* style: update color references to use theme.draftColor for unsaved changes across multiple components (#6641)

* chore: theme updates (#6642)

---------

Co-authored-by: sanish chirayath <sanish@usebruno.com>
Co-authored-by: Abhishek S Lal <abhishek@usebruno.com>
Co-authored-by: Pooja <pooja@usebruno.com>
Co-authored-by: Chirag Chandrashekhar <chirag@usebruno.com>
Co-authored-by: Sanjai Kumar <161328623+sanjaikumar-bruno@users.noreply.github.com>
Co-authored-by: lohit <lohit@usebruno.com>
Co-authored-by: gopu-bruno <gopu@usebruno.com>
Co-authored-by: naman-bruno <naman@usebruno.com>
Co-authored-by: Anoop M D <anoop@usebruno.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants