Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
4c6c603
refactor(client): move pages routes into new router file
yannisbarlas Jun 11, 2026
f1dd3ac
refactor(ui): move layout to ui and add storybook
yannisbarlas Jun 11, 2026
1eb48ab
refactor(client): move menu logic out of adminpage
yannisbarlas Jun 11, 2026
d06cdc2
refactor(client): move all routes into router
yannisbarlas Jun 15, 2026
9979b9b
refactor(client): organize root queries
yannisbarlas Jun 15, 2026
fde4c25
fix(client): make sure to redirect to profile is user has no email
yannisbarlas Jun 16, 2026
fca392f
fix(client): add useMemo for config in group page
yannisbarlas Jun 16, 2026
4b86426
fix(client): fix polling flickering
yannisbarlas Jun 16, 2026
ad500db
chore(client): add comment on route
yannisbarlas Jun 16, 2026
03b53fa
Merge branch 'staging' into router
yannisbarlas Jun 19, 2026
3bdde0e
chore(*): update changes.md
yannisbarlas Jun 19, 2026
0ae935c
Merge branch 'dropdowns' into router
yannisbarlas Jun 22, 2026
66778fe
test(*): fix e2e tests
yannisbarlas Jun 22, 2026
897e2a3
test(*): more test fixes
yannisbarlas Jun 22, 2026
c9f2cbb
Merge branch 'staging' into router
yannisbarlas Jun 30, 2026
21918f2
Merge branch 'staging' into router
yannisbarlas Jul 6, 2026
739267c
fix(ui): fix new coar route
yannisbarlas Jul 6, 2026
2a7276d
fix(ui): edit coar icon to make it consistent with theme
yannisbarlas Jul 6, 2026
36670de
refactor(client): renamed default page to remove apfs ambiguity
vukilelanga Jul 6, 2026
fd9a5a5
fix(ui): keep semantic scholar svg color consistent with coar
yannisbarlas Jul 7, 2026
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
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

#### Bug fixes

* We fixed a bug where a user could see another user's profile without the necessary permissions. Only admins can do that now.

#### Deployment changes

