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 #6147

Closed
Tracked by #6445
Bonapara opened this issue Jul 5, 2024 · 12 comments · Fixed by #7130
Closed
Tracked by #6445

Settings Advanced Mode #6147

Bonapara opened this issue Jul 5, 2024 · 12 comments · Fixed by #7130
Assignees
Labels
scope: front Issues that are affecting the frontend side only size: short

Comments

@Bonapara
Copy link
Member

Bonapara commented Jul 5, 2024

Desired Behavior

We want to introduce a new Advanced Settings toggle allowing users to view advanced (often technical) settings. The goal is to reduce interface clutter.

The toggle should always be at the settings page bottom left. We want the following issues addressed before displaying it:

#6145
#6146

image

Component

image

https://www.figma.com/design/xt8O9mFeLl46C5InWwoMrN/Twenty?node-id=11519-270312&t=H5hfHOgNoulsToAq-11

Settings Navbar

Add a new Developers section that would have two sub-pages:

  • API & Webhooks
  • Functions

CleanShot 2024-09-11 at 15 29 59

@Bonapara Bonapara added good first issue Good for newcomers scope: front Issues that are affecting the frontend side only size: short labels Jul 5, 2024
Copy link
Contributor

greptile-apps bot commented Jul 5, 2024

Implementation Steps

  1. Create Advanced Settings Toggle Component

    • Create a new component AdvancedSettingsToggle.tsx in the components directory.
    import React from 'react';
    import styled from '@emotion/styled';
    import { Toggle } from 'twenty-ui';
    
    const Container = styled.div`
      position: fixed;
      bottom: 16px;
      left: 16px;
    `;
    
    export const AdvancedSettingsToggle = () => {
      const [isAdvanced, setIsAdvanced] = React.useState(false);
    
      const handleToggle = () => {
        setIsAdvanced(!isAdvanced);
      };
    
      return (
        <Container>
          <Toggle checked={isAdvanced} onChange={handleToggle} label="Advanced Settings" />
        </Container>
      );
    };
  2. Add Toggle to Settings Pages

    • Import and add the AdvancedSettingsToggle component to the following settings pages:
      • SettingsWorkspace.tsx
      • SettingsProfile.tsx
      • SettingsDevelopers.tsx
      • SettingsObjectDetail.tsx
      • SettingsObjectNewFieldStep1.tsx
      • SettingsObjects.tsx
    import { AdvancedSettingsToggle } from '@/settings/components/AdvancedSettingsToggle';
    
    // Add <AdvancedSettingsToggle /> at the bottom of the return statement in each component
  3. Conditionally Display Toggle

    // Example conditional rendering
    {isIssue6145Resolved && isIssue6146Resolved && <AdvancedSettingsToggle />}
  4. Update State Management

    • Ensure the state of the toggle is managed and can be accessed globally if needed.

Relevant Files

  • src/pages/settings/SettingsWorkspace.tsx
  • src/pages/settings/SettingsProfile.tsx
  • src/pages/settings/developers/SettingsDevelopers.tsx
  • src/pages/settings/data-model/SettingsObjectDetail.tsx
  • src/pages/settings/data-model/SettingsObjectNewField/SettingsObjectNewFieldStep1.tsx
  • src/pages/settings/data-model/SettingsObjects.tsx

References

/packages/twenty-front/src/pages/settings/SettingsWorkspace.tsx
/packages/twenty-front/src/pages/settings/SettingsProfile.tsx
/packages/twenty-front/src/pages/settings/developers/SettingsDevelopers.tsx
/packages/twenty-front/src/pages/settings/data-model/SettingsObjectDetail.tsx
/packages/twenty-front/src/pages/settings/data-model/SettingsObjectNewField/SettingsObjectNewFieldStep1.tsx
/packages/twenty-front/src/pages/settings/data-model/SettingsObjects.tsx
/packages/twenty-front/src/pages/settings

About Greptile

This response provides a starting point for your research, not a precise solution.

Help us improve! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

Ask Greptile · Edit Issue Bot Settings

@prevar
Copy link

prevar commented Jul 7, 2024

Hi, Please let me know if this issue is available. Can I can pick it up? Thanks.

@Bonapara
Copy link
Member Author

Bonapara commented Jul 8, 2024

Hi @prevar, this issue is available, but it should be toggled under a feature flag while we wait for the two mentioned issues to be completed.

@prevar
Copy link

prevar commented Jul 8, 2024

Ok. Thanks I will wait for the 2 issues to be completed to start working on this issue.

@FelixMalfait
Copy link
Member

Store this in localstorage (

export const localStorageEffect =
)

Copy link
Contributor

gitstart-app bot commented Sep 11, 2024

Here is the GitStart Ticket for this issue: https://clients.gitstart.com/twenty/5449/tickets/TWNTY-6147

@ijreilly
Copy link
Collaborator

ijreilly commented Sep 11, 2024

Let's kickstart this issue together when it is ready to be taken. I think we can start with the FE only behind a feature flag, that would cover

  1. the Advanced component feature here in the left bar
  2. the front-end only for the first advanced feature we will have: Avanced Settings: Custom API names for Object and Fields #6145
Capture d’écran 2024-09-11 à 15 40 49 that includes making the toggle work (show/hide "Api name" upon toggle, with an animation perhaps?)

@gitstart-twenty fyi for when you will start working on it. @Bonapara fyi

@gitstart-twenty
Copy link
Contributor

Hello @ijreilly
so, we would need to implement the toggle and use this API Name input to test the implementation of the feature, but just to show the feature working, right?

I imagine that in this case, we would just need to get the field name and display it on a disabled input, is that correct?
do we need to add any other part of the other issue?

Also, we could not find the designs in Figma, I think the link is broken, it redirects to this page:
image

Hey @Bonapara
could you provide the links for the toggle and for the feature mentioned above? Also, would be very nice if you could give us access to the dev mode on the Figma 🤝

@Bonapara
Copy link
Member Author

Toggle

https://www.figma.com/design/xt8O9mFeLl46C5InWwoMrN/Twenty?node-id=34851-536797&t=emUxzrvX6zNaHyLZ-4

Navbar

https://www.figma.com/design/xt8O9mFeLl46C5InWwoMrN/Twenty?node-id=34845-235253&t=emUxzrvX6zNaHyLZ-4

Please get in touch with me on Discord for Dev mode access ;)

@gitstart-twenty
Copy link
Contributor

Hello again @Bonapara 👋
Currently we have this GitHub version component in the same place where the toggle would be implemented, we would like to confirm if we should remove the component or keep this along the toggle
image

@Bonapara
Copy link
Member Author

Hi @gitstart-twenty 👋 We should move the version to the bottom of the General Settings page. Thanks!

image

@gitstart-twenty
Copy link
Contributor

ok, thank you

ijreilly pushed a commit that referenced this issue Oct 2, 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

---------

Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com>
Co-authored-by: gitstart-twenty <140154534+gitstart-twenty@users.noreply.github.com>
harshit078 pushed a commit to harshit078/twenty that referenced this issue 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 <gitstart-twenty@users.noreply.github.com>
Co-authored-by: gitstart-twenty <140154534+gitstart-twenty@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: front Issues that are affecting the frontend side only size: short
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

5 participants