Skip to content

feat: remove naive ui#2240

Open
artem-harbour wants to merge 1 commit intomainfrom
artem/naive-ui
Open

feat: remove naive ui#2240
artem-harbour wants to merge 1 commit intomainfrom
artem/naive-ui

Conversation

@artem-harbour
Copy link
Contributor

@artem-harbour artem-harbour commented Mar 2, 2026

Linear: SD-1190

  • Removed naive ui from the codebase.
  • Created necessary components for replacing naive ui components.
  • The toolbar and comment dropdowns separated for easier migration, as they have different contracts.
  • The required contract for toolbar dropdown (naive ui contract) has been preserved to avoid major refactoring.
  • Similar styles and animations (as in naive ui) for toolbar dropdowns and tooltips have been preserved.

@artem-harbour artem-harbour added the don't merge Don't merge yet label Mar 2, 2026
@artem-harbour artem-harbour self-assigned this Mar 2, 2026
@artem-harbour artem-harbour force-pushed the artem/naive-ui branch 8 times, most recently from ae7f38a to c953994 Compare March 3, 2026 17:34
@artem-harbour artem-harbour changed the title [WIP] feat: remove naive ui feat: remove naive ui Mar 3, 2026
@artem-harbour artem-harbour added ready for review and removed don't merge Don't merge yet labels Mar 3, 2026
@artem-harbour artem-harbour marked this pull request as ready for review March 3, 2026 17:49
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c9539949f5

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@artem-harbour artem-harbour requested a review from tupizz March 3, 2026 18:02
Copy link
Contributor

@caio-pizzol caio-pizzol left a comment

Choose a reason for hiding this comment

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

@artem-harbour clean removal of naive-ui, nice work.

one bug: the overflow menu ("...") can't be closed by clicking outside or pressing Escape — only by clicking it again. see inline comment.

one small edge case on CommentsDropdown — also inline.

tests look good. left a few inline comments.

@artem-harbour artem-harbour force-pushed the artem/naive-ui branch 2 times, most recently from c1caed9 to 07fa9d9 Compare March 3, 2026 22:42
Copy link
Contributor

@caio-pizzol caio-pizzol left a comment

Choose a reason for hiding this comment

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

@artem-harbour all five threads from last round are fixed, nice.

two small things still open — the file load error is now invisible to users, and dropdown menus don't close when clicking SVG icons. left inline comments.

also flagged the checkbox placeholder and a couple cleanup items. nothing blocking if the checkbox editing path is unused.

test coverage: the behavior spec is solid. ToolbarDropdown and CommentsDropdown could use unit tests for disabled state and option gating, but that's not blocking.

Copy link
Collaborator

@harbournick harbournick left a comment

Choose a reason for hiding this comment

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

Nice work @artem-harbour! Really clean. The one thing I noticed is that we used to be able to navigate dropdowns with the keyboard up/down arrows (seems to work in linked styles, but not in the others) and also select something just with 'enter'. This is important navigation functionality to retain. Otherwise looks great to me!

Copy link
Contributor

@caio-pizzol caio-pizzol left a comment

Choose a reason for hiding this comment

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

@artem-harbour the high-contrast dropdown styles got removed with naive-ui but weren't replaced — worth adding or tracking as a follow-up.

also flagged the dropdown copy-paste and a dead code branch — not blocking.

tests: click behavior is well covered. keyboard nav, CommentsDropdown, and the focus whitelist in PresentationEditor could use tests as a follow-up.

left a few inline comments.

placement="bottom-start"
class="toolbar-button toolbar-dropdown sd-editor-toolbar-dropdown"
class="toolbar-button sd-editor-toolbar-dropdown"
:class="{ 'high-contrast': isHighContrastMode }"
Copy link
Contributor

Choose a reason for hiding this comment

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

the high-contrast class is still applied but the new dropdown has no styles for it. the old black-background-on-hover rules were removed with naive-ui and not replaced. high-contrast users now see the same light gray as everyone else. worth adding matching styles for the new dropdown?

@@ -0,0 +1,465 @@
<script setup>
Copy link
Contributor

Choose a reason for hiding this comment

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

ToolbarDropdown and CommentsDropdown copy-paste the same open/close/position/click-outside logic (~60 lines). worth pulling into a shared helper so bug fixes only happen once?

const isSeparator = (item) => item.type === 'separator';
const isOverflow = (item) => item.type === 'overflow';

const getExpanded = (item) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

item.expand is always a ref — the plain-value branch here never runs. safe to just use item.expand.value directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants