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

front: operationalstudies: focus added on the name input when modal opens #6597

Merged
merged 1 commit into from
Feb 12, 2024

Conversation

Caracol3
Copy link
Contributor

@Caracol3 Caracol3 commented Feb 8, 2024

  • added focus on mapSearchStation
  • added focus on addOrEditProjectModal
  • added focus on addOrEditStudyModal
  • added focus on addOrEditScenarioModal
  • isolate focusTrap from PowerRestrictionGridModal to /utils/helpers
  • add focusTrap to AddOrEdit files and PowerRestrictionGridModal

close #6554
closes #6312

@Caracol3 Caracol3 added kind:enhancement Improvement of existing features area:front Work on Standard OSRD Interface modules labels Feb 8, 2024
@Caracol3 Caracol3 requested a review from SharglutDev February 8, 2024 11:18
@Caracol3 Caracol3 requested a review from a team as a code owner February 8, 2024 11:18
Copy link

codecov bot commented Feb 8, 2024

Codecov Report

Attention: 72 lines in your changes are missing coverage. Please review.

Comparison is base (b4a0802) 27.89% compared to head (f634e39) 27.89%.

Files Patch % Lines
front/src/utils/hooks/useModalFocusTrap.ts 12.96% 47 Missing ⚠️
...dules/project/components/AddOrEditProjectModal.tsx 0.00% 7 Missing and 1 partial ⚠️
...c/modules/study/components/AddOrEditStudyModal.tsx 0.00% 7 Missing and 1 partial ⚠️
...les/scenario/components/AddOrEditScenarioModal.tsx 0.00% 7 Missing ⚠️
front/src/common/Map/Search/MapSearchStation.tsx 0.00% 1 Missing ⚠️
...s/RollingStockEditor/PowerRestrictionGridModal.tsx 66.66% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##                dev    #6597      +/-   ##
============================================
- Coverage     27.89%   27.89%   -0.01%     
  Complexity     2178     2178              
============================================
  Files          1040     1041       +1     
  Lines        127674   127703      +29     
  Branches       2610     2610              
============================================
+ Hits          35615    35620       +5     
- Misses        90528    90552      +24     
  Partials       1531     1531              
Flag Coverage Δ
core 79.38% <ø> (ø)
editoast 75.28% <ø> (-0.02%) ⬇️
front 8.42% <11.11%> (+<0.01%) ⬆️
gateway 2.50% <ø> (ø)
railjson_generator 87.25% <ø> (ø)
tests 81.95% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@SharglutDev SharglutDev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this PR. Everything works great. Left a comment and a suggestion

@Caracol3 Caracol3 force-pushed the mcy/front-add-focus-on-relevant-inputs-when-needed branch from 3794928 to e3bdd7c Compare February 9, 2024 16:23
Copy link
Contributor

@SharglutDev SharglutDev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the changes, a few more comments and we are good to go :)

front/src/utils/helpers.ts Outdated Show resolved Hide resolved
@Caracol3 Caracol3 force-pushed the mcy/front-add-focus-on-relevant-inputs-when-needed branch from e3bdd7c to d204e34 Compare February 12, 2024 09:06
…pens

- added focus on mapSearchStation
- added focus on addOrEditProjectModal
- added focus on addOrEditStudyModal
- added focus on addOrEditScenarioModal
- create custom hook useModalFocusTrap in utils/hooks
@Caracol3 Caracol3 force-pushed the mcy/front-add-focus-on-relevant-inputs-when-needed branch from d204e34 to f634e39 Compare February 12, 2024 09:49
Copy link
Contributor

@SharglutDev SharglutDev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm and tested

@SharglutDev SharglutDev added this pull request to the merge queue Feb 12, 2024
Merged via the queue into dev with commit 07a977f Feb 12, 2024
22 checks passed
@SharglutDev SharglutDev deleted the mcy/front-add-focus-on-relevant-inputs-when-needed branch February 12, 2024 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:front Work on Standard OSRD Interface modules kind:enhancement Improvement of existing features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

front: add focus on relevant inputs when needed Focus in title input when creating Project/Study/Scenario
2 participants