Skip to content

ECHO-379 Portal editor markdown bug fix#250

Merged
spashii merged 2 commits intomainfrom
markdown-stylesheet-update
Jul 29, 2025
Merged

ECHO-379 Portal editor markdown bug fix#250
spashii merged 2 commits intomainfrom
markdown-stylesheet-update

Conversation

@ussaama
Copy link
Copy Markdown
Contributor

@ussaama ussaama commented Jul 29, 2025

  • Refactored stylesheet for the markdown component being used in Portal-Editor and elsewhere in the app to include the latest code according to the updated package

Summary by CodeRabbit

  • Style
    • Improved formatting and consistency of CSS selectors and indentation.
    • Updated class name suffixes for consistency across the file.
    • Standardized quotation marks in font-family declarations.
    • No visible changes to the appearance or behavior of the form editor.

@linear
Copy link
Copy Markdown

linear bot commented Jul 29, 2025

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Jul 29, 2025

Walkthrough

This change refactors the CSS in the MarkdownWYSIWYG component by consolidating selector lists, standardizing formatting, and renaming class suffixes from _uazmk_XXX to _sects_XXX. No CSS property values, logic, or selectors are functionally altered; the update is strictly syntactic and naming-related.

Changes

Cohort / File(s) Change Summary
CSS Selector Consolidation & Class Suffix Renaming
echo/frontend/src/components/form/MarkdownWYSIWYG/styles.css
Combined multi-line selectors into single lines, standardized indentation and formatting, and renamed class suffixes from _uazmk_XXX to _sects_XXX throughout. No changes to actual style logic or property values.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Assessment against linked issues

Objective Addressed Explanation
Address portal editor and summary duplication (ECHO-379) The CSS refactor does not directly address portal editor or summary duplication logic. It's unclear if this syntactic update is related to the issue's objective.

Assessment against linked issues: Out-of-scope changes

Code Change Explanation
Renaming of CSS class suffixes from _uazmk_XXX to _sects_XXX (echo/frontend/src/components/form/MarkdownWYSIWYG/styles.css) The linked issue does not mention any requirement for class renaming or style refactoring, so this appears unrelated to the stated objectives.
Selector formatting and indentation cleanup (echo/frontend/src/components/form/MarkdownWYSIWYG/styles.css) Formatting and selector consolidation are not referenced in the linked issue and do not address the portal editor or summary duplication.

Suggested reviewers

  • spashii

LGTM.

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ed30b44 and d5805be.

📒 Files selected for processing (1)
  • echo/frontend/src/components/form/MarkdownWYSIWYG/styles.css (68 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: ussaama
PR: Dembrane/echo#205
File: echo/frontend/src/lib/query.ts:1444-1506
Timestamp: 2025-07-10T12:48:20.683Z
Learning: ussaama prefers string concatenation over template literals for simple cases where readability is clearer, even when linting tools suggest template literals. Human readability takes precedence over strict linting rules in straightforward concatenation scenarios.
Learnt from: ussaama
PR: Dembrane/echo#250
File: echo/frontend/src/components/form/MarkdownWYSIWYG/styles.css:1618-1624
Timestamp: 2025-07-29T11:36:23.592Z
Learning: ussaama prefers to keep CSS vendor prefixes and fallbacks without linter ignore comments, even when linters flag them as duplicate properties. Browser compatibility through progressive enhancement takes precedence over strict linting rules in their workflow.
echo/frontend/src/components/form/MarkdownWYSIWYG/styles.css (7)

Learnt from: ussaama
PR: #250
File: echo/frontend/src/components/form/MarkdownWYSIWYG/styles.css:1618-1624
Timestamp: 2025-07-29T11:36:23.592Z
Learning: ussaama prefers to keep CSS vendor prefixes and fallbacks without linter ignore comments, even when linters flag them as duplicate properties. Browser compatibility through progressive enhancement takes precedence over strict linting rules in their workflow.

Learnt from: ussaama
PR: #169
File: echo/frontend/src/components/project/ProjectPortalEditor.tsx:409-464
Timestamp: 2025-05-30T15:38:44.413Z
Learning: Badge-based selectors in ProjectPortalEditor.tsx: Keyboard navigation enhancements for accessibility are considered optional improvements rather than critical issues. The user acknowledges these suggestions but doesn't prioritize them as blockers.

Learnt from: ussaama
PR: #185
File: echo/frontend/src/App.tsx:25-36
Timestamp: 2025-06-16T11:51:33.799Z
Learning: In echo/frontend/src/App.tsx, user ussaama prefers explicit code over terse/inline code for React useEffect cleanup functions, choosing clarity and future maintainability over brevity when assigning cleanup functions to variables before returning them.

Learnt from: ussaama
PR: #185
File: echo/frontend/src/App.tsx:10-15
Timestamp: 2025-06-16T11:48:51.114Z
Learning: In echo/frontend project, ussaama prefers to defer import refactoring (like grouping config imports under a namespace) until the import list grows significantly, following a pragmatic approach to technical debt management.

Learnt from: ussaama
PR: #202
File: echo/frontend/src/components/announcement/hooks/index.ts:23-36
Timestamp: 2025-07-03T13:34:59.482Z
Learning: In the echo frontend codebase, using @ts-ignore for Directus SDK filter type issues is acceptable and preferred over extending types or using workarounds. This applies specifically to date comparisons and other filter operations where the SDK types may not be perfectly aligned.

Learnt from: ussaama
PR: #205
File: echo/frontend/src/lib/query.ts:1444-1506
Timestamp: 2025-07-10T12:48:20.683Z
Learning: ussaama prefers string concatenation over template literals for simple cases where readability is clearer, even when linting tools suggest template literals. Human readability takes precedence over strict linting rules in straightforward concatenation scenarios.

Learnt from: ussaama
PR: #112
File: echo/frontend/src/components/conversation/ConversationAccordion.tsx:349-351
Timestamp: 2025-04-17T16:19:08.480Z
Learning: NavigationButton component in echo/frontend expects Tailwind class fragments (like "border-green-500") for its borderColor prop, not Mantine color tokens. This prop is used to construct a hover class using string interpolation (hover:${borderColor}).

🪛 Biome (2.1.2)
echo/frontend/src/components/form/MarkdownWYSIWYG/styles.css

[error] 1447-1447: Duplicate properties can lead to unexpected behavior and may override previous declarations unintentionally.

cursor is already defined here.

Remove or rename the duplicate property to ensure consistent styling.

(lint/suspicious/noDuplicateProperties)


[error] 1622-1622: Duplicate properties can lead to unexpected behavior and may override previous declarations unintentionally.

width is already defined here.

Remove or rename the duplicate property to ensure consistent styling.

(lint/suspicious/noDuplicateProperties)

⏰ 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). (2)
  • GitHub Check: Cursor Bugbot
  • GitHub Check: ci-check-server
🔇 Additional comments (1)
echo/frontend/src/components/form/MarkdownWYSIWYG/styles.css (1)

1390-1396: Popup z-index / positioning back in the safe zone – LGTM

