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

Arenaform new design #2020

Merged
merged 13 commits into from
Sep 12, 2024
Merged

Arenaform new design #2020

merged 13 commits into from
Sep 12, 2024

Conversation

MaPoKen
Copy link
Contributor

@MaPoKen MaPoKen commented Aug 26, 2024

Nytt design på arenaform.

@MaPoKen MaPoKen marked this pull request as ready for review September 10, 2024 10:42
@MaPoKen MaPoKen requested a review from a team September 10, 2024 10:42
Copy link
Contributor

@Jonas-C Jonas-C left a comment

Choose a reason for hiding this comment

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

For lite padding mellom editor og siste innlegg.
image

Ser ut som at man mister fokus når man forkaster svaret.

Regner med at du går gjennom og sjekker alle farge-, spacing og typografi-verdier nøyde.

condition?: boolean,
) => {
if (!condition && isActive) {
return setToolbarValues((prev) => [...prev.filter((val) => val !== format)]);
Copy link
Contributor

Choose a reason for hiding this comment

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

Hvorfor trenger vi å spreade her?

if (!condition && isActive) {
return setToolbarValues((prev) => [...prev.filter((val) => val !== format)]);
} else if (condition && !isActive) {
return setToolbarValues((prev) => [...prev, format]);
Copy link
Contributor

Choose a reason for hiding this comment

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

Dette kan vel bare være en concat?

@@ -69,18 +71,34 @@ interface EditorToolbarProps {
editorIsFocused: boolean;
}

const selectionHasFormat = (
Copy link
Contributor

Choose a reason for hiding this comment

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

Synes ikke navnet på denne funksjonen reflekterer det som faktisk skjer i den.

setIsNumberedList(type === "number");

if (type === "bullet") {
return !isUnorderedList && setToolbarValues((prev) => [...prev.filter(filterList), "unordered"]);
Copy link
Contributor

Choose a reason for hiding this comment

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

Unødvendig spread?

if (type === "bullet") {
return !isUnorderedList && setToolbarValues((prev) => [...prev.filter(filterList), "unordered"]);
} else {
return !isOrderedList && setToolbarValues((prev) => [...prev.filter(filterList), "ordered"]);
Copy link
Contributor

Choose a reason for hiding this comment

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

Trenger dette å være en spread?

Copy link
Contributor

Choose a reason for hiding this comment

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

Ser ut som at vi nester P i P her. Sjekk content

@@ -184,9 +171,10 @@ const ArenaForm = ({ onSave, onAbort, type, initialTitle, initialContent, initia
shouldDirty: true,
});
}}
initialValue={initialContent ?? ""}
initialValue={initialContent ?? "<p></p>"}
Copy link
Contributor

Choose a reason for hiding this comment

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

Hvorfor er det endring her?

Comment on lines 62 to 69
const ButtonRow = styled(HStack, {
base: {
width: "100%",
"& > button": {
flexGrow: "1",
},
},
});
Copy link
Contributor

Choose a reason for hiding this comment

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

Her tror jeg vi kan forenkle litt, faktisk. Hva med å gjøre det til en grid som har 1fr 1fr? Da kan vi droppe stack og flexGrow

onClick={insertLink}
aria-label={linkLabel}
title={linkLabel}
aria-selected={isLink}
Copy link
Contributor

Choose a reason for hiding this comment

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

Vi trenger vel ikke aria-selected?

@MaPoKen MaPoKen merged commit 8b3b0b3 into master Sep 12, 2024
6 checks passed
@MaPoKen MaPoKen deleted the arenaform-new-design branch September 12, 2024 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants