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

Settings Advanced Mode #7130

Merged
merged 11 commits into from
Oct 2, 2024
Merged

Settings Advanced Mode #7130

merged 11 commits into from
Oct 2, 2024

Conversation

gitstart-app[bot]
Copy link
Contributor

@gitstart-app gitstart-app bot commented Sep 18, 2024

Description

  • We implemented the Advanced Mode state and used this on a section of the settings sidebar
  • in DefaultLayout.tsx, was updated because of the 64 + 16(container size of IconTool + the margins)

https://jam.dev/c/29bcec70-0b7f-4afa-98e6-9755657cf09d

Refs

#6147

Fixes #6147

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

This pull request implements an Advanced Mode feature for the settings sidebar in the Twenty application. Here's a summary of the key changes:

  • Added a new AdvancedSettingsToggle component at the bottom of the settings sidebar
  • Implemented a Developers section in the settings navigation, visible when Advanced Mode is enabled
  • Created a Recoil atom to manage the Advanced Mode state, persisting it in local storage
  • Updated the NavigationDrawer component to accommodate the new Advanced Mode toggle
  • Adjusted layout and styling in various components to ensure proper alignment and responsiveness

Key points:

  • New AdvancedSettingsToggle component with yellow-themed styling and icon
  • Animated Developers section appears when Advanced Mode is enabled
  • Recoil state management for Advanced Mode toggle
  • Layout adjustments in DefaultLayout and NavigationDrawer for consistency
  • Added IconTool to TablerIcons for use in the new feature

10 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings

import { localStorageEffect } from '~/utils/recoil-effects';

export const isAdvancedModeEnabledState = atom<boolean>({
key: 'isAdvancedModeEnabledAtom',
Copy link
Contributor

Choose a reason for hiding this comment

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

style: Consider using a more descriptive key, e.g., 'isAdvancedModeEnabled'

Copy link
Collaborator

@ijreilly ijreilly left a comment

Choose a reason for hiding this comment

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

good job using recoil state!
I think there are two UI issues though

  1. the tool icon size compared to the line is not the same as on the figma I think
    from the PR:
    <img width="197" alt="Capture d’écran 2024-09-23 à 17 07 35" src="https://github.com/user-attachments/assets/3f1ba280-1afc-4fd4-81a6-caa37e546f

on the figma:
Capture d’écran 2024-09-23 à 17 07 42
ad">

  1. there is a glitch when untoggling the advanced mode:
    https://github.com/user-attachments/assets/474616a1-b885-4ebf-a8e6-7c6e4056de8c

@gitstart-twenty
Copy link
Contributor

Hello @ijreilly
for some reason the image is not loading for us, could you upload it again? we could not identify the difference you mentioned

@ijreilly
Copy link
Collaborator

ijreilly commented Sep 24, 2024

@gitstart-twenty
Capture d’écran 2024-09-23 à 17 07 35
icon is quite small and less centered than on the figma :
Capture d’écran 2024-09-23 à 17 07 42

@ijreilly
Copy link
Collaborator

@gitstart-twenty there is still a glitch, at expand-time now:

369937339-474616a1-b885-4ebf-a8e6-7c6e4056de8c.mov

We are super exacting on the UI aiming at a super smooth platform :)

`;

const StyledIconTool = styled(IconTool)`
margin-right: 3px;
Copy link
Collaborator

Choose a reason for hiding this comment

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

We usually don't hardcode the values for margins, and usually work in 4x values (4Px, 8px, etc.; sometimes 2px for gaps). Are you sure this respects the figma (I temporarily don't have dev mode access it seems so cannot check)? Or is this an attempt to center things (we should not rely on margin size for that)? Or if it's because it is taking into account a border (in that case, try using box-sizing)

height: { duration: 0.4 },
},
},
exit: {
Copy link
Collaborator

Choose a reason for hiding this comment

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

could be put in common with initial (exact same values if im not mistaken)

@gitstart-twenty
Copy link
Contributor

Hello @ ijreilly
We are working on it!

Copy link
Collaborator

@ijreilly ijreilly left a comment

Choose a reason for hiding this comment

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

Hey, two lasts notes:

  1. Can we replace "Advanced:" with "Advanced" please?
  2. toggle should be aligned to the right with the labels from the side bar (on the red line:)
Capture d’écran 2024-10-02 à 10 45 57

thanks :)

@gitstart-twenty
Copy link
Contributor

Hello @ijreilly. we pushed the changes 🤝

Copy link
Collaborator

@ijreilly ijreilly left a comment

Choose a reason for hiding this comment

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

looking good !

@ijreilly ijreilly merged commit 23001ac into main Oct 2, 2024
7 of 12 checks passed
@ijreilly ijreilly deleted the TWNTY-6147 branch October 2, 2024 15:04
Copy link

github-actions bot commented Oct 2, 2024

Fails
🚫

node failed.

Log

�[31mError: �[39m SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
�[90m    at parseJSONFromBytes (node:internal/deps/undici/undici:5584:19)�[39m
�[90m    at successSteps (node:internal/deps/undici/undici:5555:27)�[39m
�[90m    at fullyReadBody (node:internal/deps/undici/undici:1665:9)�[39m
�[90m    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)�[39m
�[90m    at async specConsumeBody (node:internal/deps/undici/undici:5564:7)�[39m
danger-results://tmp/danger-results-8cf9d199.json

Generated by 🚫 dangerJS against 6f28044

thomtrp added a commit that referenced this pull request Oct 7, 2024
This PR moved the settings navigation to the left and bottom
#7130

Updating the logic to:
-remove logic that move the existing
-add the setting icon to absolute

<img width="264" alt="Capture d’écran 2024-10-07 à 18 04 05"
src="https://github.com/user-attachments/assets/b848a5dd-50e9-48c2-bb50-1dcffa9481ac">
<img width="264" alt="Capture d’écran 2024-10-07 à 18 04 11"
src="https://github.com/user-attachments/assets/3812929c-dce0-410b-8caa-3ea1210af958">
harshit078 pushed a commit to harshit078/twenty that referenced this pull request Oct 14, 2024
### Description

- We implemented the Advanced Mode state and used this on a section of
the settings sidebar
- in DefaultLayout.tsx, was updated because of the 64 + 16(container
size of IconTool + the margins)

### <https://jam.dev/c/29bcec70-0b7f-4afa-98e6-9755657cf09d>

### Refs

twentyhq#6147 

Fixes twentyhq#6147

---------

Co-authored-by: gitstart-twenty <[email protected]>
Co-authored-by: gitstart-twenty <[email protected]>
harshit078 pushed a commit to harshit078/twenty that referenced this pull request Oct 14, 2024
This PR moved the settings navigation to the left and bottom
twentyhq#7130

Updating the logic to:
-remove logic that move the existing
-add the setting icon to absolute

<img width="264" alt="Capture d’écran 2024-10-07 à 18 04 05"
src="https://github.com/user-attachments/assets/b848a5dd-50e9-48c2-bb50-1dcffa9481ac">
<img width="264" alt="Capture d’écran 2024-10-07 à 18 04 11"
src="https://github.com/user-attachments/assets/3812929c-dce0-410b-8caa-3ea1210af958">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Settings Advanced Mode
2 participants