-
Notifications
You must be signed in to change notification settings - Fork 16
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
129 - Dataset Action Buttons UI #181
Merged
Merged
Changes from all commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
2f512a1
feat(DatasetActionButtons): add AccessDatasetMenu component
MellyGray a9b1df2
feat(DatasetActionButtons): add PublishDatasetMenu component
MellyGray 5c53570
feat(DatasetActionButtons): add ChangeCurationStatusMenu component
MellyGray 821d38f
feat(DesignSystem): add HTMLAttributes to ButtonGroup
MellyGray 610556b
feat(DatasetActionButtons): add stories
MellyGray e666312
feat(DropdownHeader): add DropdownHeader to the Design System
MellyGray 0f2a626
feat(DesignSystem): add disabled property to DropdownButtonItem
MellyGray d4a32f1
feat(DesignSystem): add disabled property to Dropdown
MellyGray e2736fc
feat(DatasetActionButtons): add SubmitForReviewButton component
MellyGray c295c7b
fix(DesignSystem): adding className to ButtonGroup
MellyGray 1c4ab2d
feat(DatasetActionButtons): add EditDatasetMenu component
MellyGray 17ef891
feat(DatasetActionButtons): add isValid property to Dataset model
MellyGray 6149156
feat(DatasetActionButtons): add LinkDatasetButton component
MellyGray a97d01e
feat(DatasetActionButtons): add Return to Author button to the Publis…
MellyGray eb2e7b6
feat(DatasetActionButtons): add translations
MellyGray b0cd203
fix: failing tests
MellyGray 750688d
fix(DatasetActionButtons): use global isReleased instead of version s…
MellyGray 068c6b9
feat(DatasetActionButtons): add stories
MellyGray ec335d9
Merge branch 'develop' of https://github.com/IQSS/dataverse-frontend …
MellyGray 53947e9
Merge branch 'develop' of https://github.com/IQSS/dataverse-frontend …
MellyGray 1c9a583
fix(test): JSDatasetMapper version check
MellyGray 603553b
feat(LinkDatasetButton): check user is authenticated
MellyGray 99c097d
feat(DatasetActionButtons): create DatasetProvider to get dataset fro…
MellyGray 23df052
Merge branch 'develop' of https://github.com/IQSS/dataverse-frontend …
MellyGray 74696e2
fix: timeout in some e2e tests
MellyGray 7fa9000
feat(DatasetUploadFilesButton): add dataset permissions
MellyGray 07dc40d
feat(EditFilesMenu): add dataset permissions
MellyGray f41efad
feat(FileOptionsMenu): add dataset permissions
MellyGray 99b2159
feat(IngestInfoMessage): add dataset permissions
MellyGray f219cf6
fix: remove unused hook
MellyGray 73d3944
fix: unit tests using dataset permissions
MellyGray d3e824b
fix(Loading): show when opening dataset page
MellyGray 21bc630
fix: e2e tests
MellyGray c152531
Merge branch 'develop' of https://github.com/IQSS/dataverse-frontend …
MellyGray 0541600
fix(actions): install playwright before running the tests
MellyGray d0cade8
fix(Stories): fix mocked data
MellyGray 6685508
fix(DatasetActionButtons): fix top alignment with the CitationBlock
MellyGray 3bad83e
fix(DatasetActionButton): single button fix border styles
MellyGray File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/design-system/src/lib/components/button-group/ButtonGroup.module.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
@import "src/lib/assets/styles/design-tokens/colors.module"; | ||
|
||
.border > button { | ||
.border > button, .border > [role="group"] > button { | ||
border: 1px solid $dv-button-border-color; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { createContext, useContext } from 'react' | ||
import { Dataset } from '../../dataset/domain/models/Dataset' | ||
|
||
interface DatasetContextProps { | ||
dataset: Dataset | undefined | ||
isLoading: boolean | ||
} | ||
export const DatasetContext = createContext<DatasetContextProps>({ | ||
dataset: undefined, | ||
isLoading: false | ||
}) | ||
|
||
export const useDataset = () => useContext(DatasetContext) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So to create an instance of a dataset model, you will also need to obtain the permissions that the current user has on the particular dataset. I'm not sure if coupling these permissions within the dataset model can be problematic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exactly like that, in order to create the Dataset you'll need the user permissions.
I understand your concern and these are the reasons to have them together:
I think the Dataset model is in reality the DatasetPage model, so its aim is to represent a DatasetPage, and the dataset page doesn't make sense without the permissions.
Very interesting conversation, please let me know if you can think of some problems of this approach