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

Toggle field - Add customization options #517

Closed
harinij opened this issue Sep 30, 2021 · 10 comments
Closed

Toggle field - Add customization options #517

harinij opened this issue Sep 30, 2021 · 10 comments
Labels
good first issue Good for newcomers

Comments

@harinij
Copy link
Member

harinij commented Sep 30, 2021

Is your feature request related to a problem? Please describe.
Currently, the "Toggle" field doesn't have customization to change the color from green to anything else

Describe the solution you'd like
Allow in the UI option for users to add color using the color pick modal similar to what is used in the percentage field
Screenshot 2023-04-20 at 7 07 44 pm

@harinij harinij added the good first issue Good for newcomers label Sep 30, 2021
@yasinbordbar
Copy link

Please assign me to do this.

@ChinazoOnwukaike
Copy link

Can this be assigned to me please?

@harinij
Copy link
Member Author

harinij commented Nov 18, 2022

@ChinazoOnwukaike please let us know if you are still working on this or if you need any inputs. Unassigning for now.

@RajGM
Copy link
Contributor

RajGM commented Apr 22, 2023

Hi @harinij
I am working on this: ef4fa7d

Color pick modal is added.

Commit: RajGM@ef4fa7d

Remaining: Coloring of the table cell based on true/false;
ColorModal

@RajGM
Copy link
Contributor

RajGM commented Apr 24, 2023

Hi @harinij

Is your feature request related to a problem? Please describe. Currently, the "Toggle" field doesn't have customization to change the color from green to anything else

Does that means we are only looking to change the color or toggle button instead of whole cell?

@RajGM
Copy link
Contributor

RajGM commented Apr 24, 2023

Switch

@RajGM
Copy link
Contributor

RajGM commented Apr 24, 2023

Hi @shamsmosowi and @BeeBombshell

for the src>components>fields>Checkbox>EditorCell.tsx

` return (
<FormControlLabel
control={
<Switch
checked={!!value}
onChange={handleChange}
disabled={disabled}
tabIndex={tabIndex}
size="small"
sx={{

        }}
      />
  }
  label={column.name as string}
  labelPlacement="start"
  sx={{
    m: 0,
    width: "100%",
    alignItems: "center",

    "& .MuiFormControlLabel-label": {
      font: "inherit",
      letterSpacing: "inherit",
      flexGrow: 1,
      overflowX: "hidden",
      mt: "0 !important",
    },

    "& .MuiSwitch-root": { mr: -0.75 },
  }}
/>

);`

Color properties are working for toggled off state with sx props but not for toggled On props.

Link to push: RajGM@09ae503

@RajGM
Copy link
Contributor

RajGM commented Apr 24, 2023

Even if I try to copy the styling from: https://mui-treasury.com/styles/switch/

It's not working.

@RajGM
Copy link
Contributor

RajGM commented Apr 24, 2023

@iamanishroy

@harinij
Copy link
Member Author

harinij commented Apr 26, 2023

Hi @RajGM thanks for pointing it out. Looks like this would not be a feasible solution so we are closing the issue.

@harinij harinij closed this as completed Apr 26, 2023
@rowyio rowyio deleted a comment from algora-pbc bot Apr 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

5 participants