Skip to content

Commit e1957ab

Browse files
authored
Merge pull request #835 from IQSS/feat/361-link-collection-and-link-dataset
Link Collection & Link Dataset
2 parents 212fa23 + 1a42334 commit e1957ab

File tree

60 files changed

+2924
-79
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+2924
-79
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ This changelog follows the principles of [Keep a Changelog](https://keepachangel
1111
- Added the value entered by the user in the error messages for metadata field validation errors in EMAIL and URL type fields. For example, instead of showing “Point of Contact E-mail is not a valid email address.“, we now show “Point of Contact E-mail foo is not a valid email address.”
1212
- Contact Owner button in File Page.
1313
- Share button in File Page.
14+
- Link Collection and Link Dataset features.
1415

1516
### Changed
1617

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"@dnd-kit/sortable": "8.0.0",
1919
"@dnd-kit/utilities": "3.2.2",
2020
"@faker-js/faker": "7.6.0",
21-
"@iqss/dataverse-client-javascript": "2.0.0-alpha.76",
21+
"@iqss/dataverse-client-javascript": "2.0.0-alpha.77",
2222
"@iqss/dataverse-design-system": "*",
2323
"@istanbuljs/nyc-config-typescript": "1.0.2",
2424
"@tanstack/react-table": "8.9.2",

packages/design-system/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
2828
- Fix word wrapping in options list to prevent overflow and ensure long text is displayed correctly.
2929
- **ButtonGroup:**
3030
- Fix styles for vertical button groups when using tooltips.
31+
- **FormText:** Add `className` prop to allow custom styling.
32+
- **FormInput:** Add `size` prop to allow different input sizes (e.g., 'sm', 'lg'). Defaults to standard size if not specified.
3133

3234
# [2.0.2](https://github.com/IQSS/dataverse-frontend/compare/@iqss/[email protected]...@iqss/[email protected]) (2024-06-23)
3335

packages/design-system/src/lib/components/form/form-group/form-element/FormInput.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export interface FormInputProps extends Omit<React.InputHTMLAttributes<FormInput
1414
required?: boolean
1515
autoFocus?: boolean
1616
autoComplete?: string
17+
size?: 'sm' | 'lg'
1718
}
1819

1920
export const FormInput = React.forwardRef(function FormInput(
@@ -28,6 +29,7 @@ export const FormInput = React.forwardRef(function FormInput(
2829
required,
2930
autoFocus,
3031
autoComplete,
32+
size,
3133
...props
3234
}: FormInputProps,
3335
ref
@@ -45,6 +47,7 @@ export const FormInput = React.forwardRef(function FormInput(
4547
required={required}
4648
autoFocus={autoFocus}
4749
autoComplete={autoComplete}
50+
size={size}
4851
ref={ref as React.ForwardedRef<HTMLInputElement>}
4952
{...props}
5053
/>
Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
import { ReactNode } from 'react'
22
import { Form as FormBS } from 'react-bootstrap'
33

4-
export function FormText({ children }: { children: ReactNode }) {
5-
return <FormBS.Text muted>{children}</FormBS.Text>
4+
export function FormText({ children, className }: { children: ReactNode; className?: string }) {
5+
return (
6+
<FormBS.Text muted className={className}>
7+
{children}
8+
</FormBS.Text>
9+
)
610
}

public/locales/en/collection.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,5 +69,11 @@
6969
},
7070
"collectionDeletedSuccess": "Your collection has been deleted.",
7171
"defaultCollectionDeleteError": "Something went wrong deleting the collection. Try again later.",
72-
"description": "Description"
72+
"description": "Description",
73+
"linkCollection": {
74+
"title": "Link Collection",
75+
"helper": "Choose which of your collections you would like to link this collection to.",
76+
"save": "Save Linked Collection",
77+
"success": "<wrapper>{{linkedCollectionName}} has been successfully linked to <a>{{linkingCollectionName}}</a></wrapper>"
78+
}
7379
}

public/locales/en/dataset.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,17 @@
3636
"removeCurrentStatus": "Remove Current Status"
3737
},
3838
"linkDataset": {
39-
"title": "Link Dataset"
39+
"title": "Link Dataset",
40+
"helper": "Choose which of your collections you would like to link this dataset to.",
41+
"linkedCollections": "Note: This dataset is already linked to the following collections:",
42+
"save": "Link",
43+
"success": "<wrapper>Dataset from {{parentCollection}} has been successfully linked to <a>{{linkingCollectionName}}</a></wrapper>"
44+
},
45+
"unlinkDataset": {
46+
"title": "Unlink Dataset",
47+
"helper": "Choose which of your collections you would like to unlink this dataset from.",
48+
"save": "Unlink",
49+
"success": "<wrapper>Dataset unlinked from <a>{{unlinkingCollectionName}}</a></wrapper>"
4050
},
4151
"editDataset": {
4252
"title": "Edit Dataset",

public/locales/en/shared.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
"dragHandleLabel": "press space to select and keys to drag",
2828
"unknown": "Unknown",
2929
"find": "Find",
30+
"link": "Link",
3031
"allowPopups": "You must enable popups in your browser to open external tools in a new window or tab.",
3132
"externalToolOpeningFailed": "There was a problem opening the external tool. Please try again.",
3233
"exportMetadata": "Export Metadata",
@@ -304,6 +305,16 @@
304305
"truncateMoreTip": "Click to read the full {{contentName}}",
305306
"truncateLessTip": "Click to collapse the {{contentName}}"
306307
},
308+
"collectionLinkSelect": {
309+
"label": "Your Collection",
310+
"select": "Select a Collection",
311+
"placeholder": "Enter Collection Name",
312+
"noOptions": "No collections found",
313+
"onlyOneCollectionToLink": "You have one collection you can link this {{linkingObjectType}} to.",
314+
"onlyOneCollectionToUnlink": "You have one collection you can unlink this {{linkingObjectType}} from.",
315+
"noCollectionsToLink": "No collections are showing up to link. They may already be linked, or you might not have any yet. Create a new collection to continue.",
316+
"noCollectionsToUnlink": "No collections are showing up to unlink."
317+
},
307318
"exploreOptions": "Explore Options",
308319
"queryOptions": "Query Options",
309320
"configureOptions": "Configure Options"

src/assets/react-toastify-custom.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@
77
--toastify-color-warning: #{$dv-warning-color};
88
--toastify-color-error: #{$dv-danger-color};
99
--toastify-font-family: #{$dv-font-family};
10+
--toastify-toast-padding: 14px 28px 14px 14px;
1011
}

0 commit comments

Comments
 (0)