Skip to content

Comments

Feature/83/create datasummary with markdown#91

Merged
kcondon merged 16 commits intodevelopfrom
feature/83/create-datasummary-with-markdown
May 17, 2023
Merged

Feature/83/create datasummary with markdown#91
kcondon merged 16 commits intodevelopfrom
feature/83/create-datasummary-with-markdown

Conversation

@ekraffmiller
Copy link
Contributor

What this PR does / why we need it:

Creates a DataSummary component for the Dataset Page

Which issue(s) this PR closes:

Special notes for your reviewer:

I created a new branch off of my feature branch, to switch from SanitizedHtml to markdown (in order to save the SanitizedHtml code). I hope that doesn't make reviewing the PR harder - let me know if there is a better manage the branching.

Suggestions on how to test this:

npm run storybook - view DataSummary component

Does this PR introduce a user interface change? If mockups are available, please link/include them here:

no

Is there a release notes update needed for this change?:

no

Additional documentation:

@pdurbin
Copy link
Member

pdurbin commented May 9, 2023

@ekraffmiller can you please resolve the merge conflicts?

Also, which branch/PR did you branch from? This will help us create a "compare" link that makes code review easier (just the smaller diff). Thanks.

@MellyGray MellyGray self-assigned this May 10, 2023
@MellyGray MellyGray changed the base branch from develop to feature/78-create-the-boilerplate-of-the-dataset-page May 10, 2023 10:19
Copy link
Contributor

@MellyGray MellyGray left a comment

Choose a reason for hiding this comment

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

I love seeing we are making progresses with the Dataset page!

I left some comments but overall this looks good to me

Copy link
Member

@pdurbin pdurbin left a comment

Choose a reason for hiding this comment

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

Overall this is looking good. I hope this is a stepping stone to someday supporting Markdown!

I left a few comments.

title: 'Description',
description: 'this is the description field',
value:
'This is the description field. This text is *italic* and this is **bold**. Here is an image ![Alt text](https://picsum.photos/id/10/20/20) '
Copy link
Member

Choose a reason for hiding this comment

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

Can we please add a link here as well? Links are probably the most common use case. Something like Here is [a link](https://dataverse.org).

}
const { container } = render(<SanitizedHTML html={html} options={options} />)

expect(container.innerHTML).toContain('href="https://example.com"')
Copy link
Member

Choose a reason for hiding this comment

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

The actual innerHTML is this:

<div><a target="_blank" href="https://example.com">Example</a> </div>

Perhaps the test could also assert that "target" is kept?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I can update the test, but I think it's a low priority since I am removing this element from the branch. We are going to use the Markdown component instead.

…ataset.ts, update MarkdownComponent.tsx for React 18
@ekraffmiller
Copy link
Contributor Author

@MellyGray & @pdurbin I made all the changes from the comments, thanks. I will look at the merge conflicts tomorrow. Since I'm branching off of other feature branches, I may have questions about that.

@mreekie
Copy link

mreekie commented May 10, 2023

sprint kickoff

  • dataset summary section issue - Ellen is working on.
  • size: 3 minimal work left to get it through review and QA.
  • Merge conflicts. Otherwise it's close

@mreekie mreekie added the Size: 3 A percentage of a sprint. 2.1 hours. label May 10, 2023
Copy link
Contributor

@MellyGray MellyGray left a comment

Choose a reason for hiding this comment

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

Looks good to me! Approved! 🎉

Reminder: we first need to merge the Boilerplate branch

Base automatically changed from feature/78-create-the-boilerplate-of-the-dataset-page to develop May 17, 2023 09:10
@kcondon kcondon self-assigned this May 17, 2023
@kcondon
Copy link
Contributor

kcondon commented May 17, 2023

@ekraffmiller I didn't see the DataSummary component in story book. Probably I'm overlooking something obvious. I did see a "summary block" label in the sample dataset page.

@kcondon kcondon merged commit 1c00688 into develop May 17, 2023
@kcondon kcondon deleted the feature/83/create-datasummary-with-markdown branch May 17, 2023 17:03
jayanthkomarraju pushed a commit to jayanthkomarraju/dataverse-frontend that referenced this pull request May 31, 2024
…th-markdown

Feature/83/create datasummary with markdown
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Size: 3 A percentage of a sprint. 2.1 hours.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Spike - Frontend] Create the DatasetSummary of the Dataset page

6 participants