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

This PR is to resolve : [EPIC] Allow users to be able to edit palette and default color theme in existing design system #820 #972

Open
wants to merge 27 commits into
base: epic-820
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
f9bdc18
changesToNavigationBar
omesh-omg Jun 11, 2024
b73b8ff
commit before rebasing
omesh-omg Jul 10, 2024
fae3ffa
Merge branch 'dev' of https://github.com/finos/a11y-theme-builder int…
omesh-omg Jul 10, 2024
765c687
displayColorPaletteChanges
omesh-omg Jul 10, 2024
93d07ca
adding all three pages with basic functionalities
omesh-omg Jul 18, 2024
3b63525
more changes
omesh-omg Jul 18, 2024
4f948ed
adding delete color functionality
omesh-omg Jul 18, 2024
9180914
adding confirmation for delete color
omesh-omg Jul 18, 2024
5c95d00
starting with changing the display of colors
omesh-omg Jul 22, 2024
225b022
fixing some bugs
omesh-omg Jul 25, 2024
546ffc9
more bug fixing still can't delete the default color
omesh-omg Jul 25, 2024
c1ced31
disabling your color palette when there is no color
omesh-omg Jul 25, 2024
89c5e88
Merge branch 'epic-820' into Issue#914-Impliment-Core-Settings-Page
omesh-omg Jul 26, 2024
4c105c3
auto deploying epic-820 branch
omesh-omg Jul 26, 2024
2237d98
Adding Unable to delete modal
omesh-omg Jul 26, 2024
bcf4163
adjusting-header-files
omesh-omg Aug 6, 2024
e683de2
fixing bottom-strip and Left Nav Bar Unnecessary elements
omesh-omg Aug 21, 2024
4413f51
little-fixes
omesh-omg Aug 21, 2024
25cdf67
fixing edit color statement
omesh-omg Aug 21, 2024
c77eee9
open chroma link in new-tab
omesh-omg Aug 21, 2024
92aba60
changes-to-ommit-bugs-in-bottom-strip
omesh-omg Sep 3, 2024
f8543ba
starting-with-step-3ui
omesh-omg Sep 4, 2024
8b999c6
adding-view-Mode-for-displaying-themes
omesh-omg Sep 5, 2024
a333acf
adding-tabs-in-color-pallete-display
omesh-omg Sep 5, 2024
6d671ea
adding-expandable/collapsablepannels-customizing-color-select-
omesh-omg Sep 6, 2024
7f9bb77
little-changes
omesh-omg Sep 6, 2024
53dd1bb
adding-base-color-name
omesh-omg Sep 7, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/publish-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
branches:
- 'main'
- 'dev'
- 'epic-820'
paths:
- 'code/src/**'
- 'code/package.json'
Expand Down
15 changes: 12 additions & 3 deletions code/src/data/themes

Large diffs are not rendered by default.

15 changes: 13 additions & 2 deletions code/src/ui/src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ p a:hover {
*/

.button-area {

justify-content: flex-start;
display: flex;
padding-top: 20px;
Expand Down Expand Up @@ -101,8 +102,18 @@ p a:hover {
margin: 8px 0;
}

.darkmode .background,
.darkmode.background {

.collapsable-Container{
margin-left: 32px;
border: 1px;
border-style: solid;
border-radius: 8px;
border-color: #91919F;


}
.darkmode .background, .darkmode.background {

background: var(--dm-background) !important;
color: var(--dm-on-background) !important;
}
47 changes: 47 additions & 0 deletions code/src/ui/src/components/BottomStrip.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/**
* SPDX-License-Identifier: Apache-2.0
* Copyright 2024 FINOS A11y Theme Builder contributors - see NOTICE file
*/
import React from 'react';
import Button from '@mui/material/Button';

interface BottomStripProps {
onBack: () => void;
onSave: () => void;
onSaveAndContinue: () => void;
numOfColors: Number
}

export const BottomStrip: React.FC<BottomStripProps> = ({ onBack, onSave, onSaveAndContinue, numOfColors }) => {
return (
<div
style={{
position: 'fixed',
bottom: 0,
width: '100%',
maxWidth: '100%',
margin: '0 auto',
display: 'flex',
gap:"8px",
// justifyContent: 'space-between',
padding: '8px',
backgroundColor: '#fff',
boxShadow: '0 -2px 5px rgba(0,0,0,0.1)',
zIndex: 10, // Ensure it stays on top of other content
}}
>
<Button variant="text" onClick={onBack}>
Back
</Button>

<Button variant="outlined" onClick={onSave} style={{ marginRight: '8px' }} disabled={numOfColors === 0} >
Save
</Button>
<Button variant="contained" onClick={onSaveAndContinue} disabled={numOfColors === 0} >
Save and Continue
</Button>

</div>
);
};

29 changes: 27 additions & 2 deletions code/src/ui/src/components/ColorSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ interface Props {
baseColorHex?: Set<string>;
label?: string;
defaultValue?: string;
optional?:boolean;
}

class GridShade {
Expand All @@ -46,6 +47,7 @@ export const ColorSelect: React.FC<Props> = ({
baseColorHex,
label,
defaultValue,
optional,
}) => {
const [_selectedValue, _setSelectedValue] = useState<string>(
defaultValue || ''
Expand All @@ -56,6 +58,7 @@ export const ColorSelect: React.FC<Props> = ({
const [_longestRow, _setLongestRow] = useState<number>(0);
const [_disabled, _setDisabled] = useState<boolean>(false);
const [_shadeLabel, _setShadeLabel] = useState<string>('');
const [_selectedBaseColorName, _setSelectedBaseColorName ] = useState<string>('');

useEffect(() => {
if (value) {
Expand Down Expand Up @@ -149,6 +152,7 @@ export const ColorSelect: React.FC<Props> = ({
_selectableValues[indexOfSelectedItem].shade;
value.setValue(newSelectedValue);
_setSelectedValue(selectedValue);
_setSelectedBaseColorName(newSelectedValue.getMode().color.name);
_setShadeLabel(_getShadeLabel(newSelectedValue));
console.log(`Color changed by UI to ${value}`);
}
Expand Down Expand Up @@ -181,10 +185,20 @@ export const ColorSelect: React.FC<Props> = ({
return (
<div>
{label && (
<InputLabel className="caption" htmlFor="outlined-select">
<InputLabel htmlFor="outlined-select" style={{fontWeight:"bold"}}>
{label}
</InputLabel>
)}
{optional? (
<InputLabel className="caption" htmlFor="outlined-select">
Optional
</InputLabel>
):(
<InputLabel className="caption" htmlFor="outlined-select" style={{visibility:"hidden"}}>
Optional
</InputLabel>
)
}
<Select
onChange={handleColorChange}
displayEmpty={true}
Expand All @@ -203,7 +217,7 @@ export const ColorSelect: React.FC<Props> = ({
: '' || ''
}
/>
</Box>
</Box>
)}
MenuProps={{
anchorOrigin: {
Expand Down Expand Up @@ -264,6 +278,17 @@ export const ColorSelect: React.FC<Props> = ({
);
})}
</Select>
{
_selectedValue!=""?(
<InputLabel className="caption" htmlFor="outlined-select" style={{paddingTop:"8px"}}>
{_selectedBaseColorName}-{_shadeLabel}
</InputLabel>
):(
<InputLabel htmlFor="outlined-select" style={{visibility:"hidden"}}>
Not selected
</InputLabel>
)
}
</div>
);
} else {
Expand Down
1 change: 0 additions & 1 deletion code/src/ui/src/components/ColorShade.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ export const ColorShade: React.FC<Props> = ({
color: _shade.getOnShade().getHexOrRGBA(),
}}
>
Aa
</div>
{showDetails && (
<div className="swatch-details active">
Expand Down
16 changes: 3 additions & 13 deletions code/src/ui/src/components/ColorShadeCss.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,19 +106,9 @@ export const ColorShadeCss: React.FC<Props> = ({
}, []);

return (
<div
className={className ?? ''}
style={
isBaseColor
? {
paddingTop: '2px',
paddingLeft: '4px',
borderRadius: '8px',
backgroundColor: 'var(--primary-quarter',
}
: {}
}
>

<div className={className ?? ""} style={isBaseColor ? {paddingTop:"2px",paddingLeft:"4px",borderRadius:"0px",border:"1px",borderStyle:"solid",borderColor:"#CFD3D8"} : {}}>

{label && <div className="caption text-center">{label}</div>}
{showId && <div className="subtitle1 text-center">{id}</div>}
<div className="Hex" style={style}>
Expand Down
Loading