-
Notifications
You must be signed in to change notification settings - Fork 4
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
Adjust titles when selecting drawer #1435
Conversation
src/ThreeEditor/components/Editor/EditorAppBar/components/EditorTitlebar.tsx
Outdated
Show resolved
Hide resolved
src/ThreeEditor/components/Editor/EditorAppBar/components/EditorTitlebar.tsx
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few suggestions:
If there will be any new tab added to the drawer, this tab title handler will not know that and will display a default title until someone adds the handle for that.
Possible Solutions:
-
Create an object type that has all index names. Use those values as indices for TabPanel.
ui/src/WrapperApp/WrapperApp.tsx
Lines 80 to 82 in 3f0f955
<TabPanel value={tabsValue} index={'editor'} -
Right now all labels are just indices transformed from camelCase to Sentence case. You could just make a helper function that does exactly that and there will be no need for objects like this:
ui/src/WrapperApp/WrapperApp.tsx
Lines 55 to 62 in 3f0f955
const tabTitles = { login: 'Login', editor: 'Editor', inputFiles: 'Input files', simulations: 'Simulations', results: 'Results', about: 'About' };
No description provided.