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

Change name for interne deployment #10302

Merged
merged 1 commit into from
Jan 16, 2025
Merged

Conversation

Uriel-Sautron
Copy link
Contributor

@Uriel-Sautron Uriel-Sautron commented Jan 9, 2025

close #10281
For internal deployment we need to display the LMR and Horizon logos.

For test:

  • create a folder overrides at the front root
  • add in this folder the images you find here and overrides.json
// overrides.json
{
   "names": {
     "stdcm": "Last Minute Request",
     "digital_twin": "Horizon"
   },
 "icons": {
    "stdcm": {
      "light": "Logotype_LastMinuteRequest_light",
      "dark": "Logotype_LastMinuteRequest_dark"
    },
    "digital_twin": {
      "light": "Logotype_Horizon_light",
      "dark": "Logotype_Horizon_dark"
    }
  }
} 

@Uriel-Sautron Uriel-Sautron requested a review from a team as a code owner January 9, 2025 12:58
@github-actions github-actions bot added the area:front Work on Standard OSRD Interface modules label Jan 9, 2025
@codecov-commenter
Copy link

codecov-commenter commented Jan 9, 2025

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.61%. Comparing base (9ddc06c) to head (c380d4b).
Report is 1 commits behind head on dev.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##              dev   #10302   +/-   ##
=======================================
  Coverage   81.61%   81.61%           
=======================================
  Files        1067     1067           
  Lines      105535   105624   +89     
  Branches      727      727           
=======================================
+ Hits        86128    86205   +77     
- Misses      19366    19378   +12     
  Partials       41       41           
Flag Coverage Δ
editoast 73.64% <ø> (-0.04%) ⬇️
front 89.32% <100.00%> (+0.01%) ⬆️
gateway 2.18% <ø> (ø)
osrdyne 3.28% <ø> (ø)
railjson_generator 87.50% <ø> (ø)
tests 87.05% <ø> (ø)

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
Member

@ElysaSrc ElysaSrc left a comment

Choose a reason for hiding this comment

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

Thanks for the PR !

In my understanding of the front (which might get a bit rusty over time) I think we should reference directly only the files that are present in the code base (the default logo) and switch if the override file exists on the server and defines the fields on the json.

front/src/utils/hooks/useLogo.ts Outdated Show resolved Hide resolved
@Uriel-Sautron Uriel-Sautron requested review from Yohh and ElysaSrc January 9, 2025 14:43
Copy link
Member

@ElysaSrc ElysaSrc left a comment

Choose a reason for hiding this comment

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

Overall LGTM, thanks !

front/src/utils/hooks/useLogo.ts Outdated Show resolved Hide resolved
@Uriel-Sautron Uriel-Sautron force-pushed the usn/change-name-interne-deployment branch from 9e3dc3d to 23fa75a Compare January 10, 2025 11:23
front/src/common/BootstrapSNCF/NavBarSNCF.tsx Show resolved Hide resolved
front/src/utils/hooks/useLogo.ts Outdated Show resolved Hide resolved
front/src/utils/hooks/useLogo.ts Outdated Show resolved Hide resolved
front/src/utils/hooks/useLogo.ts Outdated Show resolved Hide resolved
@Uriel-Sautron Uriel-Sautron force-pushed the usn/change-name-interne-deployment branch from bf5c79a to 3e97922 Compare January 14, 2025 09:44
front/src/utils/hooks/useLogo.ts Outdated Show resolved Hide resolved
front/src/utils/hooks/useLogo.ts Outdated Show resolved Hide resolved
front/src/utils/hooks/useLogo.ts Outdated Show resolved Hide resolved
front/src/utils/hooks/useLogo.ts Outdated Show resolved Hide resolved
front/src/common/BootstrapSNCF/NavBarSNCF.tsx Outdated Show resolved Hide resolved
front/src/common/BootstrapSNCF/NavBarSNCF.tsx Outdated Show resolved Hide resolved
@Uriel-Sautron Uriel-Sautron force-pushed the usn/change-name-interne-deployment branch from 3e97922 to e83a2ad Compare January 15, 2025 16:34
@Uriel-Sautron Uriel-Sautron requested a review from clarani January 15, 2025 16:35
@Uriel-Sautron Uriel-Sautron force-pushed the usn/change-name-interne-deployment branch 2 times, most recently from ce6f849 to 6936ddb Compare January 16, 2025 09:11
@ElysaSrc
Copy link
Member

Tested on internal deployments, works properly. LGTM.

@Uriel-Sautron Uriel-Sautron requested a review from a team as a code owner January 16, 2025 09:53
front/src/utils/hooks/useDeploymentSettings.ts Outdated Show resolved Hide resolved
front/src/utils/hooks/useDeploymentSettings.ts Outdated Show resolved Hide resolved
front/src/utils/hooks/useDeploymentSettings.ts Outdated Show resolved Hide resolved
@Uriel-Sautron Uriel-Sautron force-pushed the usn/change-name-interne-deployment branch 2 times, most recently from 0284f29 to 32cf3d3 Compare January 16, 2025 10:31
Copy link
Contributor

@clarani clarani left a comment

Choose a reason for hiding this comment

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

LGTM ✅

@Uriel-Sautron Uriel-Sautron force-pushed the usn/change-name-interne-deployment branch from 32cf3d3 to bf11090 Compare January 16, 2025 10:44
  - change logo stdcm when using application internally

Signed-off-by: Uriel-Sautron <uriel.sautron@gmail.com>

  - add lmr logo in stdcm simulation report sheet when using the application internally

  - create hook useLogo

  - use useLogo in app

  - remove logo.ts

  - add customized name

  - change hook useLoge to useDeploymentSetting

 test: change name stdcm pdf

  - with the modifications on the names in internal deployment the name of the pdf changed from STDCM to Stdcm
@Uriel-Sautron Uriel-Sautron force-pushed the usn/change-name-interne-deployment branch from bf11090 to c380d4b Compare January 16, 2025 10:54
@bloussou bloussou enabled auto-merge January 16, 2025 10:59
Copy link
Contributor

@flomonster flomonster left a comment

Choose a reason for hiding this comment

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

There are several occurrences of lmr which is not (yet) used for the open source part. Ideally, we should only use stdcm for consistency.

@bloussou bloussou disabled auto-merge January 16, 2025 11:07
@bloussou bloussou enabled auto-merge January 16, 2025 11:12
@bloussou bloussou added this pull request to the merge queue Jan 16, 2025
Merged via the queue into dev with commit 9151b80 Jan 16, 2025
27 checks passed
@bloussou bloussou deleted the usn/change-name-interne-deployment branch January 16, 2025 12:17
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Personnaliser les déploiements internes avec les nouveaux noms
9 participants