Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
b724a50
feat: use cases, repositories, etc
g-saracca Aug 25, 2025
92aa2dc
refactor: move LoadingContext and LoadingProvider to shared/contexts
g-saracca Aug 25, 2025
07685cc
feat: dataset explore tools
g-saracca Aug 25, 2025
1d76f0c
refactor: rename external tool URL methods and interfaces for clarity
g-saracca Aug 25, 2025
3576772
feat: add external tools mock repository and update related tests and…
g-saracca Aug 26, 2025
ac26865
Merge branch 'develop' into feat/814-external-tools-integration
g-saracca Aug 26, 2025
54c2c11
test: window open fails on github actions
g-saracca Aug 26, 2025
0e18505
fix: import
g-saracca Aug 26, 2025
014b61a
fix(DesignSystem): buttons in groups with tooltips
g-saracca Aug 27, 2025
b4ef180
fix: lint issues and unneeded button group
g-saracca Aug 27, 2025
bd03dc5
feat: add file preview icon on dataset files
g-saracca Aug 27, 2025
70da76d
feat: link and initial tabs logic
g-saracca Aug 27, 2025
f72f9fb
fix(DesignSystem): update button group styles for vertical alignment
g-saracca Aug 27, 2025
9cdabe3
feat: query and preview buttons on dataset file actions
g-saracca Aug 27, 2025
5667b2e
feat: improve responsive on mobile
g-saracca Aug 27, 2025
f979b8f
refactor: rename associated tools to applicable tools for clarity
g-saracca Aug 27, 2025
9fe9a27
feat(DesignSystem): Add size prop
g-saracca Aug 27, 2025
d0bc659
feat: initial tool switching
g-saracca Aug 27, 2025
247c399
feat: loading iframe, error handling, flickering, etc
g-saracca Aug 28, 2025
e197185
feat: finish with file embeded tools
g-saracca Aug 28, 2025
5f4378b
Added file tool options in access file menu and simplify things
g-saracca Aug 28, 2025
3684d2c
feat: enhance file action buttons and access menu with permission checks
g-saracca Aug 28, 2025
f5b5815
chore: tweaks
g-saracca Aug 28, 2025
1ad25a5
test: cases for file tools in dataset table files rows
g-saracca Aug 29, 2025
d79c4a3
feat: add stories
g-saracca Aug 29, 2025
cb623b8
test: adding more tests
g-saracca Aug 29, 2025
5b76d1b
refactor: reuse same component for dataset explore and configure options
g-saracca Aug 29, 2025
843fbd5
feat: file tool options
g-saracca Aug 29, 2025
8e7c685
feat: add configure tools in edit file menu
g-saracca Aug 29, 2025
f3028e2
feat: add configure tools in edit file menu in dtaset files
g-saracca Aug 29, 2025
7ad8f8e
feat: handle rendering according to permissions outside comp
g-saracca Aug 29, 2025
cf98a19
feat: add stories and tests
g-saracca Aug 29, 2025
1afd0ca
test: improve some test to reach 95%
g-saracca Aug 29, 2025
82d0c9b
test: improve coverage
g-saracca Sep 1, 2025
57edd81
Merge branch 'develop' into feat/814-external-tools-integration
g-saracca Sep 1, 2025
7e352ba
doc(DesignSystem): add docs about fix
g-saracca Sep 1, 2025
1a722b8
fix: update dataverse-client version and filter external tools withou…
g-saracca Sep 5, 2025
0dcf6fe
Merge branch 'develop' into feat/814-external-tools-integration
g-saracca Sep 10, 2025
77695e4
chore: update SPI and test realm json of keycloak
g-saracca Sep 10, 2025
3e0441b
chore: update js-dv version to alpha
g-saracca Sep 11, 2025
990474a
fix: code review stuff
g-saracca Sep 16, 2025
6847e08
Merge branch 'develop' into feat/814-external-tools-integration
g-saracca Sep 29, 2025
96229e5
docs: add to changelog
g-saracca Sep 29, 2025
8f31a93
docs: add to changelog fix lint
g-saracca Sep 29, 2025
ddaac8a
merge develop into 814
g-saracca Sep 30, 2025
570a29d
some tweaks to improve coverage
g-saracca Sep 30, 2025
beb9d1e
feat: improve design system coverage
g-saracca Sep 30, 2025
effbdec
Merge branch 'develop' into feat/814-external-tools-integration
g-saracca Sep 30, 2025
6778a6f
chore: storybook chromatic deployment fix
g-saracca Sep 30, 2025
ace1d9a
chore: unsync deps fix
g-saracca Sep 30, 2025
03cb7c5
chore: remove caret from chromatic dep
g-saracca Sep 30, 2025
a6e5921
test: code coverage
g-saracca Sep 30, 2025
0bbe8eb
test: fix e2e flaky test
g-saracca Sep 30, 2025
e200af0
fix: avoid showing alert warning if dataset templates fetch fails
g-saracca Sep 30, 2025
8b85924
Merge branch 'develop' into feat/814-external-tools-integration
g-saracca Oct 1, 2025
99312a9
fix: test after merge
g-saracca Oct 1, 2025
0eaecf5
test: improve coverage
g-saracca Oct 1, 2025
d3df63c
test: fix
g-saracca Oct 1, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 22 additions & 6 deletions .github/workflows/chromatic-design-system.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,37 @@ jobs:
runs-on: ubuntu-latest
# Job steps
steps:
- uses: actions/checkout@v1
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref || github.ref }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- name: Create .npmrc
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cp .npmrc.example .npmrc
sed -i -e 's/<YOUR_GITHUB_AUTH_TOKEN>/${{ secrets.GITHUB_TOKEN }}/g' .npmrc
sed -i -e 's/<YOUR_NPM_AUTH_TOKEN>/${{ secrets.NPM_AUTH_TOKEN }}/g' .npmrc
sed -i -e "s#<YOUR_GITHUB_AUTH_TOKEN>#${GITHUB_TOKEN}#g" .npmrc
# Comment out npmjs auth token line if no token provided via secrets
sed -i -e 's#//registry.npmjs.org/:_authToken=<YOUR_NPM_AUTH_TOKEN>#; auth token omitted in CI#g' .npmrc
- name: Install dependencies
# 👇 Install dependencies with the same package manager used in the project (replace it as needed), e.g. yarn, npm, pnpm
run: npm install
# 👇 Use clean install for reproducibility
run: npm ci
- name: Build Dataverse Design System
working-directory: packages/design-system
run: npm run build
# 👇 Adds Chromatic as a step in the workflow
- name: Publish to Chromatic
uses: chromaui/action@v1
uses: chromaui/action@latest
env:
CHROMATIC_BRANCH: ${{ github.event.pull_request.head.ref || github.ref_name }}
CHROMATIC_SHA: ${{ github.event.pull_request.head.sha || github.sha }}
CHROMATIC_SLUG: ${{ github.repository }}
# Chromatic GitHub Action options
with:
# 👇 Chromatic projectToken, refer to the manage page to obtain it.
Expand Down
29 changes: 23 additions & 6 deletions .github/workflows/chromatic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,41 @@ jobs:
runs-on: ubuntu-latest
# Job steps
steps:
- uses: actions/checkout@v1
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
# Ensure correct ref on PRs for proper baseline detection
ref: ${{ github.event.pull_request.head.ref || github.ref }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- name: Create .npmrc
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cp .npmrc.example .npmrc
sed -i -e 's/<YOUR_GITHUB_AUTH_TOKEN>/${{ secrets.GITHUB_TOKEN }}/g' .npmrc
sed -i -e 's/<YOUR_NPM_AUTH_TOKEN>/${{ secrets.NPM_AUTH_TOKEN }}/g' .npmrc
sed -i -e "s#<YOUR_GITHUB_AUTH_TOKEN>#${GITHUB_TOKEN}#g" .npmrc
# Comment out npmjs auth token line if no token provided via secrets
sed -i -e 's#//registry.npmjs.org/:_authToken=<YOUR_NPM_AUTH_TOKEN>#; auth token omitted in CI#g' .npmrc
- name: Install dependencies
# 👇 Install dependencies with the same package manager used in the project (replace it as needed), e.g. yarn, npm, pnpm
run: npm install
# 👇 Use clean install for reproducible CI installs
run: npm ci
# 👇 Adds Chromatic as a step in the workflow
# Install design system dependencies
- name: Build Dataverse Design System
working-directory: packages/design-system
run: npm run build
- name: Publish to Chromatic
uses: chromaui/action@v1
uses: chromaui/action@latest
env:
STORYBOOK_CHROMATIC_BUILD: 'true'
# Provide PR metadata to Chromatic for correct git/baseline context
CHROMATIC_BRANCH: ${{ github.event.pull_request.head.ref || github.ref_name }}
CHROMATIC_SHA: ${{ github.event.pull_request.head.sha || github.sha }}
CHROMATIC_SLUG: ${{ github.repository }}

# Chromatic GitHub Action options
with:
Expand Down
6 changes: 5 additions & 1 deletion .storybook/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import type { Preview } from '@storybook/react'
import { ThemeProvider } from '@iqss/dataverse-design-system'
import { createBrowserRouter, RouteObject, RouterProvider } from 'react-router-dom'
import { FakerHelper } from '../tests/component/shared/FakerHelper'
import { ExternalToolsProvider } from '../src/shared/contexts/external-tools/ExternalToolsProvider'
import { ExternalToolsEmptyMockRepository } from '../src/stories/shared-mock-repositories/externalTools/ExternalToolsMockRepository'
import 'react-loading-skeleton/dist/skeleton.css'
import '../src/assets/global.scss'
import '../src/assets/swal-custom.scss'
Expand Down Expand Up @@ -32,7 +34,9 @@ const preview: Preview = {

return (
<ThemeProvider>
<RouterProvider router={browserRouter} />
<ExternalToolsProvider externalToolsRepository={new ExternalToolsEmptyMockRepository()}>
<RouterProvider router={browserRouter} />
</ExternalToolsProvider>
</ThemeProvider>
)
}
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ This changelog follows the principles of [Keep a Changelog](https://keepachangel

- Dataset Templates Selector in the Create Dataset page.
- Metadata Export Dropdown to the metadata tab of Dataset Page and File Page.
- External Tools integration. All types supported: Explore, Configure, Preview and Query tools in Dataset and File pages. Still not showing external tools for Auxiliary Files as additional development is needed.

### Changed

Expand Down
30 changes: 21 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"@dnd-kit/sortable": "8.0.0",
"@dnd-kit/utilities": "3.2.2",
"@faker-js/faker": "7.6.0",
"@iqss/dataverse-client-javascript": "2.0.0-alpha.66",
"@iqss/dataverse-client-javascript": "2.0.0-alpha.67",
"@iqss/dataverse-design-system": "*",
"@istanbuljs/nyc-config-typescript": "1.0.2",
"@tanstack/react-table": "8.9.2",
Expand Down Expand Up @@ -141,7 +141,7 @@
"babel-plugin-named-exports-order": "0.0.2",
"chai": "4.3.7",
"chai-as-promised": "7.1.1",
"chromatic": "6.24.1",
"chromatic": "13.3.0",
"concurrently": "8.0.1",
"cypress": "15.2.0",
"cypress-vite": "1.4.0",
Expand Down
2 changes: 2 additions & 0 deletions packages/design-system/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
- **SelectAdvanced:**
- Fix word wrapping in options list to prevent overflow and ensure long text is displayed correctly.
- Support for options with a shape of `{ label: string; value: string; }[]` instead of just `string[]`.
- **ButtonGroup:**
- Fix styles for vertical button groups when using tooltips.

# [2.0.2](https://github.com/IQSS/dataverse-frontend/compare/@iqss/dataverse-design-system@2.0.1...@iqss/dataverse-design-system@2.0.2) (2024-06-23)

Expand Down
2 changes: 1 addition & 1 deletion packages/design-system/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"@testing-library/cypress": "10.1.0",
"@vitejs/plugin-react": "4.3.1",
"axe-playwright": "1.2.3",
"chromatic": "6.24.1",
"chromatic": "13.3.0",
"cypress": "15.2.0",
"react": "18.2.0",
"vite": "5.4.20",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,17 +128,75 @@ th {
vertical-align: middle;
}

.btn-group > div:not(:last-child) > .btn-group > .btn,
.btn-group-vertical > div:not(:last-child) > .btn-group > .btn {
/* Start - Overrides to Fix Group Butttons with Buttons with Tooltips */

.btn-group > .btn,
.btn-group > div > .btn {
margin-left: -1px;
}

.btn-group-vertical > .btn-group > .btn,
.btn-group-vertical > div:not([role='group']) > .btn-group > .btn {
margin-left: 0;
}

/* stylelint-disable */
.btn-group-vertical > .btn,
.btn-group-vertical > div > .btn {
margin-top: -1px;
}

.btn-group-vertical > .btn:not(:last-child, :first-child),
.btn-group-vertical > div:not(:last-child, :first-child, [role='group']),
.btn-group-vertical > div:not(:last-child, :first-child, [role='group']) > .btn-group {
border-radius: 0;
}

.btn-group > div:not(:first-child) > .btn {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}

.btn-group > div:not(:last-child) > .btn {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}

.btn-group-vertical > div:not([role='group']),
.btn-group-vertical > div:not([role='group']) > .btn,
.btn-group-vertical > div:not([role='group']) > .btn-group {
width: 100%;
}

.btn-group-vertical
> div:not(:first-child, :last-child, [role='group'])
> .btn:not(.dropdown-toggle),
.btn-group-vertical > div:not(:last-child, :first-child, [role='group']) > .btn-group > .btn {
border-radius: 0;
}

.btn-group-vertical > div:first-child:not([role='group']) > .btn:not(.dropdown-toggle),
.btn-group-vertical > div:first-child:not([role='group']) > .btn-group > .btn {
border-bottom-right-radius: 0;
border-bottom-left-radius: 0;
}

.btn-group-vertical > div:last-child:not([role='group']) > .btn:not(.dropdown-toggle),
.btn-group-vertical > div:last-child:not([role='group']) > .btn-group > .btn {
border-top-left-radius: 0;
border-top-right-radius: 0;
}

.btn-group > div:not(:last-child) > .btn-group > .btn {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}

.btn-group > div:not(:first-child) > .btn-group > .btn,
.btn-group-vertical > div:not(:first-child) > .btn-group > .btn {
.btn-group > div:not(:first-child) > .btn-group > .btn {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
/* End - Overrides to Fix Group Butttons with Buttons with Tooltips */

.btn-link {
text-decoration: none;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
@import 'src/lib/assets/styles/design-tokens/colors.module';

.border > button,
.border > [role='group'] > button {
.border > [role='group'] > button,
.border > button:not(.dropdown-item) {
border: 1px solid $dv-button-border-color;
}

.border > div {
&:global > .btn {
border: 1px solid $dv-button-border-color;
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { OverlayTrigger as OverlayTriggerBS, Tooltip as TooltipBS } from 'react-bootstrap'
import { Placement } from 'react-bootstrap/types'
import { OverlayTrigger as OverlayTriggerBS, Tooltip as TooltipBS } from 'react-bootstrap'
import { ReactElement } from 'react'

interface OverlayTriggerProps {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,25 @@ export const VerticalButtonGroup: Story = {
)
}

export const VerticalButtonGroupWithTooltips: Story = {
render: () => (
<ButtonGroup vertical>
<Tooltip placement="right" overlay="Share">
<Button variant="secondary">Share</Button>
</Tooltip>
<Tooltip placement="right" overlay="Contact Owner">
<Button variant="secondary">Contact Owner</Button>
</Tooltip>
<Tooltip placement="right" overlay="Contact Owner">
<Button variant="secondary">Contact Owner</Button>
</Tooltip>
<Tooltip placement="right" overlay="Contact Owner">
<Button variant="secondary">Contact Owner</Button>
</Tooltip>
</ButtonGroup>
)
}

export const NestedButtonGroups: Story = {
render: () => (
<ButtonToolbar ariaLabel="Toolbar with button groups">
Expand Down Expand Up @@ -99,6 +118,9 @@ export const ButtonGroupWithTooltips: Story = {
<DropdownButtonItem href="/item-2">Item 2</DropdownButtonItem>
</DropdownButton>
</Tooltip>
<Tooltip placement="top" overlay="Simple Button with Tooltip">
<Button variant="secondary">Other Action</Button>
</Tooltip>
</ButtonGroup>
)
}
5 changes: 5 additions & 0 deletions packages/design-system/tests/component/button/Button.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,9 @@ describe('Button', () => {
cy.mount(<Button type="submit">{clickMeText}</Button>)
cy.findByText(clickMeText).should('have.attr', 'type').and('eq', 'submit')
})

it('renders the button with the spacing styles when the spacing prop is provided', () => {
cy.mount(<Button withSpacing>{clickMeText}</Button>)
cy.findByText(clickMeText).should('have.css', 'margin').and('not.eq', '0px')
})
})
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,10 @@ describe('ProgressBar', () => {

cy.findByRole('progressbar').should('exist')
})

it('renders the ProgressBar without a now progress', () => {
cy.mount(<ProgressBar />)

cy.findByRole('progressbar').should('exist')
})
})
Loading
Loading