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

Feature/231 create dataset boilerplate #251

Merged
merged 34 commits into from
Jan 29, 2024

Conversation

M27Mangan
Copy link

@M27Mangan M27Mangan commented Dec 5, 2023

What this PR does / why we need it:

Creates basic framework in order to continue development on the "Create Dataset" feature page

Which issue(s) this PR closes:

Special notes for your reviewer:

Please harass me if there are changes I should be making to my development. Including tests.

Suggestions on how to test this:

  1. Navigate to http://localhost:8000/spa/datasets/create
  2. Enter Title
  3. Click Submit

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

Issue Comment

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

N/A

Additional documentation:

@M27Mangan M27Mangan added Size: 3 A percentage of a sprint. 2.1 hours. UI Tasks related to the user interface (UI) or frontend development labels Dec 5, 2023
@M27Mangan M27Mangan linked an issue Dec 5, 2023 that may be closed by this pull request
@MellyGray MellyGray self-assigned this Dec 6, 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.

The page looks good. I appreciate that you added 'Create Dataset' as the page title. This is something that doesn't appear in the original form, but in my opinion, it's essential to explain to the user what the form is about.

The official position is that we don't add changes to the UI that don't exist in the original page. However, in this case, I vote that we keep the form title. Although I don't have a say in UI changes, you may want to discuss it with the team

I also noticed that you already applied the new folder structure. I like it, but now it's strange that some pages follow that structure and others don't. I would either move all the components to the new structure or none of them

A part from that, please, take a look at my comments and let me know if you have any question

src/Router.tsx Outdated Show resolved Hide resolved
src/Router.tsx Outdated Show resolved Hide resolved
src/components/ui/SeparationLine/SeparationLine.tsx Outdated Show resolved Hide resolved
src/views/create-dataset/CreateDataset.tsx Outdated Show resolved Hide resolved
src/views/create-dataset/CreateDataset.tsx Outdated Show resolved Hide resolved
src/views/create-dataset/CreateDataset.tsx Outdated Show resolved Hide resolved
src/views/create-dataset/CreateDataset.tsx Outdated Show resolved Hide resolved
@MellyGray MellyGray assigned M27Mangan and unassigned MellyGray Dec 6, 2023
@coveralls
Copy link

coveralls commented Dec 12, 2023

Coverage Status

coverage: 97.406% (-0.4%) from 97.805%
when pulling 6d184d7 on feature/231-create-dataset-boilerplate
into 4dba60a on develop.

@MellyGray
Copy link
Contributor

@M27Mangan, when you are done with the requested changes, please remember to reassign the PR to me and unassign yourself. This way, I will be aware that I can review it again

@GPortas GPortas self-requested a review December 13, 2023 11:44
src/sections/Route.enum.ts Outdated Show resolved Hide resolved
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.

Congratulations on your first PR, it looks promising!

I share some high level points that I think require changes. If you have any questions, I will be happy to review the points together. Feel free to ping me on Slack!

Regarding comments:

Let's try to make the code self-explanatory as much as we can and avoid adding comments that explain usual / obvious flows.

Let's also not add commented JSF code and keep the repository clean. If the UI of the JSF fragment you commented needs to be implemented in the SPA, let's create an issue to prioritize it.

Regarding Folder Structure:

Let's be consistent with the current folder structure.

Changing the structure even if the introduced one may be beneficial in certain aspects is a matter to be evaluated in more detail and prioritized independently. Doing so only in certain parts of the application and not in a general way makes the repository structure inconsistent and confusing (specially for new devs).

@M27Mangan
Copy link
Author

@MellyGray and @GPortas I plan on making some small adjustments to the project structure over the weekend that both of you had pointed out in this issue by moving some contents in 'src/sections'. I will open another PR by Monday for your review.

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.

As @GPortas highlighted:

Regarding comments:

Let's try to make the code self-explanatory as much as we can and avoid adding comments that explain usual / obvious flows.

Let's also not add commented JSF code and keep the repository clean.

To expand on this, I would advise against leaving any commented-out code in our codebase, not just JSF code

Besides, I suggest reviewing the Dataset.tsx page as a model for structuring the CreateDataset.tsx page

Here are some general guidelines:

  1. Place all UI rendering logic within CreateDataset.tsx. Feel free to create as many separate components as needed for UI rendering. The view should also handle the rendering of loading and error states.
  2. Implement a React hook for the submission logic. This hook should encapsulate the logic for invoking the use case from the domain layer and manage loading and error states. These states will then read by the view for rendering. Essentially, this hook will be kind of the Presenter
  3. Place the use case within the domain layer, ensuring it communicates with the appropriate repository.

src/Router.tsx Outdated Show resolved Hide resolved
src/views/create-dataset/CreateDataset.tsx Outdated Show resolved Hide resolved
src/views/create-dataset/CreateDatasetContainer.tsx Outdated Show resolved Hide resolved
src/views/create-dataset/CreateDataset.tsx Outdated Show resolved Hide resolved
src/views/create-dataset/CreateDatasetContainer.tsx Outdated Show resolved Hide resolved
src/views/create-dataset/CreateDataset.tsx Outdated Show resolved Hide resolved
src/views/create-dataset/CreateDataset.tsx Outdated Show resolved Hide resolved
src/views/create-dataset/CreateDatasetContainer.tsx Outdated Show resolved Hide resolved
@M27Mangan
Copy link
Author

Changes for review @MellyGray

@M27Mangan M27Mangan assigned MellyGray and unassigned M27Mangan Jan 22, 2024
@MellyGray MellyGray assigned M27Mangan and unassigned MellyGray Jan 24, 2024
@M27Mangan
Copy link
Author

Last round of changes (hopefully). If there's anything I missed from the most recent updates, please send them in Slack and I will take care of them first thing on Monday, thank you!

@M27Mangan M27Mangan assigned MellyGray and unassigned M27Mangan Jan 29, 2024
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.

@M27Mangan thanks for applying the suggested changes, looks good!

@MellyGray MellyGray removed their assignment Jan 29, 2024
@ekraffmiller ekraffmiller self-assigned this Jan 29, 2024
@ekraffmiller
Copy link
Contributor

Overall this looks very good!
Two things I noticed:

  1. The TopbarProgressIndicator never goes away - I think because isLoading is never set to false.

For this I think you need to set isLoading in a similar way to the view Dataset page. Except for this page, we don't have to wait for the dataset to load, so useCreateDatasetForm could have isLoading set to false.

Screenshot 2024-01-29 at 1 53 27 PM
2. The Cancel button currently seems to be triggering a submission, so it shows validation errors. Can we change this to have a separate handler?
Screenshot 2024-01-29 at 2 00 39 PM

@M27Mangan M27Mangan assigned ekraffmiller and unassigned M27Mangan Jan 29, 2024
@ekraffmiller
Copy link
Contributor

looks good!

@ekraffmiller ekraffmiller merged commit 74f3527 into develop Jan 29, 2024
11 of 14 checks passed
@MellyGray MellyGray deleted the feature/231-create-dataset-boilerplate branch March 18, 2024 17:55
jayanthkomarraju pushed a commit to jayanthkomarraju/dataverse-frontend that referenced this pull request May 31, 2024
…erplate

Feature/231 create dataset boilerplate
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: 3 A percentage of a sprint. 2.1 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.

Set up the boilerplate for the Create Dataset Form
5 participants