Commit graph

13 commits

Author SHA1 Message Date
Lane Sawyer
6bb0472549
chore(ui): removes dead components and features [#8260 - Tier A] (#8889) 2026-07-10 11:40:35 +02:00
Johannes Millan
994f0522ff
feat(tasks): redesign add-task-bar layout, toggles, note field & a11y (#8812)
* feat(tasks): move add-task-bar toggles into the actions row

The add-to-top/bottom and search toggles used to overlay the input's
top-right corner. They now sit at the start of the actions row (create
mode) and the search info row (search mode), prepended so they scroll
together with the rest of the row, separated by a dashed divider and
sized to match the neighbouring action chips.

A new ng-content slot on add-task-bar-actions lets the parent project
the toggles into the scrollable row; they are still rendered in the
search row when the action bar is not, so search stays toggleable.

* feat(tasks): wrap long add-task-bar titles onto multiple lines

The title field is now an auto-growing textarea (cdkTextareaAutosize) so a
long title wraps into view instead of scrolling off the right edge, which
is especially helpful on narrow screens. It stays single-line in meaning:
Enter still submits and pasted newlines are collapsed to spaces so no line
break ever reaches the task title.

cdkTextareaAutosize sizes the textarea to rows*line-height and ignores its
own padding, so the vertical breathing room lives on a wrapper element and
the field grows a line at a time. matInput is dropped (there is no
mat-form-field here and it broke the autosize height calc).

E2E selectors that targeted the title by the `input` tag now use the
tag-agnostic `.main-input` class.

* feat(tasks): refine add-task-bar toggles, note field and input autosize

- Move the note control from a labeled chip into an icon toggle in the
  left group (search · note · add-to-top/bottom); hidden in search mode.
- Renumber the input shortcuts: Ctrl+1 add-to-bottom, Ctrl+2 search,
  Ctrl+3 note, Ctrl+4-9 the action chips.
- Keep the submit (+) button's space reserved while empty via opacity
  (visibility is re-asserted by mat-icon's anti-FOUC rule, so it stayed
  visible).
- Animate the note field expand/collapse with the shared @expandFade.
- Fix a cdkTextareaAutosize height lag: the directive measures the
  textarea with its horizontal padding stripped but its width unchanged,
  so padding on the textarea made the measured wrap width wider than the
  rendered one and the field grew a few chars after the text had already
  wrapped (clipped line + scrollbar). Keep the title and note textareas
  padding-free and move the gutters to their wrappers so measured and
  rendered wrap widths match.

* feat(tasks): improve add-task-bar a11y, shortcut order and toggle emphasis

- Renumber the input shortcuts to match the on-screen left-to-right order:
  Ctrl+1 search, Ctrl+2 note, Ctrl+3 add-to-top/bottom (chips stay Ctrl+4-9);
  update the shortcut hints embedded in the tooltips accordingly.
- Add aria-label to every icon-only button and aria-pressed to the search
  and note toggles so screen readers announce name and on/off state.
- Take the invisible submit (+) out of the tab order (disabled while empty).
- Guard the note toggle (and its Ctrl+2) to create mode; it is a no-op while
  searching, where the note field does not render.
- Escape now dismisses an open task-suggestion list before closing the bar.
- Un-dim the toggles (0.6 + :focus-visible so keyboard focus isn't faint) and
  give the submit + full-strength primary tint so the mobile CTA reads as the
  primary action.
- Use the edit_note glyph for the note toggle (clearer than a chat bubble).

* refactor(tasks): apply add-task-bar multi-review cleanups

- De-duplicate the tooltip/aria-label expressions with @let (search,
  backlog, add-to-bottom) so the two attributes can never drift.
- Split the Ctrl-shortcut map into local toggles (1-3) and action
  shortcuts (4-9) so stopPropagation derives from structure instead of a
  parallel key array that had to be kept in sync.
- Restore the "note attached" cue: the note toggle carries .has-value
  (undimmed + tinted) when a collapsed note still holds text, distinct
  from the .active pill shown while the note field is open.
- Remove dead code: the vestigial switch-add-to-btn class on the submit
  button, the unused .search-input rule, a stale duplicated SCSS comment,
  and the orphaned NOTE_BUTTON translation key.
- Document that the projected .inline-action-controls styles must stay in
  the parent stylesheet (ng-content keeps the parent's encapsulation).

* feat(tasks): use notes bubble icon and restore expanded note draft

Match the notes icon used across the task feature (task list item,
detail panel, archived-task dialog) instead of the one-off edit_note
glyph. The glyph flips outline -> filled once the note field has text,
mirroring the detail panel's empty / has-notes states.

Also start the note field expanded when reopening the bar with a
persisted draft note, so it is visible rather than hidden behind the
collapsed toggle.

* fix(tasks): repair startup-overlay selector for add-task-bar textarea

The add-task-bar title field became a <textarea class="main-input">, but
StartupOverlayService still queried 'add-task-bar.global input'. A CSS input
type selector does not match a textarea, so on Android cold-start the partial-
text handoff (cursor position + focus) never ran and the overlay cleared only
via the 3s safety timeout. Target .main-input and retype to HTMLTextAreaElement.

Also address multi-review nits on the same branch:
- guard expandNote() in search mode so Ctrl+Enter cannot strand isNoteExpanded
  (mirrors toggleNote()), with a spec covering it
- drop the unused fadeAnimation import and animations entry
- type the inputEl viewChild as ElementRef<HTMLTextAreaElement> (matches noteEl)
- repoint WorkViewPage.addBtn to .e2e-add-task-submit (.switch-add-to-btn now
  belongs to the add-to-backlog toggle)

* test(tasks): clear add-task-bar sessionStorage between component specs

* docs(tasks): update add-task-bar keyboard shortcuts for new Ctrl mapping
2026-07-07 16:26:36 +02:00
Johannes Millan
dbeca43876 test(e2e): fix done-toggle selector to use element instead of class
The done-toggle was refactored from an inline SVG with class="done-toggle"
into a standalone Angular component <done-toggle>. Update all e2e selectors
from '.done-toggle' (class) to 'done-toggle' (element) to match.
2026-03-24 16:25:42 +01:00
Johannes Millan
31480a5fab feat(tasks): replace drag handle with done toggle circle and improve mobile UX
- Replace drag handle with SVG done-toggle circle with checkmark draw-on animation
- Improve mobile UX: cdkDragStartDelay for touch, bottom-sheet context menu
- Move issue/repeat indicators from drag handle to tag-list as chips
- Add isFinishDayEnabled config toggle
- Reorder context menu: add sub task before duplicate, deadline as own entry
- Fix context menu not opening on swipe left
- Fix race condition in done toggle animation timeout
2026-03-22 18:14:16 +01:00
Johannes Millan
4ba9b72597 refactor(e2e): simplify improvements per KISS/YAGNI review
Remove unused speculative abstractions:
- Delete material-helpers.ts (223 lines, zero usages)
- Delete retry-helpers.ts (186 lines, zero usages)
- Revert unused assertion helpers
- Revert unused timeout constants

Keep valuable changes:
- applyPrefix() helper in BasePage (used 4x)
- ProjectPage now uses applyPrefix() for DRY
- Simplified utils/index.ts barrel export
2026-01-06 12:46:20 +01:00
Johannes Millan
b544131921 refactor(e2e): improve 2026-01-06 12:46:20 +01:00
Johannes Millan
eca5fc930f refactor(e2e): improve test infrastructure for easier expansion
- Add all page objects to fixtures (plannerPage, syncPage, tagPage, notePage, sideNavPage)
- Create assertion helpers (expectTaskCount, expectTaskVisible, etc.)
- Enhance CLAUDE.md with patterns, import paths, and all fixtures
- Add const assertion to selectors for better TypeScript support
2026-01-03 18:39:40 +01:00
Johannes Millan
11d85208e5 refactor(e2e): replace waitForTimeout with condition-based waits
- Replace ~100 waitForTimeout calls with proper condition-based waits
- Extract shared utilities for time input and task scheduling
- Add timeout constants for consistent wait times
- Add new selectors for reminder dialogs and detail panels

Files refactored across 25+ test files including:
- Plugin tests (lifecycle, upload, loading, enable, structure)
- Reminder tests (view-task, schedule-page, default-options)
- Work view, planner, focus mode, and app feature tests
- Task dragdrop, autocomplete, and daily summary tests

New utilities created:
- e2e/utils/time-input-helper.ts - Robust time input filling
- e2e/utils/schedule-task-helper.ts - Task scheduling helpers
- e2e/constants/timeouts.ts - Standardized timeout values
2026-01-03 15:29:38 +01:00
Johannes Millan
402fb69a85 feat(e2e): streamline e2e test development with improved infrastructure
Add comprehensive improvements to make e2e test development faster and easier:

1. **New Page Objects** - Reduce code duplication and improve maintainability:
   - task.page.ts: Task operations (get, mark done, edit, subtasks, etc.)
   - settings.page.ts: Settings navigation and plugin management
   - dialog.page.ts: Dialog interactions (save, close, date editing, etc.)
   - All page objects integrated into test.fixture.ts for easy access

2. **Centralized Selectors** - Single source of truth:
   - Expanded constants/selectors.ts with 50+ selectors
   - Organized by category (Navigation, Tasks, Dialogs, Settings, etc.)
   - Makes selector updates easier when UI changes

3. **Comprehensive Documentation** - Complete e2e/README.md guide:
   - Page object usage examples
   - Common test patterns
   - Best practices and anti-patterns
   - Troubleshooting guide
   - Step-by-step instructions for writing new tests

These improvements provide a better foundation for AI-assisted test development
and make it faster to add new e2e tests.
2026-01-03 11:21:40 +01:00
Johannes Millan
ca387ca2bf refactor(e2e): improve test reliability with deterministic waits
- Add waitForStatePersistence utility for sync tests to replace hardcoded delays
- Fix nav-list vs nav-list-tree selector inconsistencies across test files
- Replace waitForTimeout calls with proper element waits and Angular stability checks
- Update selectors.ts constants to use correct nav-list-tree component selector
2025-12-11 18:47:56 +01:00
Johannes Millan
b20f845cb9 test(e2e): make all e2e tests work again and optimize 2025-09-09 23:47:34 +02:00
Johannes Millan
2cc0c02682 feat(sideNav): add new left navigation and integrate 2025-09-06 10:44:11 +02:00
Johannes Millan
9f2c786e41 refactor: move tests 2025-08-02 11:37:25 +02:00