Skip to content

Commit

Permalink
Merge branch 'develop' into wip/sb/rac-dropdown
Browse files Browse the repository at this point in the history
  • Loading branch information
somebody1234 committed Aug 29, 2024
2 parents 3ce7de2 + 5fba572 commit ef14e29
Show file tree
Hide file tree
Showing 67 changed files with 1,743 additions and 696 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
attach warnings.][10725]
- [Support for creating Atoms in expressions.][10820]
- [IO.print without new line][10858]
- [Add `Text.to_decimal`.][10874]
- [Added .floor, .ceil, .trunc to the in-memory Decimal column.][10887]

[10614]: https://github.com/enso-org/enso/pull/10614
[10660]: https://github.com/enso-org/enso/pull/10660
Expand All @@ -39,6 +41,8 @@
[10725]: https://github.com/enso-org/enso/pull/10725
[10820]: https://github.com/enso-org/enso/pull/10820
[10858]: https://github.com/enso-org/enso/pull/10858
[10874]: https://github.com/enso-org/enso/pull/10874
[10887]: https://github.com/enso-org/enso/pull/10887

#### Enso Language & Runtime

Expand Down
11 changes: 6 additions & 5 deletions app/dashboard/e2e/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -755,7 +755,7 @@ export async function login(
await locateLoginButton(page).click()
await test.expect(page.getByText('Logging in to Enso...')).not.toBeVisible()
if (first) {
await passTermsAndConditionsDialog({ page, setupAPI })
await passAgreementsDialog({ page, setupAPI })
await test.expect(page.getByText('Logging in to Enso...')).not.toBeVisible()
}
})
Expand Down Expand Up @@ -830,11 +830,12 @@ async function mockDate({ page }: MockParams) {
})
}

