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

Integrating react-markdown with miq-structured-list and adding a markdown preview to service-catalog-item's long-description field #8972

Merged

Conversation

jeffibm
Copy link
Member

@jeffibm jeffibm commented Nov 24, 2023

ToDo's

  • Add react-markdown package
  • Integrate the react-markdown component with MiqStructuredList
  • Load the existing code into the codeMirror component on pageLoad
    - Code mirror works only on the first tab.
    - Contents were not showing up in the second tab.
    - Fixed it by implementing redux in MiqCustomTab component and updated the snapshots.
  • Create a new react component with the code-mirror component for editing the react-markdown component for live preview
  • Code changes in code-mirror should enable the save button in ruby form.
  • Submit action
  • Test Cases

Before
image

After
image

@jeffibm jeffibm requested a review from a team as a code owner November 24, 2023 10:10
@jeffibm jeffibm force-pushed the integrate-react-markdown-2 branch 3 times, most recently from 43f7043 to 32be958 Compare November 24, 2023 14:06
@jeffibm jeffibm changed the title Integrate react markdown 2 Integrate react-markdown to miq-structured-list Nov 24, 2023
@jeffibm jeffibm changed the title Integrate react-markdown to miq-structured-list [WIP] Integrate react-markdown to miq-structured-list Nov 24, 2023
@miq-bot miq-bot added the wip label Nov 24, 2023
@jeffibm jeffibm force-pushed the integrate-react-markdown-2 branch 3 times, most recently from 4007c6a to 0edc631 Compare November 27, 2023 08:55
@jeffibm
Copy link
Member Author

jeffibm commented Nov 27, 2023

This seems to be working, but when we try to edit, the code mirror is not loading up.
It loads only when we click on it or change the window dimension

Screen.Recording.2023-11-27.at.7.10.13.PM.mov

@jeffibm jeffibm force-pushed the integrate-react-markdown-2 branch 2 times, most recently from 8749ad0 to 5fa4a8b Compare November 28, 2023 10:17
@Fryguy
Copy link
Member

Fryguy commented Nov 28, 2023

  • Line is too long. [112/80]

@jeffibm Ignore the bot on this one - I thought I had it disabled.

@jeffibm jeffibm force-pushed the integrate-react-markdown-2 branch from 5d496d4 to 8106421 Compare November 28, 2023 16:08
@jeffibm jeffibm changed the title [WIP] Integrate react-markdown to miq-structured-list Integrate react-markdown to miq-structured-list Nov 28, 2023
@miq-bot miq-bot removed the wip label Nov 28, 2023
@jeffibm jeffibm force-pushed the integrate-react-markdown-2 branch from dde680a to c73372b Compare November 29, 2023 04:25
@jeffibm jeffibm changed the title Integrate react-markdown to miq-structured-list Integrating react-markdown with miq-structured-list and adding a markdown preview to service catalog item's long description Nov 29, 2023
@jeffibm jeffibm changed the title Integrating react-markdown with miq-structured-list and adding a markdown preview to service catalog item's long description Integrating react-markdown with miq-structured-list and adding a markdown preview to service-catalog-item's long-description field Nov 29, 2023
@jeffibm jeffibm force-pushed the integrate-react-markdown-2 branch from c73372b to 457607c Compare November 30, 2023 09:02
@miq-bot
Copy link
Member

miq-bot commented Nov 30, 2023

Checked commit jeffbonson@457607c with ruby 2.7.8, rubocop 1.56.3, haml-lint 0.51.0, and yamllint
2 files checked, 4 offenses detected

app/views/catalog/_form_details_info.html.haml

  • ⚠️ - Line 10 - Layout/ArgumentAlignment: Align the arguments of a method call if they span more than one line.
  • ⚠️ - Line 11 - Layout/HashAlignment: Align the keys and values of a hash literal if they span more than one line.
  • ⚠️ - Line 12 - Layout/HashAlignment: Align the keys and values of a hash literal if they span more than one line.
  • ⚠️ - Line 9 - Avoid using instance variables in partials views

@GilbertCherrie GilbertCherrie merged commit 8f318a8 into ManageIQ:master Nov 30, 2023
8 checks passed
@jrafanie
Copy link
Member

Nice work @jeffibm it looks nice! My only concern is how the side by side looks on small screens but we can certainly take that on if it's a problem.

@jrafanie
Copy link
Member

Are we thinking of backporting this to quinteros? @Fryguy @jeffibm. I don't know if the react-markdown and other dependency changes are something we want to backport at this time.

@Fryguy
Copy link
Member

Fryguy commented Nov 30, 2023

Technically they will all be in quinteros because I will be merging master into quinteros next week.

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.

6 participants