Skip to content

chore: fix markdown styles#36959

Merged
KelvinOm merged 1 commit intoreleasefrom
chore/chat-ui-fixes-3
Oct 18, 2024
Merged

chore: fix markdown styles#36959
KelvinOm merged 1 commit intoreleasefrom
chore/chat-ui-fixes-3

Conversation

@jsartisan
Copy link
Contributor

@jsartisan jsartisan commented Oct 18, 2024

Summary by CodeRabbit

  • New Features

    • Updated Markdown rendering components to streamline available elements.
  • Bug Fixes

    • Adjusted CSS styles for lists and anchor tags to improve layout and appearance.
  • Chores

    • Removed unused components related to paragraphs and lists to enhance code maintainability.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 18, 2024

Walkthrough

The changes in this pull request involve the removal of several components related to rendering Markdown, specifically the p, ul, ol, and li components. Corresponding files for these components have been deleted, and CSS styles associated with them have been modified or removed. The exported components object now only includes a limited set of components, impacting the available elements for Markdown rendering.

Changes

File Change Summary
.../Markdown/src/components.tsx Removed p, ul, ol, and li components from the exported components object.
.../Markdown/src/mdComponents/List.tsx Deleted file containing ul, ol, and li components.
.../Markdown/src/mdComponents/Paragraph.tsx Deleted file containing the p component for rendering paragraphs.
.../Markdown/src/styles.module.css Modified CSS: removed margin for [data-component="p"], updated margins for ul and ol, added styles for li, and changed anchor tag display.

Possibly related PRs

Suggested labels

skip-changelog, ok-to-test

Suggested reviewers

  • KelvinOm
  • znamenskii-ilia

🎉 In the land of Markdown, changes took flight,
Components once present, now bid goodnight.
Paragraphs and lists, they've vanished away,
Leaving anchors and headings to brighten the day!
With styles adjusted, the layout's a charm,
A simpler structure, now free from alarm! 🌟


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ 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.
    • Generate unit testing code for this file.
    • 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 generate unit testing code for this file.
    • @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 generate unit testing code.
    • @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.

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 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.

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.

@github-actions github-actions bot added the skip-changelog Adding this label to a PR prevents it from being listed in the changelog label Oct 18, 2024
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

🧹 Outside diff range and nitpick comments (2)
app/client/packages/design-system/widgets/src/components/Markdown/src/styles.module.css (2)

80-80: LGTM. Consider using list-style-position.

The changes look good. The reduced margin and added list style improve the list appearance.

Consider adding list-style-position: inside; to ensure consistent indentation across browsers.

Also applies to: 82-82


92-93: LGTM. Consider adding hover styles.

The change to use display: inline-block; for anchor tags is good.

Consider adding hover styles to improve user interaction:

a {
  display: inline-block;
  text-decoration: none;
  color: var(--color-link);
}

a:hover {
  text-decoration: underline;
}
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 5801f49 and eb53521.

📒 Files selected for processing (4)
  • app/client/packages/design-system/widgets/src/components/Markdown/src/components.tsx (0 hunks)
  • app/client/packages/design-system/widgets/src/components/Markdown/src/mdComponents/List.tsx (0 hunks)
  • app/client/packages/design-system/widgets/src/components/Markdown/src/mdComponents/Paragraph.tsx (0 hunks)
  • app/client/packages/design-system/widgets/src/components/Markdown/src/styles.module.css (1 hunks)
💤 Files with no reviewable changes (3)
  • app/client/packages/design-system/widgets/src/components/Markdown/src/components.tsx
  • app/client/packages/design-system/widgets/src/components/Markdown/src/mdComponents/List.tsx
  • app/client/packages/design-system/widgets/src/components/Markdown/src/mdComponents/Paragraph.tsx
🧰 Additional context used
🔇 Additional comments (1)
app/client/packages/design-system/widgets/src/components/Markdown/src/styles.module.css (1)

89-89: LGTM. Good use of list-style-type.

The addition of list-style-type: auto; is appropriate and consistent with the parent list styling.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We are not using our Text component as the capsizing is causing issues with list item markers. Anyway, we used capsizing for single line use cases ( like text in button ). Having capsizing for everything is causing more harm than good.

Copy link
Contributor Author

@jsartisan jsartisan Oct 18, 2024

Choose a reason for hiding this comment

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

i realized these wrappers are not needed anymore as I removed the text wrapper.

@KelvinOm KelvinOm merged commit 5e4b026 into release Oct 18, 2024
@KelvinOm KelvinOm deleted the chore/chat-ui-fixes-3 branch October 18, 2024 07:19
github-actions bot pushed a commit to Zeral-Zhang/appsmith that referenced this pull request Nov 20, 2024
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Updated Markdown rendering components to streamline available
elements.
  
- **Bug Fixes**
- Adjusted CSS styles for lists and anchor tags to improve layout and
appearance.

- **Chores**
- Removed unused components related to paragraphs and lists to enhance
code maintainability.

<!-- 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

Labels

skip-changelog Adding this label to a PR prevents it from being listed in the changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants