refactor: improved selector ui#206
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Consolidates the task-type badge/dropdown into one reusable
TaskTypeSelectorcomponent, replacing five near-identical Popover/DropdownMenu implementations duplicated across the task list, board, properties panel, and subtask views. Also bringsview-settings-panel.tsx's native<select>dropdowns in line with the rest of the app's selector styling.task-type-selector.tsx(new) — shared badge + dropdown for picking a task's type, with a read-only badge mode for non-editable contexts.task-row.tsx,add-task-row.tsx,properties-panel.tsx, andsubtask-row.tsxnow renderTaskTypeSelectorinstead of their own inline popover markup.add-task-row.tsxgainslabel/placeholderprops sosubtasks-section.tsxcan reuse it for "Add subtask" instead of a bespoke inline form, removing ~100 lines of duplicated state and markup.view-settings-panel.tsx'sDynamicSelectand the "Sort by" control now use a Popover-based dropdown with a checkmark for the selected option, instead of a native<select>, matching the styling used everywhere else.w-16→w-28) to fit the new badge.Net effect: -140 lines, no functional changes besides the
<select>→ custom-dropdown swap in view settings.