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

135 - Files table UI [2/2] - File Action Buttons and File Level Messages #162

Merged
merged 35 commits into from
Sep 22, 2023

Conversation

MellyGray
Copy link
Contributor

@MellyGray MellyGray commented Aug 16, 2023

What this PR does / why we need it:

This PR adds the File Actions Buttons of the Files Table as well as some File Level Messages. (All download options not included since they are included in another UI issue #63 )

This is only the UI, no backend connected yet.

Which issue(s) this PR closes:

Special notes for your reviewer:

This is only the UI work, so some variables for the conditional render have been hardcoded until we can get them from the js-dataverse module.

Changes

  1. Remove msw from Storybook because we don't need to mock the API calls, we can mock the repositories.
  2. Changes to the design system:
    a. ButtonGroup now accepts HTMLAttributes
    b. Type prop added to the Button component
    c. Disabled prop added to the DropdownButtonItem component
    d. New DropdownHeader component added to the design system
  3. SessionProvider added to the application to get the information of the authenticated user at any point of the application
  4. Some new properties added to the File model to manage different states of the restricted access
  5. DatasetUploadFilesButton added to the Dataset page
  6. File Actions column added to the Files Table, this includes:
    a. EditFilesMenu component at the Header of the column
    b. AccessFileMenu at cell level to check the access status of the file
    c. RequestAccessModal, display work only, since we are not including write actions in this Milestone 2.
    d. File Options menu, display work only, since we are not including write actions in this Milestone 2.
    e. FileInfoMessages

All file actions not included in this PR are not considered for the MVP.

Suggestions on how to test this:

  1. npm i
  2. cd packages/design-system && npm run build
  3. cd ../../
  4. npm run storybook
  5. Check the files table at localhost:6006 storybook in the Dataset page. There are 2 modes now, Default and Logged In as Owner to check the appearance of these Action Buttons.
  6. Some other sections have been added to the storybook to check the different states of the File Action Buttons, check these sections at Sections/Dataset Page/DatasetFiles/FilesTable/FileActionsCell/ in the Storybook.

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

Captura de pantalla 2023-07-20 a las 10 10 55
image

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

File Action Buttons added to the Files Table UI

Additional documentation:

MellyGray added 28 commits July 20, 2023 09:51
@MellyGray MellyGray changed the title Feature/139 files table file action buttons UI 139 Files table file action buttons UI Aug 16, 2023
@MellyGray MellyGray changed the title 139 Files table file action buttons UI 135 - Files table UI [2/2] - File Action Buttons and File Level Messages Aug 16, 2023
@MellyGray
Copy link
Contributor Author

@GPortas I added the requested changes, please let me know if I missed something

@MellyGray
Copy link
Contributor Author

I have not been able to test the appearance of the tooltip in Storybook. I am referring to this behavior, from your screenshots:

tooltip

I added a commit, you can check all the different messages in Storybook at http://localhost:6006/?path=/story/sections-dataset-page-datasetfiles-filestable-fileactionscell-fileinfomessages-fileinfomessages--ingest-in-progress

image

@MellyGray MellyGray removed their assignment Sep 13, 2023
@GPortas
Copy link
Contributor

GPortas commented Sep 14, 2023

Thanks @MellyGray. Looks good.

Only a minor detail. I tested the new Storybook changes and found the following:

In Storybook, the width of the file info message with tooltip appears smaller than the one without a tooltip (that occupies the width of the screen).

Tooltip:
tooltip

No tooltip:
no-tooltip

Not sure if this is relevant, but just in case.

<Modal.Body>
<p className={styles.paragraph}>
<ExclamationCircleFill />
This file has already been deleted (or replaced) in the current version. It may not be
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be moved to locales, for i18n.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I forgot! Thanks! I added a commit, can you check it again?

Copy link
Contributor

Choose a reason for hiding this comment

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

Looks good. Thanks!

was unsuccessful.{' '}
{ingest.reportMessage
? ingest.reportMessage
: 'Ingest failed. No further information is available.'}
Copy link
Contributor

Choose a reason for hiding this comment

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

Same for this component. Info messages should come from locales.

@MellyGray MellyGray removed their assignment Sep 14, 2023
Copy link
Contributor

@GPortas GPortas left a comment

Choose a reason for hiding this comment

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

LGTM!

@GPortas GPortas removed their assignment Sep 14, 2023
Base automatically changed from feature/149-react-table-manual-pagination-setup to develop September 15, 2023 07:25
@kcondon kcondon self-assigned this Sep 15, 2023
@kcondon
Copy link
Contributor

kcondon commented Sep 15, 2023

@MellyGray Unfortunately, I'm seeing the same error and blank page.

package.json Outdated Show resolved Hide resolved
@kcondon
Copy link
Contributor

kcondon commented Sep 19, 2023

@MellyGray I'm getting blank screens with this but with many console errors. We've seen this and deleting the node dir seemed to help before but now not helping.

…into feature/139-files-table-file-action-buttons-ui
@MellyGray
Copy link
Contributor Author

@MellyGray I'm getting blank screens with this but with many console errors. We've seen this and deleting the node dir seemed to help before but now not helping.

I haven't change anything since yesterday, how is this possible 😢 We can try again today to troubleshoot this in a zoom call before the standup, I'm available from 9-11h

@kcondon kcondon merged commit e847e8f into develop Sep 22, 2023
6 checks passed
@kcondon kcondon deleted the feature/139-files-table-file-action-buttons-ui branch September 22, 2023 07:29
jayanthkomarraju pushed a commit to jayanthkomarraju/dataverse-frontend that referenced this pull request May 31, 2024
…tion-buttons-ui

135 - Files table UI [2/2] - File Action Buttons and File Level Messages
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] [2/2] Create the File Tab of the Dataset - File action buttons + File level messages
4 participants