### Version 2026.07.03-0
Expand Down
1 change: 1 addition & 0 deletions cypress/e2e/a-journal/004-assigning_editor_spec.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ describe('Assigning editors and decision reject', () => {

ManuscriptsPage.selectOptionWithText('Control')

cy.wait(1000)
ControlPage.clickAssignSeniorEditorDropdown()
ControlPage.selectDropdownOptionByName(name.role.seniorEditor)

Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/a-journal/005-decision_spec.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ describe('Completing a decision', () => {
/* Group Manager assigns Editor to manuscript */
cy.login(name.role.admin, dashboard)

cy.wait(1000)
cy.wait(2000)
DashboardPage.clickManuscriptNavButton()
ManuscriptsPage.selectOptionWithText('Control')
ControlPage.getAssignSeniorEditorDropdown().click({ force: true })
Expand Down Expand Up @@ -98,7 +98,7 @@ describe('Completing a decision', () => {
cy.wait(1000)
ControlPage.clickAccept()

cy.wait(1000)
cy.wait(2000)
ControlPage.clickSubmitDecisionButton() // Submit the decision
ControlPage.checkSvgExists()
// The below should be fixed by #1872 !!!
Expand Down
17 changes: 6 additions & 11 deletions cypress/e2e/b-colab-prc/101-profile_page_spec.cy.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
/* eslint-disable promise/always-return */

import {
dashboard,
profile,
manuscripts,
users,
formBuilder,
} from '../../support/routes1'
import { dashboard, profile, manuscripts, users } from '../../support/routes1'
import { ProfilePage } from '../../page-object/profile-page'
import { Menu } from '../../page-object/page-component/menu'
import { DashboardPage } from '../../page-object/dashboard-page'
Expand All @@ -16,16 +10,19 @@ describe('profile page tests', () => {
const restoreUrl = Cypress.config('restoreUrl')
cy.request('POST', `${restoreUrl}/commons.colab_bootstrap`)
})

beforeEach(() => {
// login and attempt to access the dashboard page
cy.fixture('role_names').then(name => {
cy.login(name.role.tester, profile)
})
cy.awaitDisappearSpinner()
})

it('first login - users should be asked to add their email', () => {
ProfilePage.getPopupEmailField().should('exist').and('be.visible')
})

it('first login - users should not be able to switch pages before adding email', () => {
ProfilePage.getPopupEmailField().should('exist').and('be.visible')
cy.visit(dashboard)
Expand All @@ -40,11 +37,8 @@ describe('profile page tests', () => {
cy.awaitDisappearSpinner()
cy.url().should('not.contain', users).and('contain', profile)
ProfilePage.getPopupEmailField().should('exist').and('be.visible')
cy.visit(formBuilder)
cy.awaitDisappearSpinner()
cy.url().should('not.contain', formBuilder).and('contain', profile)
ProfilePage.getPopupEmailField().should('exist').and('be.visible')
})

it('first login - validate email', () => {
ProfilePage.updateEmailInPopup('test')
ProfilePage.clickPopupNextButton()
Expand All @@ -59,6 +53,7 @@ describe('profile page tests', () => {
ProfilePage.getPopupEmailError().should('be.visible')
ProfilePage.getPopupEmailError().should('contain', 'invalid')
})

it('first login - after adding email user can navigate away', () => {
ProfilePage.updateEmailInPopup('test@email.com')
ProfilePage.clickPopupNextButton()
Expand Down
8 changes: 6 additions & 2 deletions cypress/e2e/b-colab-prc/104-control_page_spec.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,9 @@ function sendNotification({

ControlPage.getEmailNotificationDropdowns()
.eq(2)
.type(`${templateName}{enter}`)
.click()
.find('input')
.type(`${templateName}{enter}`, { force: true })
} else {
cy.getByDataTestId('choose-receiver').click()
cy.get('input[aria-label="Choose receiver"]').type(
Expand All @@ -421,7 +423,9 @@ function sendNotification({

ControlPage.getEmailNotificationDropdowns()
.eq(1)
.type(`${templateName}{enter}`)
.click()
.find('input')
.type(`${templateName}{enter}`, { force: true })
}

cy.contains('Notify').click()
Expand Down
5 changes: 2 additions & 3 deletions cypress/e2e/b-colab-prc/107-new_manuscript_version_spec.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,9 @@ describe('checking manuscript version', () => {
cy.contains('test-pdf.pdf').should('exist')
cy.contains('Decision Status').scrollIntoView()
// ReviewPage.clickRevise()
cy.get('[data-testid=safe-radio-group] input[value=revise]').click({
force: true,
})
ControlPage.clickRevise()
/* Submit the decision */
cy.wait(1000)
ControlPage.clickSubmitDecisionButton()
/* Check appears in front of button */
ControlPage.checkSvgExists()
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/ncrc/300-login_page_spec.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ describe('Login page tests', () => {
Menu.assertManuscriptsButtonDoesNotExist()
Menu.getMyProfileButton().should('be.visible')
cy.visit(manuscripts)
cy.contains('404 Page not found.').should('exist')
cy.contains('403').should('exist')
cy.awaitDisappearSpinner()
ManuscriptsPage.getTableHeader().should('not.exist')
ManuscriptsPage.getLiveChatButton().should('not.exist')
Expand Down
7 changes: 4 additions & 3 deletions cypress/page-object/control-page.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@ export const ControlPage = {
return cy.get(DECISION_FIELD).eq(nth)
},
fillInDecision(decision) {
this.getDecisionTextInput().click().type(decision, { force: true })
this.getDecisionTextInput().click()
this.getDecisionTextInput().type(decision, { force: true })
},
getPublishButton() {
return cy.get(PUBLISH_BUTTON)
Expand Down Expand Up @@ -177,7 +178,7 @@ export const ControlPage = {
},

getDecisionRadioGroup() {
return cy.get(DECISION_RADIO_BUTTON).should('be.visible')
return cy.get(DECISION_RADIO_BUTTON).scrollIntoView()
},
getAcceptRadioButton() {
return this.getDecisionRadioGroup().find('input[value="accept"]')
Expand Down Expand Up @@ -367,7 +368,7 @@ export const ControlPage = {
cy.wait(3000)
},
getSubmitDecisionButton() {
return cy.getByDataTestId(DECISION_SUBMIT_BUTTON)
return cy.getByDataTestId(DECISION_SUBMIT_BUTTON).scrollIntoView()
},
clickSubmitDecisionButton() {
this.getSubmitDecisionButton().click()
Expand Down
1 change: 0 additions & 1 deletion cypress/support/routes1.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
export const login = '/prc/login'
export const dashboard = '/prc/dashboard'
export const manuscripts = '/prc/admin/manuscripts'
export const formBuilder = '/prc/admin/form-builder'
export const reports = '/prc/admin/reports'
export const users = '/prc/admin/users'
export const profile = '/prc/profile'
Expand Down
8 changes: 8 additions & 0 deletions packages/client/.storybook/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/* eslint-disable import/no-extraneous-dependencies */

import { defineMain } from '@storybook/react-vite/node'

export default defineMain({
framework: '@storybook/react-vite',
stories: ['../stories/**/*.stories.tsx'],
})
13 changes: 13 additions & 0 deletions packages/client/.storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/* eslint-disable import/no-extraneous-dependencies */

import { definePreview } from '@storybook/react-vite'
import * as addonActions from '@storybook/addon-actions/preview'
import * as addonBackgrounds from '@storybook/addon-backgrounds/preview'
import * as addonViewport from '@storybook/addon-viewport/preview'

export default definePreview({
addons: [addonActions, addonBackgrounds, addonViewport],
initialGlobals: {
viewport: { value: '', isRotated: false },
},
})
36 changes: 36 additions & 0 deletions packages/client/app/DefaultPage.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import Modal from 'react-modal'
import { ThemeProvider } from 'styled-components'

import theme from './theme'
import GlobalStyle from './theme/elements/GlobalStyle'

import AssetManager from './components/asset-manager/src/AssetManagerPage'
import { JournalProvider } from './components/xpub-journal'
import journal from '../config/journal'
import ModalProvider from './components/asset-manager/src/ui/Modal/ModalProvider'
import { XpubProvider } from './components/xpub-with-context/src/index'

import Router from './Router'

const modals = {
assetManagerEditor: AssetManager,
}

const DefaultPage = () => {
Modal.setAppElement('#root')

return (
<XpubProvider>
<JournalProvider journal={JSON.parse(JSON.stringify(journal))}>
<ModalProvider modals={modals}>
<ThemeProvider theme={theme}>
<GlobalStyle />
<Router />
</ThemeProvider>
</ModalProvider>
</JournalProvider>
</XpubProvider>
)
}

export default <DefaultPage />
Loading