Skip to content

Commit

Permalink
No fieldset grouping color indicators and trash icon
Browse files Browse the repository at this point in the history
  • Loading branch information
RoyEJohnson committed Jan 15, 2025
1 parent 3ae7822 commit 7e72b37
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/app/content/highlights/components/ColorPicker.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ describe('ColorPicker', () => {
<ColorPicker color={highlightStyles[0].label} onChange={onChange} onRemove={onRemove} />
</TestContainer>
);
const rg = root.querySelector('fieldset > fieldset') as HTMLFieldSetElement;
const rg = root.querySelector('fieldset') as HTMLFieldSetElement;

expect(rg).toBeTruthy();
rg?.focus();
Expand Down
3 changes: 1 addition & 2 deletions src/app/content/highlights/components/ColorPicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ function nextIdx(idx: number, itemCount: number, key: NavKeys) {
}

// tslint:disable-next-line:variable-name
const FSWrapper = styled.fieldset`
const FSWrapper = styled.div`
border: 0;
display: flex;
flex-direction: row;
Expand Down Expand Up @@ -131,7 +131,6 @@ const ColorPicker = ({className, ...props}: Props) => {

return (
<FSWrapper>
<legend>Select or clear highlight color</legend>
<fieldset
className={className}
tabIndex={0}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -663,12 +663,9 @@ exports[`ContextMenu match snapshot when open 1`] = `
className="c13"
>
<li>
<fieldset
<div
className="c14"
>
<legend>
Select or clear highlight color
</legend>
<fieldset
className="c15 c16"
onFocus={[Function]}
Expand Down Expand Up @@ -990,7 +987,7 @@ exports[`ContextMenu match snapshot when open 1`] = `
/>
</label>
</fieldset>
</fieldset>
</div>
</li>
<li
aria-label="Add note"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -323,12 +323,9 @@ exports[`ColorPicker matches snapshot no selection 1`] = `
padding: 0.8rem 0.3rem;
}
<fieldset
<div
className="c0"
>
<legend>
Select or clear highlight color
</legend>
<fieldset
className="c1"
onFocus={[Function]}
Expand Down Expand Up @@ -646,5 +643,5 @@ exports[`ColorPicker matches snapshot no selection 1`] = `
src="trash-347.svg"
/>
</button>
</fieldset>
</div>
`;

0 comments on commit 7e72b37

Please sign in to comment.