Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(toolkit): Markdown improvements rendering tables and code snippets #280

Merged
merged 5 commits into from
Jun 25, 2024

Conversation

knajjars
Copy link
Collaborator

@knajjars knajjars commented Jun 25, 2024

Thank you for contributing to the Cohere Toolkit!

  • Use our custom Cohere brand colors for rendering code snippets.
  • Temporarily disable the iFrame preview due to issues rendering with other markdowns components

AI Description

This pull request makes changes to the coral_web interface, including:

  • Updates to the package.json and package-lock.json files, removing the highlight.js dependency.
  • Modifications to the AgentsSidePanel.tsx and Header.tsx components, adding and utilizing the setEditAgentPanelOpen and setAgentsSidePanelOpen functions for improved side panel handling.
  • Changes to the DataTable.tsx component, updating the import statements for Icon and Text components.
  • Updates to the Markdown.tsx component, including:
    • Adding useMemo and UrlTransform imports.
    • Removing ComponentPropsWithoutRef import.
    • Modifying the getActiveMarkdownPlugins function to include the renderRemarkTags plugin.
    • Adjusting styling for the MarkdownTextProps type.
    • Updating the component rendering logic to use useMemo for memoization.
  • Introduction of a new directives/tag.ts file, providing the renderRemarkTags plugin for rendering :mark directives in connector tags.
  • Styling updates in code-style.css and main.css, including:
    • Defining styles for code blocks with the .hljs class.
    • Modifying styles for the .dark class, including colors for various elements within code blocks.
  • A fix in preview.ts to address issues with Markdown rendering by returning the original content.

@codecov-commenter
Copy link

codecov-commenter commented Jun 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (main@2dd1cb1). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #280   +/-   ##
=======================================
  Coverage        ?   85.55%           
=======================================
  Files           ?      156           
  Lines           ?     5816           
  Branches        ?        0           
=======================================
  Hits            ?     4976           
  Misses          ?      840           
  Partials        ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@wujessica wujessica left a comment

Choose a reason for hiding this comment

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

ty!!

src/interfaces/coral_web/src/utils/preview.ts Outdated Show resolved Hide resolved
@knajjars knajjars merged commit 588446d into main Jun 25, 2024
2 checks passed
@knajjars knajjars deleted the TLK-725 branch June 25, 2024 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants