Commit Graph

50 Commits

Author SHA1 Message Date
Anthony LC
fc8dc24ba2 (app-desk) add team info component
Add the team info component to the team page.
This component shows some informations about the team:
  - name
  - amount of members
  - date created
  - date updated
2024-02-22 14:28:04 +01:00
Anthony LC
95219a33b3 💄(app-desk) change the text color
The text color from the mockup is not blue but
a dark grey. This commit changes the base color of
the Text component to match the mockup.
2024-02-22 14:28:04 +01:00
Lebaud Antoine
26fbe9fbe7 ✏️(project) fix minor typos
Found typos and fixed them.
2024-02-22 11:59:36 +01:00
Lebaud Antoine
4cacfd3a45 ♻️(frontend) switch to Authorization Code flow
Instead of interacting with Keycloak, the frontend navigate to the
/authenticate endpoint, which starts the Authorization code flow.

When the flow is done, the backend redirect back to the SPA,
passing a session cookie and a csrf cookie.

Done:
- Query GET user/me to determine if user is authenticated yet
- Remove Keycloak js dependency, as all the OIDC logic is handled by the backend
- Store user's data instead of the JWT token
2024-02-22 11:59:36 +01:00
Anthony LC
5113eb013b 💄(app-desk) highlight team selected
Highlight the selected team in the team list.
2024-02-20 16:25:31 +01:00
Anthony LC
45d05873e2 🔥(app-desk) remove FAQ part in header
The FAQ part in the header is not displayed in
the mockup anymore, we remove it.
2024-02-20 16:25:31 +01:00
Anthony LC
1f3ab759d7 ⬇️(app-desk) downgrade @types/react-dom
Downgrade @types/react-dom to 18.2.18.
The lastest version seems to have lot of compatibility
issues with other packages:
- @openfun/cunningham-react
- @tanstack/react-query-devtools
- next
2024-02-19 16:58:23 +01:00
renovate[bot]
8b5f5bf092 ⬆️(dependencies) update js dependencies 2024-02-19 16:58:23 +01:00
Anthony LC
cd2efbe40d ️(frontend) add stale cache
We add a stale cache to reduce the number of requests to
the server.
This will help to improve the performance of the application.
2024-02-19 15:22:09 +01:00
Anthony LC
8b0c20dbdc (app-desk) add team page
- add the team page, you can access to
the team page with the id of the team.
- Add link to the panel team to access to the
team page.
2024-02-19 15:22:09 +01:00
Anthony LC
d0562029e8 (app-desk) integrate team endpoint
Integrate team endpoint with react-query.
It will be used to get the team on the team page.
2024-02-19 15:22:09 +01:00
Anthony LC
77efb1a89c 💄(app-desk) do not count the owner in item list icon
In every team, the owner is always included in it,
so we shouldn't count the owner when we display the icon
to say if a team has members.
2024-02-19 15:04:53 +01:00
Anthony LC
4566e132e1 💄(app-desk) integrate the create team design
- Integrate the create team design based from the
mockup
- Manage the different states of the create team
2024-02-19 15:04:53 +01:00
Anthony LC
f818715a45 🚚(app-desk) change next router to pages
2 routers exists in Next.js, "app" router and "page" router.
The "app" router has a bug introduced in Next.js 13.4.14, which is
not fixed yet. For the moment we cannot use dynamic routes with
"app" router with an SPA. As advised by the Next.js team, we
migrated to the "pages" router.
2024-02-19 15:04:53 +01:00
Anthony LC
aba376702f 🐛(app-desk) fix circular dependency problem
Some circular dependency problems started to appear with Jest.
This commit fixes the problem by removing the feature index
file and moving the exports to the respective feature.
2024-02-15 09:56:07 +01:00
Anthony LC
1e38174c1b ️(e2e) add workers to playwright with CI
We have added workers to playwright to run tests in parallel,
this will help us to run tests faster.
The tests run on a commun database, so to keep the tests
stable between browsers, we created 3 different
users to run the tests, it will avoid to have commun data
stepping on each other.
2024-02-15 09:56:07 +01:00
Anthony LC
0ab9f16cb3 🌐(app-desk) improve message missing translations
- Improve the message when a translation is missing in the app,
now it will show the key of the missing translation.
- It also show the translation that are in crowdin but not in the
app.

- Add missing translations
2024-02-15 09:56:07 +01:00
Anthony LC
c71463a385 🚚(app-desk) create route teams/create
- Create the routes teams/create.
- Add link to the buttons routing to this page
- Adapt design
2024-02-15 09:56:07 +01:00
Anthony LC
47ffa60a94 ️(app-desk) add infinite scrool to teams list
If we have a big list of teams, we need to add infinite
scroll to avoid loading all the teams at once.
2024-02-15 09:56:07 +01:00
Anthony LC
fafffd2391 (app-desk) add interaction to sort button
In the team panel, we have the possibility to sort the teams.
This commit adds the interaction to the button.
2024-02-15 09:56:07 +01:00
Anthony LC
4f0465fd32 (app-desk) integrate teams panel design
- Integrate teams panel design based from the mockup.
- List teams from the API.
2024-02-15 09:56:07 +01:00
Anthony LC
148ea81aa9 🎨(app-desk) box default direction column
Change the default direction of the Box component to column
to have a behavior closer to a normal div.
2024-02-15 09:56:07 +01:00
Anthony LC
ec2fcaa1dd ♻️(app-desk) create Auth component
- Create the Auth component, it will manage the authentication.
- Moved auth folder to features folder.
2024-02-05 16:08:22 +01:00
Anthony LC
0b703cda97 🚚(app-desk) move features to features folder
The features were in the app folder, app folder is where Next uses
his router system.
To avoid confusion between the folder router and the features,
we export the features in a feature folder.
2024-02-05 16:08:22 +01:00
Anthony LC
fc6487ddc1 🚚(app-desk) integrate next router with menu
Integrate next router with the menu.
Create most of the pages.
2024-02-05 16:08:22 +01:00
Anthony LC
66dbea3c6d (app-desk) integrate static menu in the app
Integrate the menu from the mockup in the app.
2024-02-05 16:08:22 +01:00
Anthony LC
cbe356214d 🚨(frontend) fix some eslint warnings
- Eslint tried to search some configs in the node_modules folder,
we ignore node_modules in the eslint config now.
- Adapt next eslint to use next/babel.
2024-02-05 16:08:22 +01:00
Anthony LC
ce55721b5d 💄(app-desk) handle svg as react component
The svg in nextjs was not handled as a react component, it was
not possible to change dynamically the color of the svg by example.
We add the @svgr/webpack, it will handle the svg as react component.
We keep as well the way next.js handle the svg, so we can use both
ways.
To handle the svg in the next way we need to add the
`?url` at the end of the svg import.
2024-02-05 16:08:22 +01:00
Anthony LC
32e42e126d 🌐(app-desk) translate Desk in french
Translate app Desk in french thanks to crowdin.
2024-02-05 15:34:37 +01:00
Anthony LC
8043d12315 🚨(i18n) add linter to i18n package
We need to add a linter to the i18n package, we are mainly
interested by the jest linting rules so we create
a jest eslint config pluggable our other configs and to the
i18n eslint config.
2024-02-05 15:34:37 +01:00
Anthony LC
7add42f525 🌐(app-desk) plug i18n to LanguagePicker
- Plug i18n to LanguagePicker.
- Make translatable all the string of the app.
2024-02-05 15:34:37 +01:00
Anthony LC
01b7ad3f30 🌐(app-desk) install internationalization
Install internationalization in the Desk app.
We use react-i18next.
2024-02-05 15:34:37 +01:00
Anthony LC
21550fe01d 🚨(frontend) fix linting issues
The prettier upgrade was causing some linting issues.
This commit fixes them.
2024-02-05 09:46:30 +01:00
renovate[bot]
92e3e11daf ⬆️(dependencies) update js dependencies 2024-02-05 09:46:30 +01:00
Anthony LC
13a58d6fa0 🚨(frontend) fix linting issues
The prettier upgrade was causing some linting issues.
This commit fixes them.
2024-01-30 09:26:33 +01:00
renovate[bot]
83d9310c26 ⬆️(dependencies) update js dependencies 2024-01-30 09:26:33 +01:00
Anthony LC
c2c6ae88db 🚨(frontend) create package eslint-config-people
We want to lint the e2e tests, we export the eslint config from the
app desk to a package in order to use it for the e2e tests and
for our apps.
2024-01-24 16:14:03 +01:00
Anthony LC
3b155b708c 🚨(app-desk) add eslint-plugin-jsx-a11y
eslint-plugin-jsx-a11y is a plugin that provides a set of
accessibility rules that can find common
accessibility problems in your React.js elements.
2024-01-24 16:14:03 +01:00
Anthony LC
e8186408a0 🚨(add-desk) remove hydratation warning
When working with Next, some browser (like Brave) gives us
warning about hydratation. This commit remove this warning.
2024-01-24 16:14:03 +01:00
Anthony LC
38997fef6a (app-desk) design static LanguagePicker
Design static LanguagePicker, we will add the interactivity later.
2024-01-24 16:14:03 +01:00
Anthony LC
5062cac623 (app-desk) design static Header
Design static Header, we will add the interactivity later.
2024-01-24 16:14:03 +01:00
Anthony LC
5b4fe1e77f 🧑‍💻(app-desk) add styled-components and create generic components
Add styled-components to the app-desk, it will help us to create
easily styled components.
We create 2 components, Box and Text, it is 2 generic components
that we help us to style quickly html elements. They use
the power of styled-components and Cunningham's design system.
2024-01-24 16:14:03 +01:00
Anthony LC
30721b9ef9 🏷️(app-desk) add custom-next.d.ts file
Add custom-next.d.ts file to augment types.
We add our environment variables to avoid mispelling
and to have better autocompletion.
2024-01-24 16:14:03 +01:00
Anthony LC
e2618d0e11 💄(app-desk) add DSFR theme to Cunningham
In order to have the look and feel of the DSFR, we
create a DSFR theme to the Cunningham design system.
2024-01-24 16:14:03 +01:00
Anthony LC
9ee39e1068 🏗️(app-desk) export app in out folder
We export the app in the out folder. This is a static export,
so our app can be deployed and hosted
on any web server that can serve HTML/CSS/JS static assets.
2024-01-23 12:59:15 +01:00
Anthony LC
c6823ba698 🛂(app-desk) create fetchAPI
Create a fetch wrapper for the API calls, it will handle:
- add correct basename on the api request
- add Bearer automatically on the api request
- logout automatically on 401 request
2024-01-23 12:59:15 +01:00
Anthony LC
da851f508a 👷(CI) add test-e2e job to people.yml
Add test-e2e to people.yml, it will run e2e tests on every PR.
Steps:
  - set env vars for e2e tests
  - build and start docker servers
  (backend, keycloak, DB)
  - install playwright
  - build apps
  - run e2e tests
  - save reports
2024-01-23 12:59:15 +01:00
Anthony LC
5f280ae3fc (app-desk) e2e test app-desk
Tests:
- login to keycloak
- create new teams
- check teams are displayed
2024-01-23 12:59:15 +01:00
Anthony LC
2ef31a424a (project) install e2e playwright
Install playwright, adapt the config file and add a scripts to
run the tests.
e2e testing will monitor all our frontend applications,
so we install it in the frontend folder.
It configures the base of our monorepo.
2024-01-23 12:59:15 +01:00
Anthony LC
fc7747dddf 🚚(frontend) rename folder app to apps
The folder app will be used for more than one app, so it was
renamed to apps.
2024-01-23 12:59:15 +01:00