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

TIS-565/Fintraffic UI customisations #1391

Merged

Conversation

solita-sabinaf
Copy link
Collaborator

@solita-sabinaf solita-sabinaf commented Jun 5, 2024

Customisation areas:

  • Styles
  • App logo
  • Translations, e.g. overriding certain values or additional company-specific keys

src/index.tsx Outdated Show resolved Hide resolved
src/config/config.ts Outdated Show resolved Hide resolved
src/config/config.ts Outdated Show resolved Hide resolved
src/config/config.ts Show resolved Hide resolved
src/ext/SandboxFeature.tsx Outdated Show resolved Hide resolved
src/helpers/validation.ts Show resolved Hide resolved
src/i18n/EnkiIntlProvider.tsx Outdated Show resolved Hide resolved
src/i18n/EnkiIntlProvider.tsx Show resolved Hide resolved
src/index.tsx Outdated Show resolved Hide resolved
src/config/config.ts Outdated Show resolved Hide resolved
@solita-sabinaf solita-sabinaf force-pushed the TIS-565/fintraffic_style_customisations branch from 9bd5af5 to 4177a7b Compare June 14, 2024 07:11
package.json Outdated Show resolved Hide resolved
src/config/config.ts Outdated Show resolved Hide resolved
@@ -66,11 +77,14 @@ const renderIndex = async () => {
<Sentry.ErrorBoundary>
<ConfigContext.Provider value={config}>
<Provider store={store}>
<EnkiIntlProvider>
<SandboxFeature
Copy link
Collaborator

Choose a reason for hiding this comment

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

I see there's an improvement to be made to the SandboxFeature component. the renderFallback should allow to pass props, so that it can take children, that way we don't have to repeat them inside "EnkiApp".

Copy link
Collaborator Author

@solita-sabinaf solita-sabinaf Jun 14, 2024

Choose a reason for hiding this comment

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

Ah, now I get it! So children under the SandboxFeature would get passed along into renderFallback too

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

But noticed something else along the way
Screenshot 2024-06-14 at 13 24 06

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

With the feature flag off, no problems

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

With feature flag set to false, it does produce this kinds of thing (same as with feature on) when editing a form input on any page

@sentry_react.js?v=bca3daac:2942 Warning: A component is changing an uncontrolled input to be controlled. This is likely caused by the value changing from undefined to a defined value, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components
    at input
    at http://localhost:3001/node_modules/.vite/deps/chunk-57OQC4YP.js?v=fa3f8736:1084:24
    at div
    at InputGroupContextProvider2 (http://localhost:3001/node_modules/.vite/deps/chunk-57OQC4YP.js?v=fa3f8736:649:23)
    at http://localhost:3001/node_modules/.vite/deps/chunk-57OQC4YP.js?v=fa3f8736:691:23
    at http://localhost:3001/node_modules/.vite/deps/chunk-57OQC4YP.js?v=fa3f8736:1051:22
    at section
    at div
    at window.$RefreshReg$ (http://localhost:3001/src/components/GeneralLineEditor/index.tsx:36:3)
    at section
    at LineEditorSteps (http://localhost:3001/src/scenes/LineEditor/LineEditorSteps.tsx:24:11)
    at div
    at div
    at OverlayLoader (http://localhost:3001/src/components/OverlayLoader/index.tsx:22:3)
    at div
    at window.$RefreshReg$ (http://localhost:3001/src/components/LineEditorStepper/index.tsx:30:3)
    at Loading (http://localhost:3001/src/components/Loading/index.tsx:21:3)
    at div
    at div
    at Page (http://localhost:3001/src/components/Page/index.tsx:24:3)
    at commitMutationEffectsOnFiber (http://localhost:3001/node_modules/.vite/deps/chunk-WBIQBQPZ.js?v=fa3f8736:17699:15)
    at RenderedRoute (http://localhost:3001/node_modules/.vite/deps/chunk-ZZJRKN7J.js?v=fa3f8736:3630:5)
    at Routes (http://localhost:3001/node_modules/.vite/deps/chunk-ZZJRKN7J.js?v=fa3f8736:4134:5)
    at div
    at commitMutationEffectsOnFiber (http://localhost:3001/node_modules/.vite/deps/chunk-WBIQBQPZ.js?v=fa3f8736:17699:15)
    at Loading (http://localhost:3001/src/components/Loading/index.tsx:21:3)
    at div
    at div
    at div
    at ScrollToTop (http://localhost:3001/src/components/ScrollToTop/index.tsx:20:24)
    at Router (http://localhost:3001/node_modules/.vite/deps/chunk-ZZJRKN7J.js?v=fa3f8736:4077:15)
    at BrowserRouter (http://localhost:3001/node_modules/.vite/deps/react-router-dom.js?v=0683f181:549:5)
    at div
    at commitMutationEffectsOnFiber (http://localhost:3001/node_modules/.vite/deps/chunk-WBIQBQPZ.js?v=fa3f8736:17699:15)
    at ApolloProvider (http://localhost:3001/node_modules/.vite/deps/@apollo_client.js?v=a8152831:6238:19)
    at Apollo (http://localhost:3001/src/api/index.tsx:69:26)
    at commitMutationEffectsOnFiber (http://localhost:3001/node_modules/.vite/deps/chunk-WBIQBQPZ.js?v=fa3f8736:17699:15)
    at AuthProvider (http://localhost:3001/node_modules/.vite/deps/react-oidc-context.js?v=572331a2:3188:5)
    at AuthProvider (http://localhost:3001/src/auth/auth.tsx:106:32)
    at commitMutationEffectsOnFiber (http://localhost:3001/node_modules/.vite/deps/chunk-WBIQBQPZ.js?v=fa3f8736:17699:15)
    at Suspense
    at EnkiIntlProvider (http://localhost:3001/src/i18n/EnkiIntlProvider.tsx:25:3)
    at EnkiApp
    at Suspense
    at SandboxFeature (http://localhost:3001/src/ext/SandboxFeature.tsx:21:3)
    at Provider (http://localhost:3001/node_modules/.vite/deps/react-redux.js?v=a7105bce:1253:3)
    at commitMutationEffectsOnFiber (http://localhost:3001/node_modules/.vite/deps/chunk-WBIQBQPZ.js?v=fa3f8736:17699:15)

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this warning is unrelated

Copy link
Collaborator Author

@solita-sabinaf solita-sabinaf Jun 14, 2024

Choose a reason for hiding this comment

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

But this stuff is actually reproducing in the master branch as well, so at least not related to these changes

Warning: A component is changing an uncontrolled input to be controlled. This is likely caused by the value changing from undefined to a defined value, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components
    at input
    at http://localhost:3001/node_modules/.vite/deps/chunk-FJIJ4DGG.js?v=0b0b9d73:996:24
    at div
    at InputGroupContextProvider2 (http://localhost:3001/node_modules/.vite/deps/chunk-FJIJ4DGG.js?v=0b0b9d73:558:23)
    at http://localhost:3001/node_modules/.vite/deps/chunk-FJIJ4DGG.js?v=0b0b9d73:600:23
    at http://localhost:3001/node_modules/.vite/deps/chunk-FJIJ4DGG.js?v=0b0b9d73:963:22
    at section
    at div
    at window.$RefreshReg$ (http://localhost:3001/src/components/GeneralLineEditor/index.tsx:36:3)
    at section
    at LineEditorSteps (http://localhost:3001/src/scenes/LineEditor/LineEditorSteps.tsx:24:11)
    at div
    at div
    at OverlayLoader (http://localhost:3001/src/components/OverlayLoader/index.tsx:22:3)
    at div
    at window.$RefreshReg$ (http://localhost:3001/src/components/LineEditorStepper/index.tsx:30:3)
    at Loading (http://localhost:3001/src/components/Loading/index.tsx:21:3)
    at div
    at div
    at Page (http://localhost:3001/src/components/Page/index.tsx:24:3)
    at commitMutationEffectsOnFiber (http://localhost:3001/node_modules/.vite/deps/chunk-YZ6KICJ5.js?v=0b0b9d73:17727:15)
    at RenderedRoute (http://localhost:3001/node_modules/.vite/deps/chunk-QUOUU3SD.js?v=0b0b9d73:3646:5)
    at Routes (http://localhost:3001/node_modules/.vite/deps/chunk-QUOUU3SD.js?v=0b0b9d73:4151:5)
    at div
    at commitMutationEffectsOnFiber (http://localhost:3001/node_modules/.vite/deps/chunk-YZ6KICJ5.js?v=0b0b9d73:17727:15)
    at Loading (http://localhost:3001/src/components/Loading/index.tsx:21:3)
    at div
    at div
    at div
    at ScrollToTop (http://localhost:3001/src/components/ScrollToTop/index.tsx:20:24)
    at Router (http://localhost:3001/node_modules/.vite/deps/chunk-QUOUU3SD.js?v=0b0b9d73:4094:15)
    at BrowserRouter (http://localhost:3001/node_modules/.vite/deps/react-router-dom.js?v=ce4d925a:552:5)
    at div
    at commitMutationEffectsOnFiber (http://localhost:3001/node_modules/.vite/deps/chunk-YZ6KICJ5.js?v=0b0b9d73:17727:15)
    at ApolloProvider (http://localhost:3001/node_modules/.vite/deps/@apollo_client.js?v=93aa9440:6240:19)
    at Apollo (http://localhost:3001/src/api/index.tsx:69:26)
    at commitMutationEffectsOnFiber (http://localhost:3001/node_modules/.vite/deps/chunk-YZ6KICJ5.js?v=0b0b9d73:17727:15)
    at AuthProvider (http://localhost:3001/node_modules/.vite/deps/react-oidc-context.js?v=b78bfd7f:3188:5)
    at AuthProvider (http://localhost:3001/src/auth/auth.tsx:106:32)
    at commitMutationEffectsOnFiber (http://localhost:3001/node_modules/.vite/deps/chunk-YZ6KICJ5.js?v=0b0b9d73:17727:15)
    at Suspense
    at EnkiIntlProvider (http://localhost:3001/src/i18n/EnkiIntlProvider.tsx:25:3)
    at Provider (http://localhost:3001/node_modules/.vite/deps/react-redux.js?v=762375a4:1272:3)
    at commitMutationEffectsOnFiber (

@testower
Copy link
Collaborator

I think we're on the home stretch now, just some minor things left 🎉

@testower testower self-requested a review June 17, 2024 19:42
@testower testower merged commit 2b91b85 into entur:master Jun 17, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants