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

263 - Add file metadata section to the File page #281

Merged

Conversation

MellyGray
Copy link
Contributor

What this PR does / why we need it:

This PR adds the file metadata section UI of the File Page.

Which issue(s) this PR closes:

Special notes for your reviewer:

Suggestions on how to test this:

  1. Install the necessary dependencies using npm install.
  2. Build the design system with cd packages/design-system && npm run build.
  3. Navigate back to the root directory with cd ../../.
  4. Start Storybook with npm run storybook.
  5. Visit the File Page in the Storybook and check that the File Metadata section looks as expected

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

File Metadata section added to the File Page
Captura de pantalla 2023-12-14 a las 11 38 09

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

File Metadata section added to the File Page

Additional documentation:

@MellyGray MellyGray marked this pull request as ready for review January 16, 2024 12:12
@MellyGray MellyGray added the Size: 10 A percentage of a sprint. 7 hours. label Jan 16, 2024
@coveralls
Copy link

coveralls commented Jan 16, 2024

Coverage Status

coverage: 97.92% (+0.1%) from 97.822%
when pulling d5c11f3 on feature/263-add-filemetadata-section-to-the-file-page
into c0516c5 on develop.

Base automatically changed from feature/249-boilerplate-file-page to develop January 19, 2024 09:21
…into feature/263-add-filemetadata-section-to-the-file-page
@MellyGray MellyGray added pm.GREI-d-2.7.1 NIH, yr2, aim7, task1: R&D UI modules for creating datasets and supporting publishing workflows pm.GREI-d-2.7.2 NIH, yr2, aim7, task2: Implement UI modules for creating datasets and publishing workflows labels Jan 22, 2024
@MellyGray MellyGray linked an issue Jan 22, 2024 that may be closed by this pull request
@MellyGray
Copy link
Contributor Author

MellyGray commented Jan 23, 2024

During development, I saw that it would be good to move the file metadata into its own model. This way, it can be used in both the File and FilePreview models.

This was needed for the 'Access File' button. So, instead of waiting for another sprint, I did it now.

I made a different PR for the refactor, which is here: #281

My idea is to look at both PRs one by one. Then, we can put the refactor into this branch for combined QA of both changes

@MellyGray MellyGray added the UI Tasks related to the user interface (UI) or frontend development label Jan 25, 2024
@M27Mangan M27Mangan self-assigned this Jan 29, 2024
@M27Mangan M27Mangan self-requested a review January 29, 2024 16:00

Choose a reason for hiding this comment

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

If this scss file only contains one file, we could similarly add a <div className={mr-2}> as an inner container as another opportunity to use the existing Boostrap spacing utils referenced in above comment.

Copy link
Contributor Author

@MellyGray MellyGray Jan 30, 2024

Choose a reason for hiding this comment

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

I addressed this in the above comment, but to summarize: we prefer to encapsulate all the styles for separation of concerns and to enhance readability. styles.container encapsulates whatever style is being applied to the container of the FileLabels. This is because when I'm reading the component logic, I'm not concerned with what classes are being applied, which improves readability.

Also, if in the future we want to add another style property, we won't need to modify the component file, just the .scss file. This is as it should be, since we're only modifying styles. In a way, we're following the open/closed principle, we allow for the extension (adding or changing styles) without needing to modify the actual component file (the logic part)

Choose a reason for hiding this comment

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

I think that makes the most sense for these applications. I appreciate the explanation and hadn't considered some of the things you've pointed out. I will keep those in mind when developing :)

Copy link

@M27Mangan M27Mangan left a comment

Choose a reason for hiding this comment

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

Submitted a few questions, I don't believe they are blockers so you're welcome to ignore since they are mostly syntax things that we don't practice elsewhere.

@M27Mangan M27Mangan assigned MellyGray and unassigned M27Mangan Jan 29, 2024
@MellyGray MellyGray assigned M27Mangan and unassigned MellyGray Jan 30, 2024
@M27Mangan M27Mangan self-requested a review January 31, 2024 12:58
Copy link

@M27Mangan M27Mangan left a comment

Choose a reason for hiding this comment

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

Everything seems to be good on my end, and thank you again for taking the time to answer my questions!

@M27Mangan M27Mangan removed their assignment Jan 31, 2024
@ekraffmiller ekraffmiller self-assigned this Jan 31, 2024
@ekraffmiller
Copy link
Contributor

looks good! Merging

@ekraffmiller ekraffmiller merged commit debb816 into develop Feb 1, 2024
11 of 14 checks passed
@MellyGray MellyGray deleted the feature/263-add-filemetadata-section-to-the-file-page branch February 1, 2024 12:18
jayanthkomarraju pushed a commit to jayanthkomarraju/dataverse-frontend that referenced this pull request May 31, 2024
…ction-to-the-file-page

263 - Add file metadata section to the File page
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pm.GREI-d-2.7.1 NIH, yr2, aim7, task1: R&D UI modules for creating datasets and supporting publishing workflows pm.GREI-d-2.7.2 NIH, yr2, aim7, task2: Implement UI modules for creating datasets and publishing workflows Size: 10 A percentage of a sprint. 7 hours. UI Tasks related to the user interface (UI) or frontend development
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add the FileMetadata section to the File Page
4 participants