/** Pass the Terms and conditions dialog. */
export async function passTermsAndConditionsDialog({ page }: MockParams) {
/** Pass the Agreements dialog. */
export async function passAgreementsDialog({ page }: MockParams) {
await test.test.step('Accept Terms and Conditions', async () => {
await page.waitForSelector('#terms-of-service-modal')
await page.getByRole('checkbox').click()
await page.waitForSelector('#agreements-modal')
await page.getByRole('checkbox').and(page.getByTestId('terms-of-service-checkbox')).click()
await page.getByRole('checkbox').and(page.getByTestId('privacy-policy-checkbox')).click()
await page.getByRole('button', { name: 'Accept' }).click()
})
}
Expand Down
8 changes: 8 additions & 0 deletions app/dashboard/e2e/actions/RegisterPageActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,14 @@ export default class RegisterPageActions extends BaseActions {
await this.page.getByPlaceholder(TEXT.emailPlaceholder).fill(email)
await this.page.getByPlaceholder(TEXT.passwordPlaceholder).fill(password)
await this.page.getByPlaceholder(TEXT.confirmPasswordPlaceholder).fill(confirmPassword)
await this.page
.getByRole('checkbox')
.and(this.page.getByTestId('terms-of-service-checkbox'))
.click()
await this.page
.getByRole('checkbox')
.and(this.page.getByTestId('privacy-policy-checkbox'))
.click()
await this.page
.getByRole('button', { name: TEXT.register, exact: true })
.getByText(TEXT.register)
Expand Down
2 changes: 1 addition & 1 deletion app/dashboard/e2e/assetPanel.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ test.test('asset panel contents', ({ page }) =>
})
.login()
.do(async (thePage) => {
await actions.passTermsAndConditionsDialog({ page: thePage })
await actions.passAgreementsDialog({ page: thePage })
})
.driveTable.clickRow(0)
.toggleAssetPanel()
Expand Down
2 changes: 1 addition & 1 deletion app/dashboard/e2e/loginLogout.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ test.test('login and logout', ({ page }) =>
.mockAll({ page })
.login()
.do(async (thePage) => {
await actions.passTermsAndConditionsDialog({ page: thePage })
await actions.passAgreementsDialog({ page: thePage })
await test.expect(actions.locateDriveView(thePage)).toBeVisible()
await test.expect(actions.locateLoginButton(thePage)).not.toBeVisible()
})
Expand Down
4 changes: 2 additions & 2 deletions app/dashboard/e2e/loginScreen.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import * as test from '@playwright/test'
import {
INVALID_PASSWORD,
mockAll,
passTermsAndConditionsDialog,
passAgreementsDialog,
TEXT,
VALID_EMAIL,
VALID_PASSWORD,
Expand All @@ -26,7 +26,7 @@ test.test('login screen', ({ page }) =>
// Technically it should not be allowed, but
.login(VALID_EMAIL, INVALID_PASSWORD)
.do(async (thePage) => {
await passTermsAndConditionsDialog({ page: thePage })
await passAgreementsDialog({ page: thePage })
})
.withDriveView(async (driveView) => {
await test.expect(driveView).toBeVisible()
Expand Down
11 changes: 6 additions & 5 deletions app/dashboard/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ import * as errorBoundary from '#/components/ErrorBoundary'
import * as suspense from '#/components/Suspense'

import AboutModal from '#/modals/AboutModal'
import { AgreementsModal } from '#/modals/AgreementsModal'
import * as setOrganizationNameModal from '#/modals/SetOrganizationNameModal'
import * as termsOfServiceModal from '#/modals/TermsOfServiceModal'

import LocalBackend from '#/services/LocalBackend'
import ProjectManager, * as projectManager from '#/services/ProjectManager'
Expand Down Expand Up @@ -353,9 +353,10 @@ function AppRouter(props: AppRouterProps) {
}, [localStorage, inputBindingsRaw])
const mainPageUrl = getMainPageUrl()

// Subscribe to `termsOfService` updates to trigger a rerender when the terms of service
// has been accepted.
// Subscribe to `localStorage` updates to trigger a rerender when the terms of service
// or privacy policy have been accepted.
localStorageProvider.useLocalStorageState('termsOfService')
localStorageProvider.useLocalStorageState('privacyPolicy')

const authService = useInitAuthService(props)
const userSession = authService?.cognito.userSession.bind(authService.cognito) ?? null
Expand Down Expand Up @@ -430,7 +431,7 @@ function AppRouter(props: AppRouterProps) {
{/* Protected pages are visible to authenticated users. */}
<router.Route element={<authProvider.NotDeletedUserLayout />}>
<router.Route element={<authProvider.ProtectedLayout />}>
<router.Route element={<termsOfServiceModal.TermsOfServiceModal />}>
<router.Route element={<AgreementsModal />}>
<router.Route element={<setOrganizationNameModal.SetOrganizationNameModal />}>
<router.Route element={<InvitedToOrganizationModal />}>
<router.Route element={<openAppWatcher.OpenAppWatcher />}>
Expand Down Expand Up @@ -467,7 +468,7 @@ function AppRouter(props: AppRouterProps) {
</router.Route>
</router.Route>

<router.Route element={<termsOfServiceModal.TermsOfServiceModal />}>
<router.Route element={<AgreementsModal />}>
<router.Route element={<authProvider.NotDeletedUserLayout />}>
<router.Route path={appUtils.SETUP_PATH} element={<setup.Setup />} />
</router.Route>
Expand Down
6 changes: 2 additions & 4 deletions app/dashboard/src/components/AriaComponents/Button/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,7 @@ export const BUTTON_STYLES = twv.tv({
icon: 'h-[1.25cap] w-[1.25cap] mt-[0.25cap]',
},
primary: 'bg-primary text-white hover:bg-primary/70',
tertiary: 'bg-accent text-white hover:bg-accent-dark',
cancel: 'bg-white/50 hover:bg-white',
accent: 'bg-accent text-white hover:bg-accent-dark',
delete:
'bg-danger/80 hover:bg-danger text-white focus-visible:outline-danger focus-visible:bg-danger',
icon: {
Expand All @@ -208,8 +207,7 @@ export const BUTTON_STYLES = twv.tv({
'ghost-fading':
'text-primary opacity-80 hover:opacity-100 hover:bg-white focus-visible:bg-white',
submit: 'bg-invite text-white opacity-80 hover:opacity-100',
outline: 'border-primary/40 text-primary hover:border-primary hover:bg-primary/5',
bar: 'border-primary/20 hover:bg-primary/5',
outline: 'border-primary/20 text-primary hover:border-primary hover:bg-primary/5',
},
iconPosition: {
start: { content: '' },
Expand Down
113 changes: 0 additions & 113 deletions app/dashboard/src/components/ControlledInput.tsx

This file was deleted.

Loading

0 comments on commit ef14e29

Please sign in to comment.