Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Customization options for start page's background #1437

Merged
merged 42 commits into from
Dec 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
faa8fff
update: add diff fields depends on the added/deleted/updated status
Oct 30, 2023
9717592
f4011/update: improve checking and return only not empty result
Oct 30, 2023
0848ffb
update: show deleted values as an array
Oct 31, 2023
05be912
f4011/update: add tagging func to a resource for a specific revision
Oct 30, 2023
5c2ea4e
update: use mutate instead of mutateAsync
Oct 31, 2023
935edf9
f4011/fix: test for data explorer flow
Nov 1, 2023
c2b9a1c
f4011/fix: test error text for regex of org/project/tag
Nov 1, 2023
fcb436d
Record video to help with debugging
Dinika Nov 6, 2023
2b28353
Try recording failing test
Dinika Nov 6, 2023
8b7a460
Run at 12:30
Dinika Nov 7, 2023
f98a9b6
Setup notification process for slack
Dinika Nov 7, 2023
cc6744c
Fix typo of renamed exported component
danburonline Nov 20, 2023
4e0e284
Go through root README and fix markdown errors
danburonline Nov 20, 2023
b7fa5f7
Adjust Webpack config to display videos on home UI
danburonline Nov 20, 2023
c1a89bf
Add `alt` attribute to home logo
danburonline Nov 20, 2023
3387124
Add object-fit: cover to image element
danburonline Nov 21, 2023
9805db7
Fix video file path in IdentityPage component
danburonline Nov 21, 2023
5e95dbf
Sort CSS/LESS properties
danburonline Nov 21, 2023
4d95b86
Change order of video element in HTML doc
danburonline Nov 21, 2023
4a7d5fb
Adjust start page with better A11y
danburonline Nov 21, 2023
7468682
Have different cursor if ID connect isn't set up
danburonline Nov 21, 2023
0edd7d3
Reduce video file size by 12 MB
danburonline Nov 21, 2023
89fe998
Reduce cover image from 636 KB to 114 KB
danburonline Nov 21, 2023
f817cc4
Use semantic tag for navigation (`<nav/>`)
danburonline Nov 21, 2023
01d200c
Use more semantic HTML tags
danburonline Nov 21, 2023
ef81e89
Add lang attributes, Helmet attr. weren't working
danburonline Nov 22, 2023
3ebcade
Change the server's log in order to improve DX
danburonline Nov 22, 2023
579bf8a
Fix typos in file that I opened
danburonline Nov 22, 2023
290a902
Remove main tag again, as we have a root one
danburonline Nov 22, 2023
3c99063
Add `LOGO_LINK` to env setup
danburonline Nov 22, 2023
cbaa3f2
Fixing another typo
danburonline Nov 22, 2023
dad3992
Don't use a poster on video as BG flickers on load
danburonline Nov 22, 2023
c9183db
Adjust logo spacing on the landing page
danburonline Nov 22, 2023
6a242bf
Make the BG color work on the landing page
danburonline Nov 22, 2023
370f0f0
Fix the squeezing of the other banner images too
danburonline Nov 22, 2023
602e06b
Sort and clean shared LESS lib
danburonline Nov 23, 2023
82af189
Use a SVG instead of a bitmap for the BBP logo
danburonline Nov 23, 2023
ca4886d
Fix color of logo and remove redundant LESS rule
danburonline Nov 23, 2023
7717475
Adjust alt tag for fallback image on landing page
danburonline Nov 28, 2023
b54f705
Use font fam via `@font-family`
danburonline Nov 28, 2023
164fb50
Remove unused `SECURE` env var
danburonline Dec 1, 2023
b2672eb
Merge branch 'develop' of https://github.com/BlueBrain/nexus-web into…
danburonline Dec 6, 2023
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
13 changes: 5 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@

# Nexus Fusion

> Note: expect this repo to be renamed to https://github.com/BlueBrain/nexus-fusion to match the new application name and Nexus component branding scheme.
> Note: expect this repo to be renamed to <https://github.com/BlueBrain/nexus-fusion> to match the new application name and Nexus component branding scheme.

<p align="center">
<img alt="Build Status" src="https://github.com/BlueBrain/nexus-web/workflows/Review/badge.svg">
<a href="https://codecov.io/gh/BlueBrain/nexus-web">
<img src="https://codecov.io/gh/BlueBrain/nexus-web/branch/master/graph/badge.svg" alt="Coverage Status">
</a>

<a href="https://twitter.com/intent/follow?screen_name=bluebrainnexus">
<img alt="Follow on Twitter" src="https://img.shields.io/twitter/follow/bluebrainnexus.svg?style=social&label=Follow">
</a>
Expand Down Expand Up @@ -62,13 +61,13 @@ Run end to end tests:

a. To run the tests in headed mode:

```
```sh
yarn cy:open
```

b. To run the tests in headless mode:

```
```sh
yarn cy:run
```

Expand Down Expand Up @@ -99,14 +98,13 @@ docker build . --tag=nexus-web
- `CLIENT_ID`: The application name used for _OpenID Connect_ authentication (default is `nexus-web`)
- `API_ENDPOINT`: The URL pointing to Nexus API. Default is '/'
- `SERVICE_ACCOUNTS_REALM`: The realm that is configured for service accounts that should be hidden for Login. Default is 'serviceaccounts'.
- `SECURE`: Is Nexus Fusion running in https or not. Default is `false`
- `GTM_CODE`: The Google Analytics Identifier. GA won't be present unless an ID is specified.
- `SENTRY_DSN`: The sentry URL Nexus Fusion needs to report errors to. Default is undefined.
- `STUDIO_VIEW`: The location of the aggregate elastic search view that contains all the projects: `orgLabel/projectLabel/viewId`
- `LOGO_IMG`: Url for an image to be used as Fusion logo in the Header, for example, `https://drive.boogle.com/jnsjdnsjs`
- `LOGO_LINK`: Url for the logo, for example, `https://www.epfl.ch`
- `FORGE_LINK`: Url for the Forge Templates button, for example, `https://some-url.hi`
- `DATA_MODELS`: The location of the datamodels to be used in Activity lists in Workflow: `orgLabel/projectLabel`
- `DATA_MODELS`: The location of the data models to be used in Activity lists in Workflow: `orgLabel/projectLabel`

The following concern Plugins. [See how to manage plugin deployments](./docs/plugins.md)

Expand Down Expand Up @@ -160,7 +158,6 @@ There are several channels provided to address different issues:

## Funding & Acknowledgment

The development of this software was supported by funding to the Blue Brain Project, a research center of the École polytechnique fédérale de
Lausanne (EPFL), from the Swiss government's ETH Board of the Swiss Federal Institutes of Technology.
The development of this software was supported by funding to the Blue Brain Project, a research center of the École polytechnique fédérale de Lausanne (EPFL), from the Swiss government's ETH Board of the Swiss Federal Institutes of Technology.

Copyright © 2015-2023 Blue Brain Project/EPFL
4 changes: 2 additions & 2 deletions cypress/support/e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { loginPage } from './index';
Cypress.Commands.add('login', (id, realm, username, password) => {
return cy.session(id, () => {
cy.visit(loginPage);
cy.findByRole('button', { name: /identity-login/i }).click();
cy.findByRole('button', { name: /Identity connect/i }).click();
cy.get('ul')
.contains(realm.name)
.click();
Expand All @@ -17,7 +17,7 @@ Cypress.Commands.add('login', (id, realm, username, password) => {
cy.get('#password').type(password);
cy.get('input[name="login"]').click();
}
)
);
cy.wait(500);
});
});
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"repository": "github:bluebrain/nexus-explorer",
"url": "https://github.com/BlueBrain/nexus/issues/new?labels=fusion",
"scripts": {
"start": "NODE_ENV=development DEBUG=* webpack --mode development --config-name server && node dist/server.js",
"start": "NODE_ENV=development DEBUG=* webpack --mode development --config-name server && node dist/server.js",
"build": "NODE_ENV=production NODE_OPTIONS=--max_old_space_size=8192 webpack --mode production",
"test": "jest",
"test:watch": "jest --watch --maxWorkers=4",
Expand Down
4 changes: 2 additions & 2 deletions src/client/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import App from '../shared/App';
import configureStore from '../shared/store';
import { RootState } from '../shared/store/reducers';
import { fetchIdentities, fetchRealms } from '../shared/store/actions/auth';
import { SEARCH_PREFENCE_LOCAL_STORAGE_KEY } from '../shared/store/actions/search';
import { SEARCH_PREFERENCE_LOCAL_STORAGE_KEY } from '../shared/store/actions/search';
import { QueryClient, QueryClientProvider } from 'react-query';

// The app base URL
Expand Down Expand Up @@ -62,7 +62,7 @@ const initialState: RootState = {
},
search: {
...preloadedState.search,
searchPreference: localStorage.getItem(SEARCH_PREFENCE_LOCAL_STORAGE_KEY),
searchPreference: localStorage.getItem(SEARCH_PREFERENCE_LOCAL_STORAGE_KEY),
},
};

Expand Down
4 changes: 2 additions & 2 deletions src/pages/HomePage/HomePage.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';
import { useSelector } from 'react-redux';
import { HomeSeachByPresets, HomeSearchByApps } from '../../shared/organisms';
import { HomeSearchByPresets, HomeSearchByApps } from '../../shared/organisms';
import { MyData } from '../../shared/canvas';
import { RootState } from '../../shared/store/reducers';
import IdentityPage from '../../pages/IdentityPage/IdentityPage';
Expand All @@ -14,7 +14,7 @@ const Home: React.FunctionComponent = () => {

return (
<div className="home-view view-container">
<HomeSeachByPresets />
<HomeSearchByPresets />
<HomeSearchByApps />
<MyData />
</div>
Expand Down
82 changes: 53 additions & 29 deletions src/pages/IdentityPage/IdentityPage.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import React, { useRef, useState } from 'react';
import { DownOutlined, UpOutlined } from '@ant-design/icons';
import { Realm } from '@bbp/nexus-sdk';
import { Button, Divider } from 'antd';
import { useRef, useState } from 'react';
import { useDispatch, useSelector } from 'react-redux';
import { useHistory, useLocation } from 'react-router';
import { DownOutlined, UpOutlined } from '@ant-design/icons';
import { Realm } from '@bbp/nexus-sdk';
import useClickOutside from '../../shared/hooks/useClickOutside';
import { performLogin } from '../../shared/store/actions/auth';
import { setPreferredRealm } from '../../shared/store/actions/config';
import { updateAboutModalVisibility } from '../../shared/store/actions/modals';
import { RootState } from '../../shared/store/reducers';
import useClickOutside from '../../shared/hooks/useClickOutside';
import * as authActions from '../../shared/store/actions/auth';
import * as configActions from '../../shared/store/actions/config';

import './styles.less';

Expand All @@ -18,13 +18,17 @@ const LandingVideo = ({ videoUrl }: { videoUrl: string }) => (
muted
autoPlay
className="home-authentication-fusion"
poster={require('../../shared/images/BrainRegionsNexusPage.jpg')}
preload="auto"
controls={false}
>
<source
type="video/mp4"
src={videoUrl || require('../../shared/images/BrainRegionsNexusPage.mp4')}
src={videoUrl || require('../../shared/videos/BrainRegionsNexusPage.mp4')}
/>
{/* Load an image as a Fallback */}
<img
alt="Landing page image"
src={require('../../shared/images/BrainRegionsNexusPage.jpg')}
/>
</video>
);
Expand Down Expand Up @@ -57,28 +61,24 @@ const IdentityPage: React.FC<{}> = () => {
);
const openAboutModal = () => dispatch(updateAboutModalVisibility(true));
useClickOutside(popoverRef, () => onPopoverVisibleChange(false));

return (
<div
className="home-authentication"
style={{ backgroundColor: layoutSettings.mainColor }}
>
<img
src={
layoutSettings.landingPosterImg ||
require('../../shared/images/EPFL_BBP_logo.png')
}
className="home-authentication-epfl"
/>
<LandingVideo videoUrl={layoutSettings.landingVideo} />
<div className="home-authentication-content">
<div className="title">Nexus.Fusion</div>
<div className="actions">
<h1 className="title">Nexus.Fusion</h1>
<nav
className="actions"
title="Main navigation"
aria-label="Main navigation"
>
<div className="home-authentication-content-connect">
{!realmsFilter.length ? (
<Button
key="no-realms"
disabled
role="button"
title="No realms available, please contact your administrator."
size="large"
className="no-realms-btn"
>
Expand All @@ -88,8 +88,8 @@ const IdentityPage: React.FC<{}> = () => {
<Button
key="realm-selector"
size="large"
role="button"
aria-label="identity-login"
title="Select a realm to connect to"
aria-label="Identity connect"
onClick={() => onPopoverVisibleChange(true)}
>
Connect
Expand All @@ -113,17 +113,16 @@ const IdentityPage: React.FC<{}> = () => {
<Button
onClick={e => {
e.preventDefault();
dispatch(configActions.setPreferredRealm(item.name));
dispatch(setPreferredRealm(item.name));
dispatch(
authActions.performLogin(
location.state as TLocationState
)
performLogin(location.state as TLocationState)
);
}}
className="connect-btn"
size="large"
type="link"
role="button"
title={`Connect via ${item.name}`}
aria-label={`Connect via ${item.name}`}
>
{item.name}
</Button>
Expand All @@ -136,6 +135,7 @@ const IdentityPage: React.FC<{}> = () => {
<Button
className="nav-btn"
size="large"
title="View all available studios"
onClick={() => history.push('/studios')}
>
View Studios
Expand All @@ -145,16 +145,40 @@ const IdentityPage: React.FC<{}> = () => {
size="large"
rel="noopener noreferrer"
target="_blank"
title="View the documentation for Nexus Fusion"
href="https://bluebrainnexus.io/docs/index.html"
className="nav-btn"
>
Documentation
</Button>
<Button className="nav-btn" size="large" onClick={openAboutModal}>
<Button
className="nav-btn"
size="large"
onClick={openAboutModal}
title="About Nexus Fusion"
>
About
</Button>
</div>
</nav>
</div>
<a
target="_blank"
rel="noopener noreferrer"
href={
layoutSettings.logoImgLink ||
'https://www.epfl.ch/research/domains/bluebrain'
}
>
<img
alt="Landing page logo"
src={
layoutSettings.landingPosterImg ||
require('../../shared/images/EPFL_BBP_logo.svg')
}
className="home-authentication-epfl"
/>
</a>
<LandingVideo videoUrl={layoutSettings.landingVideo} />
</div>
);
};
Expand Down
Loading
Loading