twenty/packages/twenty-front
Marie 17422b7690
fix: I should be able to use "enter" key to create profile (#4978)
## Context
Fixes #4808 

TL;DR
Introducing pure stateless modal component ("UI modal") for our auth
modal not to have default hotkeyScope overriding our create-profile
hotkeyScope
+ we dont want the shortcut to be available for all the modal content, only for the input that should not be using a hotkeyscope, so we are using onKeyDown for the specific issue on create profile.

Explanation
create-profile hotkey scope is set by PageChangeEffect; CreateProfile
component adds enter key shortcut; but this scope is overwritten by the
default scope by the Modal component that expects a hotkeyScope to reset
to (and defaults to the default hotkeyScope if none indicated).
In the auth flow we were using that Modal component to give a modal look
to the flow but it is not a modal per say, it's a set of pages contained
within a modal look.
By creating this UI component we are escaping that hotkeyScope
overriding that does not make sense in our context.

## How was it tested
Locally
Storybook
2024-04-17 10:45:02 +02:00
..
__mocks__ Fix overlay scroll gaps (#4512) 2024-03-31 10:53:37 +02:00
.storybook refactor: move @/ui/display/icon to twenty-ui (#4820) 2024-04-12 15:30:48 +02:00
public chore: use common eslint config for most packages (#4705) 2024-04-04 12:05:26 +02:00
scripts feat: add SENTRY_RELEASE env (#4912) 2024-04-11 16:53:15 +02:00
src fix: I should be able to use "enter" key to create profile (#4978) 2024-04-17 10:45:02 +02:00
.env.example Delete auth/file front variables (#4455) 2024-03-19 22:19:40 +01:00
.eslintrc-ci.cjs chore: enable no-console eslint rule for tests and stories (#4816) 2024-04-04 18:36:39 +02:00
.eslintrc.cjs chore: use common eslint config for most packages (#4705) 2024-04-04 12:05:26 +02:00
.gitignore Feat/put target object identifier on use activities (#4682) 2024-04-01 13:12:37 +02:00
.swcrc Migrate to a monorepo structure (#2909) 2023-12-10 18:10:54 +01:00
codegen-metadata.cjs feat: fetch database connections (#4813) 2024-04-04 17:27:36 +02:00
codegen.cjs feat: fetch database connections (#4813) 2024-04-04 17:27:36 +02:00
index.html Migrate to a monorepo structure (#2909) 2023-12-10 18:10:54 +01:00
jest.config.ts refactor: move @/ui/display/icon to twenty-ui (#4820) 2024-04-12 15:30:48 +02:00
nyc.config.cjs Add JsDom to server dependencies (#4740) 2024-04-02 12:07:12 +02:00
package.json feat: add sourcemap generation for front (#4949) 2024-04-15 12:12:59 +02:00
README.md Migrate to a monorepo structure (#2909) 2023-12-10 18:10:54 +01:00
setupTests.ts chore: setup twenty-ui absolute path alias (#4732) 2024-04-04 15:38:01 +02:00
tsconfig.app.json chore: setup twenty-ui absolute path alias (#4732) 2024-04-04 15:38:01 +02:00
tsconfig.json refactor: move @/ui/display/icon to twenty-ui (#4820) 2024-04-12 15:30:48 +02:00
tsconfig.spec.json chore: setup twenty-ui absolute path alias (#4732) 2024-04-04 15:38:01 +02:00
tsup.config.ts Fix Tsup setup to fuel docs with twenty-ui components (#2978) 2023-12-13 16:40:31 +01:00
tsup.ui.index.tsx refactor: move @/ui/display/icon to twenty-ui (#4820) 2024-04-12 15:30:48 +02:00
vite.config.ts feat: add sourcemap generation for front (#4949) 2024-04-15 12:12:59 +02:00

Run yarn dev while server running on port 3000