Skip to content
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
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
7 changes: 5 additions & 2 deletions .github/workflows/deploy-beta-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
branches:
- develop

env:
FRONTEND_BASE_PATH: /modern

jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -31,7 +34,7 @@ jobs:
run: npm run build

- name: Build with base path
run: npm run build -- --base=/spa
run: npm run build -- --base=${{ env.FRONTEND_BASE_PATH }}

- name: Override runtime config.js for BETA
env:
Expand Down Expand Up @@ -115,4 +118,4 @@ jobs:
ASADMIN='/usr/local/payara6/bin/asadmin --user admin'
DATAVERSE_FRONTEND=`$ASADMIN list-applications |grep $APPLICATION_NAME |awk '{print $1}'`
$ASADMIN undeploy $DATAVERSE_FRONTEND
$ASADMIN deploy --name $APPLICATION_NAME --contextroot /spa $APPLICATION_WAR_PATH
$ASADMIN deploy --name $APPLICATION_NAME --contextroot ${{ env.FRONTEND_BASE_PATH }} $APPLICATION_WAR_PATH
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
- qa
- demo
basepath:
description: 'Server base path (without slashes) for serving the application (e.g., spa). If left blank, it will try to deploy to the root base path.'
description: 'Server base path (without slashes) for serving the application (e.g., modern). If left blank, it will try to deploy to the root base path.'
type: string
required: false

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/generate-war.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
- qa
- demo
basepath:
description: 'Server base path (without slashes) for serving the application (e.g., spa). If left blank, it will try to deploy to the root base path.'
description: 'Server base path (without slashes) for serving the application (e.g., modern). If left blank, it will try to deploy to the root base path.'
type: string
required: false

Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ This changelog follows the principles of [Keep a Changelog](https://keepachangel
- Upgrade Keycloak to 26.3.2; updated SPI and test realm JSON.
- Truncate long collection and dataset descriptions with expandable content. (#789)
- UI polish: Files Table always shows action buttons. (#800)
- Removed hard-coded references to /spa path and SPA name, changed to /modern (#945)

### Fixed

Expand Down
8 changes: 4 additions & 4 deletions DEVELOPER_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ project files and shut down any running containers.

Once the script has finished, you will be able to access Dataverse via:

- Dataverse SPA Frontend: [http://localhost:8000/spa][dv_app_localhost_spa_url]
- Dataverse MODERN Frontend: [http://localhost:8000/modern][dv_app_localhost_modern_url]
- Dataverse JSF Application: [http://localhost:8000][dv_app_localhost_legacy_url]

Note: The Dataverse configbaker takes some time to start the application, so the application will not be accessible until
Expand Down Expand Up @@ -802,7 +802,7 @@ describe('Create Dataset', () => {
})

it('navigates to the new dataset after submitting a valid form', () => {
cy.visit('/spa/datasets/root/create')
cy.visit(`${FRONTEND_BASE_PATH}/datasets/root/create`)

cy.findByLabelText(/Title/i).type('Test Dataset Title')
cy.findByLabelText(/Author Name/i).type('Test author name', { force: true })
Expand Down Expand Up @@ -885,7 +885,7 @@ it(
}
)

cy.visit('/spa/')
cy.visit(`${FRONTEND_BASE_PATH}/`)

// Assertions that rely on your overridden config
cy.findByText('English').should('exist')
Expand Down Expand Up @@ -1134,7 +1134,7 @@ path included will redirect to the frontend application.
[dv_app_localhost_build_url]: http://localhost:5173
[dv_app_localhost_storybook_url]: http://localhost:6006/
[dv_app_localhost_designsystem_url]: http://localhost:6007/
[dv_app_localhost_spa_url]: http://localhost:8000/spa
[dv_app_localhost_modern_url]: http://localhost:8000/modern
[dv_app_localhost_legacy_url]: http://localhost:8000/

<!-- @gdcc/dataverse -->
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<br />
<br />
<a href="https://www.dataverse.org">Website</a> |
<a href="https://beta.dataverse.org/spa">View Demo (BETA)</a> |
<a href="https://beta.dataverse.org/modern">View Demo (BETA)</a> |
<a href="https://github.com/IQSS/dataverse-frontend/issues">Report Bug</a> |
<a href="https://github.com/IQSS/dataverse-frontend/issues">Request Feature</a>
</p>
Expand Down Expand Up @@ -139,21 +139,21 @@ All environments follow an “all-in-one” setup, where the frontend and backen
The **Beta** environment provides a remote space for testing the latest changes. GitHub Actions automatically deploy the current `develop` branches of both the frontend and backend.

- **Audience:** Development team, QA analysts, project managers, selected users for early feedback
- **URL:** [beta.dataverse.org/spa][dv_app_beta_spa_url]
- **URL:** [beta.dataverse.org/modern][dv_app_beta_modern_url]

#### Demo

The **Demo** environment showcases the latest officially released version of the SPA, compatible with the latest Dataverse backend release. Deployments target specific tagged releases (e.g., `0.1.0`) and are performed on demand.

- **Audience:** Project managers, curation team, early adoption testers
- **URL:** [demo.dataverse.org/spa][dv_app_demo_spa_url]
- **URL:** [demo.dataverse.org/modern][dv_app_demo_modern_url]

#### QA

The **QA** environment is a dedicated, short-lived testing space. It is deployed on demand with feature branches (e.g., `feature/xxx`), frequently overwritten, and used for validating new features and bug fixes before merging into development.

- **Audience:** QA analysts, development team
- **URL:** [qa.dataverse.org/spa][dv_app_qa_spa_url]
- **URL:** [qa.dataverse.org/modern][dv_app_qa_modern_url]

#### Spike Environments

Expand Down Expand Up @@ -397,15 +397,15 @@ Distributed under the Apache License, Version 2.0. See [LICENSE](LICENSE) for mo
<!-- Application Instances -->
<!-- [dv_app_] -->

[dv_app_beta_spa_url]: https://beta.dataverse.org/spa
[dv_app_demo_spa_url]: https://demo.dataverse.org/spa
[dv_app_qa_spa_url]: https://qa.dataverse.org/spa
[dv_app_beta_modern_url]: https://beta.dataverse.org/modern
[dv_app_demo_modern_url]: https://demo.dataverse.org/modern
[dv_app_qa_modern_url]: https://qa.dataverse.org/modern
[dv_app_beta_legacyjsf_url]: https://beta.dataverse.org
[dv_app_legacyjsf_demo_url]: https://demo.dataverse.org/
[dv_app_localhost_build_url]: http://localhost:5173
[dv_app_localhost_storybook_url]: http://localhost:6006/
[dv_app_localhost_designsystem_url]: http://localhost:6007/
[dv_app_localhost_spa_url]: http://localhost:8000/spa
[dv_app_localhost_modern_url]: http://localhost:8000/modern
[dv_app_localhost_legacy_url]: http://localhost:8000/

<!-- @gdcc/dataverse -->
Expand Down
1 change: 1 addition & 0 deletions cypress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export default defineConfig({
}
},
env: {
frontendBasePath: '/modern',
backendUrl: 'http://localhost:8000',
oidcClientId: 'test',
oidcAuthorizationEndpoint: 'http://localhost:8000/realms/test/protocol/openid-connect/auth',
Expand Down
2 changes: 1 addition & 1 deletion dev-env/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ http {
}

# Route for SPA frontend
location /spa {
location /modern {
proxy_pass http://frontend:5173;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
Expand Down
2 changes: 1 addition & 1 deletion dev-env/shib-dev-env/nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ http {
}

# Route for SPA frontend
location /spa {
location /modern {
proxy_pass http://frontend:5173;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
Expand Down
1 change: 1 addition & 0 deletions dev-env/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import istanbul from 'vite-plugin-istanbul'
import * as path from 'path'

export default defineConfig({
base: '/modern',
plugins: [
react(),
istanbul({
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"zod": "4.1.12"
},
"scripts": {
"start": "vite --base=/spa",
"start": "vite",
"build": "tsc && vite build",
"build-keycloak-theme": "npm run build && keycloakify build",
"preview": "vite preview",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export const WithAllFormats: Story = {
render: () => (
<RichTextEditor
initialValue={
'<h1 class="rte-heading">Heading 1</h1><h2 class="rte-heading">Heading 2</h2><h3 class="rte-heading">Heading 3</h3><p class="rte-paragraph">Hello <strong class="rte-bold">Dataverse</strong> <em class="rte-italic">new </em><s class="rte-strike">rick</s> <strong class="rte-bold">rich</strong> <em class="rte-italic">text</em> <code class="rte-code">editor</code>! This is a <a target="_blank" rel="noopener noreferrer nofollow" class="rte-link" href="https://beta.dataverse.org/spa/">link</a>.</p><ul class="rte-bullet-list"><li><p class="rte-paragraph">Item</p></li><li><p class="rte-paragraph">Item</p></li></ul><ol class="rte-ordered-list"><li><p class="rte-paragraph">Item 1</p></li><li><p class="rte-paragraph">Item 2</p></li></ol><pre class="rte-code-block"><code class="language-typescriptreact">onUpdate: ({ editor }) =&gt; onChange &amp;&amp; onChange(editor.getHTML())</code></pre><blockquote class="rte-blockquote"><p class="rte-paragraph">This is a blockquoute</p></blockquote><img src="https://picsum.photos/id/237/200/300" alt="A random image from picsum" class="rte-img rte-w-25">'
'<h1 class="rte-heading">Heading 1</h1><h2 class="rte-heading">Heading 2</h2><h3 class="rte-heading">Heading 3</h3><p class="rte-paragraph">Hello <strong class="rte-bold">Dataverse</strong> <em class="rte-italic">new </em><s class="rte-strike">rick</s> <strong class="rte-bold">rich</strong> <em class="rte-italic">text</em> <code class="rte-code">editor</code>! This is a <a target="_blank" rel="noopener noreferrer nofollow" class="rte-link" href="https://beta.dataverse.org/modern/">link</a>.</p><ul class="rte-bullet-list"><li><p class="rte-paragraph">Item</p></li><li><p class="rte-paragraph">Item</p></li></ul><ol class="rte-ordered-list"><li><p class="rte-paragraph">Item 1</p></li><li><p class="rte-paragraph">Item 2</p></li></ol><pre class="rte-code-block"><code class="language-typescriptreact">onUpdate: ({ editor }) =&gt; onChange &amp;&amp; onChange(editor.getHTML())</code></pre><blockquote class="rte-blockquote"><p class="rte-paragraph">This is a blockquoute</p></blockquote><img src="https://picsum.photos/id/237/200/300" alt="A random image from picsum" class="rte-img rte-w-25">'
}
onChange={handleChange}
/>
Expand Down
4 changes: 2 additions & 2 deletions src/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ void i18next
returnNull: false,
backend: {
loadPath:
import.meta.env.BASE_URL != '/spa'
import.meta.env.BASE_URL != '/modern'
? `${import.meta.env.BASE_URL}locales/{{lng}}/{{ns}}.json`
: `/spa/locales/{{lng}}/{{ns}}.json`
: `/modern/locales/{{lng}}/{{ns}}.json`
}
})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ export class FeaturedItemsFormHelper {
}

/**
* @description This method parses a URL to extract the type and identifier of a Dataverse object (Collection, Dataset, or File). Works for URL's from the SPA and JSF versions of Dataverse.
* @description This method parses a URL to extract the type and identifier of a Dataverse object (Collection, Dataset, or File). Works for URLs from the modern frontend and JSF versions of Dataverse.
* @param input - The URL or DOI string to parse.
* @returns An object containing the type and identifier of the Dataverse object, or null if the input is not a valid URL or does not match any known patterns.
*/
Expand All @@ -165,7 +165,7 @@ export class FeaturedItemsFormHelper {

try {
const url = new URL(value)
const path = url.pathname.replace(/^\/spa/, '') // reomve "/spa" if exists
const path = url.pathname.replace(/^\/modern/, '') // remove "/modern" if exists
const searchParams = url.searchParams

// --- COLLECTION ---
Expand Down Expand Up @@ -213,7 +213,7 @@ export class FeaturedItemsFormHelper {
}

/**
* @description This method transforms the type and identifier of a Dataverse object into a URL for the SPA version of Dataverse.
* @description This method transforms the type and identifier of a Dataverse object into a URL for the Modern version of Dataverse.
* @param type - The type of the Dataverse object (Collection, Dataset, or File).
* @param identifier - The identifier of the Dataverse object (e.g., alias for Collection, persistent ID for Dataset, or file ID for File).
* @returns A string representing the URL for the specified Dataverse object.
Expand Down Expand Up @@ -244,7 +244,7 @@ export class FeaturedItemsFormHelper {

try {
const url = new URL(trimmed)
const path = url.pathname.replace(/^\/spa/, '') // remove "/spa" if exists
const path = url.pathname.replace(/^\/modern/, '') // remove "/modern" if exists
const searchParams = url.searchParams

// --- COLLECTION ---
Expand Down
2 changes: 1 addition & 1 deletion src/sections/layout/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export function Layout() {
{HeaderFactory.create()}
{/* <div className="alert alert-warning rounded-0" role="alert">
<div className="container">
You are using the new Dataverse <strong>SPA version</strong>. This is an early release and
You are using the new Dataverse <strong>Modern version</strong>. This is an early release and
some features from the original site are not yet available.
</div>
</div> */}
Expand Down
4 changes: 3 additions & 1 deletion src/sections/layout/header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import { encodeReturnToPathInStateQueryParam } from '@/sections/auth-callback/Au
import { LanguageSwitcher } from './LanguageSwitcher'
import styles from './Header.module.scss'

const BASENAME_URL = import.meta.env.BASE_URL ?? ''

interface HeaderProps {
notficationRepository: NotificationRepository
}
Expand All @@ -32,7 +34,7 @@ export function Header({ notficationRepository }: HeaderProps) {
<Navbar
brand={{
title: t('brandTitle'),
href: `/spa${Route.HOME}`,
href: `${BASENAME_URL}${Route.HOME}`,
logoImgSrc: dataverse_logo
}}
className={styles.navbar}>
Expand Down
2 changes: 1 addition & 1 deletion src/sections/not-implemented/NotImplementedModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export function NotImplementedModal({ show, handleClose }: NotImplementedModalPr
<Modal.Title>{modalTitle}</Modal.Title>
</Modal.Header>
<Modal.Body>
<p>This feature is not implemented yet in SPA.</p>
<p>This feature is not implemented yet in the Modern version.</p>
<p>
If you want to use this feature you can go to the original{' '}
<a href={baseUrl}>Dataverse page</a>.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export class FeaturedItemMother {
imageFileUrl: '/storybook/css.webp',
displayOrder: 1,
content:
'<h1 class="rte-heading">Some Title</h1><p class="rte-paragraph">Hello <strong class="rte-bold">Dataverse</strong> <em class="rte-italic">new </em><s class="rte-strike">rick</s> <strong class="rte-bold">rich</strong> <em class="rte-italic">text</em> <code class="rte-code">editor</code>! This is a <a target="_blank" rel="noopener noreferrer nofollow" class="rte-link" href="https://beta.dataverse.org/spa/">link</a>.</p><ul class="rte-bullet-list"><li><p class="rte-paragraph">Item</p></li><li><p class="rte-paragraph">Item</p></li></ul><ol class="rte-ordered-list"><li><p class="rte-paragraph">Item 1</p></li><li><p class="rte-paragraph">Item 2</p></li></ol><pre class="rte-code-block"><code class="language-typescriptreact">onUpdate: ({ editor }) =&gt; onChange &amp;&amp; onChange(editor.getHTML())</code></pre><blockquote class="rte-blockquote"><p class="rte-paragraph">This is a blockquoute</p></blockquote><p class="rte-paragraph"></p><p class="rte-paragraph"></p>'
'<h1 class="rte-heading">Some Title</h1><p class="rte-paragraph">Hello <strong class="rte-bold">Dataverse</strong> <em class="rte-italic">new </em><s class="rte-strike">rick</s> <strong class="rte-bold">rich</strong> <em class="rte-italic">text</em> <code class="rte-code">editor</code>! This is a <a target="_blank" rel="noopener noreferrer nofollow" class="rte-link" href="https://beta.dataverse.org/modern/">link</a>.</p><ul class="rte-bullet-list"><li><p class="rte-paragraph">Item</p></li><li><p class="rte-paragraph">Item</p></li></ul><ol class="rte-ordered-list"><li><p class="rte-paragraph">Item 1</p></li><li><p class="rte-paragraph">Item 2</p></li></ol><pre class="rte-code-block"><code class="language-typescriptreact">onUpdate: ({ editor }) =&gt; onChange &amp;&amp; onChange(editor.getHTML())</code></pre><blockquote class="rte-blockquote"><p class="rte-paragraph">This is a blockquoute</p></blockquote><p class="rte-paragraph"></p><p class="rte-paragraph"></p>'
},
{
id: 2,
Expand Down Expand Up @@ -58,7 +58,7 @@ export class FeaturedItemMother {
imageFileUrl: `/storybook/${img}.webp`,
displayOrder: 1,
content:
'<h1 class="rte-heading">Some Title</h1><p class="rte-paragraph">Hello <strong class="rte-bold">Dataverse</strong> <em class="rte-italic">new </em><s class="rte-strike">rick</s> <strong class="rte-bold">rich</strong> <em class="rte-italic">text</em> <code class="rte-code">editor</code>! This is a <a target="_blank" rel="noopener noreferrer nofollow" class="rte-link" href="https://beta.dataverse.org/spa/">link</a>.</p><ul class="rte-bullet-list"><li><p class="rte-paragraph">Item</p></li><li><p class="rte-paragraph">Item</p></li></ul><ol class="rte-ordered-list"><li><p class="rte-paragraph">Item 1</p></li><li><p class="rte-paragraph">Item 2</p></li></ol><pre class="rte-code-block"><code class="language-typescriptreact">onUpdate: ({ editor }) =&gt; onChange &amp;&amp; onChange(editor.getHTML())</code></pre><blockquote class="rte-blockquote"><p class="rte-paragraph">This is a blockquoute</p></blockquote><p class="rte-paragraph"></p><p class="rte-paragraph"></p>',
'<h1 class="rte-heading">Some Title</h1><p class="rte-paragraph">Hello <strong class="rte-bold">Dataverse</strong> <em class="rte-italic">new </em><s class="rte-strike">rick</s> <strong class="rte-bold">rich</strong> <em class="rte-italic">text</em> <code class="rte-code">editor</code>! This is a <a target="_blank" rel="noopener noreferrer nofollow" class="rte-link" href="https://beta.dataverse.org/modern/">link</a>.</p><ul class="rte-bullet-list"><li><p class="rte-paragraph">Item</p></li><li><p class="rte-paragraph">Item</p></li></ul><ol class="rte-ordered-list"><li><p class="rte-paragraph">Item 1</p></li><li><p class="rte-paragraph">Item 2</p></li></ol><pre class="rte-code-block"><code class="language-typescriptreact">onUpdate: ({ editor }) =&gt; onChange &amp;&amp; onChange(editor.getHTML())</code></pre><blockquote class="rte-blockquote"><p class="rte-paragraph">This is a blockquoute</p></blockquote><p class="rte-paragraph"></p><p class="rte-paragraph"></p>',
...props
}
}
Expand Down
2 changes: 1 addition & 1 deletion tests/component/info/domain/models/TermsOfUseMother.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export class TermsOfUseMother {
}

static createWithOnClickScript(): TermsOfUse {
return '<h3>Terms of Use SPA dev</h3><p>Please see our full <a href="https://beta.dataverse.org/spa/">terms of use</a></p><p onclick="alert(\'this alert is to text sanitization\')">Thanks for reading!</p>'
return '<h3>Terms of Use dev</h3><p>Please see our full <a href="https://beta.dataverse.org/modern/">terms of use</a></p><p onclick="alert(\'this alert is to text sanitization\')">Thanks for reading!</p>'
}

static createEmpty(): TermsOfUse {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ describe('EditCollectionDropdown', () => {
cy.findByRole('button', { name: 'Permissions' }).click()

cy.findByText('Not Implemented').should('exist')
cy.findByText('This feature is not implemented yet in SPA.').should('exist')
cy.findByText(/This feature is not implemented yet in the Modern version./i).should('exist')
})

describe('delete button', () => {
Expand Down
Loading
Loading