._popupContainer_sects_1235 is again position: fixed with a high z-index. That puts pop-ups above everything as intended and resolves the regression we flagged last time.

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch markdown-stylesheet-update

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@ussaama ussaama enabled auto-merge July 29, 2025 11:32
@coderabbitai coderabbitai bot requested a review from spashii July 29, 2025 11:32
z-index: 9999;
._popupContainer_sects_1235 {
position: relative;
z-index: 2;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bug: Popup Positioning and Layering Issue

The ._popupContainer CSS class (._popupContainer_sects_1235 in the diff) had its position changed from fixed to relative and z-index from 9999 to 2. This critically breaks popup positioning and layering, causing them to appear relative to their parent instead of the viewport, and potentially behind other elements. This appears to be an unintended side effect.

Locations (1)
Fix in Cursor Fix in Web

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

fixed

Copy link
Copy Markdown
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: 2

🔭 Outside diff range comments (1)
echo/frontend/src/components/form/MarkdownWYSIWYG/styles.css (1)

2092-2114: Redundant duplicate rules – shave bytes & tidy semicolons

._bold_1tncs_10, ._italic_1tncs_14, ._underline_1tncs_18 are each defined twice; the second set only changes the semicolon style.
Kill the duplicates (or move variant‐specific deltas into a single rule) to reduce payload and avoid override confusion. Also, keep the trailing semicolon for consistency.

-._bold_1tncs_10 {
-  font-weight: bold;
-}
-
-._italic_1tncs_14 {
-  font-style: italic;
-}
-
-._underline_1tncs_18 {
-  text-decoration: underline;
-}
-
 /* … keep the 700-weight / italic / underline definitions below … */

Also applies to: 2116-2123

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 42c1d41 and ed30b44.

📒 Files selected for processing (1)
  • echo/frontend/src/components/form/MarkdownWYSIWYG/styles.css (68 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: ussaama
PR: Dembrane/echo#205
File: echo/frontend/src/lib/query.ts:1444-1506
Timestamp: 2025-07-10T12:48:20.683Z
Learning: ussaama prefers string concatenation over template literals for simple cases where readability is clearer, even when linting tools suggest template literals. Human readability takes precedence over strict linting rules in straightforward concatenation scenarios.
echo/frontend/src/components/form/MarkdownWYSIWYG/styles.css (2)

Learnt from: ussaama
PR: #169
File: echo/frontend/src/components/project/ProjectPortalEditor.tsx:409-464
Timestamp: 2025-05-30T15:38:44.413Z
Learning: Badge-based selectors in ProjectPortalEditor.tsx: Keyboard navigation enhancements for accessibility are considered optional improvements rather than critical issues. The user acknowledges these suggestions but doesn't prioritize them as blockers.

Learnt from: ussaama
PR: #112
File: echo/frontend/src/components/conversation/ConversationAccordion.tsx:349-351
Timestamp: 2025-04-17T16:19:08.480Z
Learning: NavigationButton component in echo/frontend expects Tailwind class fragments (like "border-green-500") for its borderColor prop, not Mantine color tokens. This prop is used to construct a hover class using string interpolation (hover:${borderColor}).

🪛 Biome (2.1.2)
echo/frontend/src/components/form/MarkdownWYSIWYG/styles.css

[error] 1447-1447: Duplicate properties can lead to unexpected behavior and may override previous declarations unintentionally.

cursor is already defined here.

Remove or rename the duplicate property to ensure consistent styling.

(lint/suspicious/noDuplicateProperties)


[error] 1622-1622: Duplicate properties can lead to unexpected behavior and may override previous declarations unintentionally.

width is already defined here.

Remove or rename the duplicate property to ensure consistent styling.

(lint/suspicious/noDuplicateProperties)

⏰ 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). (2)
  • GitHub Check: Cursor Bugbot
  • GitHub Check: ci-check-server

@ussaama ussaama disabled auto-merge July 29, 2025 11:41
@spashii spashii added this pull request to the merge queue Jul 29, 2025
Merged via the queue into main with commit 44cfe54 Jul 29, 2025
12 checks passed
@spashii spashii deleted the markdown-stylesheet-update branch July 29, 2025 11:47
spashii pushed a commit that referenced this pull request Nov 18, 2025
- Refactored stylesheet for the markdown component being used in
Portal-Editor and elsewhere in the app to include the latest code
according to the updated package

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Style**
* Improved formatting and consistency of CSS selectors and indentation.
  * Updated class name suffixes for consistency across the file.
  * Standardized quotation marks in font-family declarations.
  * No visible changes to the appearance or behavior of the form editor.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants