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

Delete study flair #15684

Merged
merged 14 commits into from
Jul 10, 2024
Merged

Delete study flair #15684

merged 14 commits into from
Jul 10, 2024

Conversation

kraktus
Copy link
Member

@kraktus kraktus commented Jul 9, 2024

fix #15653

@kraktus kraktus marked this pull request as ready for review July 9, 2024 13:41
@kraktus
Copy link
Member Author

kraktus commented Jul 9, 2024

image image

@kraktus
Copy link
Member Author

kraktus commented Jul 9, 2024

Thanks for the help. Is $set("field" -> none) not unsetting field actually used in the codebase? Since it seems like a footgun when editing field, unlike something like optionA.map: x => $set("field" -> x)

@ornicar
Copy link
Collaborator

ornicar commented Jul 9, 2024

$set("field" -> none) does not set field. It also doesn't unset it, because $set and $unset are distinct mongodb commands.

@ornicar
Copy link
Collaborator

ornicar commented Jul 9, 2024

I think the DELETE button should have a top margin instead of a left margin.

@kraktus
Copy link
Member Author

kraktus commented Jul 9, 2024

$set("field" -> none) does not set field. It also doesn't unset it, because $set and $unset are distinct mongodb commands.

Yeah, but why should we accept option when using $set then? As shown in this PR, it eat the error when trying to unset down the line.

@ornicar
Copy link
Collaborator

ornicar commented Jul 9, 2024

We accept options so that we can set fields depending on whether their values are Some or None. I think it's used in many places of the codebase.

@kraktus
Copy link
Member Author

kraktus commented Jul 9, 2024

I think the DELETE button should have a top margin instead of a left margin.

Agreed, better? The button label is still to the left of the emoji picker, due to the padding inside the button. When hovering over it we see they're actually aligned
image
image

@ornicar ornicar merged commit 2289f59 into lichess-org:master Jul 10, 2024
5 checks passed
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.

Study flairs: how to remove one?
3 participants