Skip to content

Conversation

@hotzenklotz
Copy link
Member

@hotzenklotz hotzenklotz commented Dec 17, 2025

This PR fixes a bunch of layouting quirks introduced by the antd v6 update. (#9117):

Issues:

  • read-onlyand locked annotation label wraping
Screenshot 2025-12-17 at 10 16 22
  • annotation locked by owner has no margin/spacing right
    Screenshot 2025-12-17 at 09 52 03

  • Fix WK logo spacing in navbar. The margin left should now be smaller

  • A few deprecation warnings of renamed component props

URL of deployed dev instance (used for testing):

  • https://___.webknossos.xyz

Issues:


(Please delete unneeded items, merge only when none are left open)

  • Added changelog entry (create a $PR_NUMBER.md file in unreleased_changes or use ./tools/create-changelog-entry.py)
  • Added migration guide entry if applicable (edit the same file as for the changelog)
  • Updated documentation if applicable
  • Adapted wk-libs python client if relevant API parts change
  • Removed dev-only changes like prints and application.conf edits
  • Considered common edge cases
  • Needs datastore update after deployment

@hotzenklotz hotzenklotz self-assigned this Dec 17, 2025
@hotzenklotz hotzenklotz added frontend css Something frontend styling related labels Dec 17, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 17, 2025

Warning

Rate limit exceeded

@hotzenklotz has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 16 minutes and 17 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between b20cd08 and 9e9c32b.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (4)
  • frontend/javascripts/dashboard/dataset_view.tsx (1 hunks)
  • frontend/javascripts/navbar.tsx (8 hunks)
  • frontend/javascripts/viewer/view/action_bar_view.tsx (1 hunks)
  • package.json (1 hunks)
📝 Walkthrough

Walkthrough

Small frontend changes: Ant Design prop updates (Alert.message→title, Drawer.width→size, destroyOnClose→destroyOnHidden), layout refactors to use AntD Flex/Space, disabled-state UI switched to LinkButton, minor DOM and typing tweaks in dashboard and publication components, and a small stylesheet logo adjustment.

Changes

Cohort / File(s) Summary
Ant Design prop updates
frontend/javascripts/admin/task/task_create_form_view.tsx, frontend/javascripts/viewer/view/ai_jobs/ai_jobs_drawer.tsx
Alert prop changed from messagetitle; Drawer props changed widthsize and destroyOnClose={true}destroyOnHidden.
Layout refactor → Flex/Space
frontend/javascripts/navbar.tsx
Replaced many inline layout wrappers/styles with Ant Design Flex/Space; updated logo rendering and simplified centering/spacing around avatar/tooltip elements.
Disabled-state component swap
frontend/javascripts/dashboard/explorative_annotations_view.tsx
Replaced inline disabled/locked UI with disabled LinkButton components (READ_ONLY_ICON, LockOutlined); removed local disabledColor.
Publication view: search & typing
frontend/javascripts/dashboard/publication_view.tsx
Added Flex for search alignment, updated placeholder text, changed publications typing to APIPublication[], added Props type and updated PublicationView signature/export.
DOM simplification
frontend/javascripts/dashboard/dashboard_task_list_view.tsx
Simplified finished-tasks heading by removing id/className attributes; visible text unchanged.
Stylesheet tweak
frontend/stylesheets/main.less
Removed background-image/padding/float from .ant-layout-header .logo; set explicit width/height and adjusted margin-top.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Inspect frontend/javascripts/navbar.tsx for layout/spacing regressions across breakpoints and avatar/tooltip alignment.
  • Verify Alert header rendering in task_create_form_view.tsx and Drawer open/close lifecycle in ai_jobs_drawer.tsx.
  • Confirm visual and accessibility parity for disabled LinkButton replacements in explorative_annotations_view.tsx.
  • Check publication_view.tsx type/signature change for any downstream call sites.

Possibly related PRs

Suggested reviewers

  • knollengewaechs
  • philippotto

Poem

🐇 I nibbled props and hopped in line,

Swapped message to title, made the drawer fine.
Flex cradled the header, buttons sat polite,
Tiny hops, tidy tweaks — the UI feels light.

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Antd v6 Follow-ups' clearly identifies that this PR addresses follow-up fixes related to the Ant Design v6 update, which aligns with the main purpose described in the PR description.
Description check ✅ Passed The description provides specific details about layout quirks being fixed (annotation label wrapping, spacing issues, navbar logo spacing, and deprecation warnings), directly corresponding to the changes shown in the file summaries.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
frontend/javascripts/navbar.tsx (1)

747-747: Unnecessary Space wrapper around single element.

The Space component here wraps only {content}, which is a single element. Space is designed to add spacing between multiple children. This wrapper could be simplified to just return content directly.

-  return <Space>{content}</Space>;
+  return content;
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between df72b85 and 890ec45.

📒 Files selected for processing (5)
  • frontend/javascripts/admin/task/task_create_form_view.tsx (1 hunks)
  • frontend/javascripts/dashboard/dashboard_task_list_view.tsx (1 hunks)
  • frontend/javascripts/dashboard/explorative_annotations_view.tsx (2 hunks)
  • frontend/javascripts/navbar.tsx (6 hunks)
  • frontend/javascripts/viewer/view/ai_jobs/ai_jobs_drawer.tsx (1 hunks)
🧰 Additional context used
🧠 Learnings (6)
📓 Common learnings
Learnt from: hotzenklotz
Repo: scalableminds/webknossos PR: 9117
File: frontend/javascripts/viewer/view/nml_upload_zone_container.tsx:186-186
Timestamp: 2025-12-04T14:12:26.493Z
Learning: For Ant Design v6 component API documentation and migration guidance, use https://ant.design/llms-full.txt as the authoritative source. This llms-full.txt file contains the official v6 component APIs, including deprecated props and their replacements.
Learnt from: hotzenklotz
Repo: scalableminds/webknossos PR: 9117
File: frontend/javascripts/viewer/view/nml_upload_zone_container.tsx:186-186
Timestamp: 2025-12-04T13:41:44.919Z
Learning: In Ant Design v6, the Alert component's `message` prop has been deprecated and replaced by `title`. When migrating from v5 to v6, Alert components should use `title` for the main content (and optionally `description` for additional details).
Learnt from: hotzenklotz
Repo: scalableminds/webknossos PR: 8849
File: frontend/javascripts/viewer/view/action-bar/ai_job_modals/components/collapsible_split_merger_evaluation_settings.tsx:39-51
Timestamp: 2025-08-14T14:12:03.293Z
Learning: Since Ant Design version 5.18, Form.Item components support the layout prop (layout="horizontal", layout="vertical", layout="inline"), allowing individual form items to override the parent Form's layout setting. This enables mixed layouts within a single form and was added as a new API feature in v5.18 according to the official changelog.
Learnt from: hotzenklotz
Repo: scalableminds/webknossos PR: 8849
File: frontend/javascripts/viewer/view/action-bar/ai_job_modals/components/collapsible_split_merger_evaluation_settings.tsx:39-51
Timestamp: 2025-08-14T14:12:03.293Z
Learning: Since Ant Design version 5.18, Form.Item components support the layout prop (layout="horizontal", layout="vertical", etc.), allowing individual form items to override the parent Form's layout setting. This is a newer API addition that provides more granular control over form item layouts.
📚 Learning: 2025-12-11T15:25:53.526Z
Learnt from: knollengewaechs
Repo: scalableminds/webknossos PR: 9117
File: frontend/javascripts/admin/statistic/time_tracking_overview.tsx:261-279
Timestamp: 2025-12-11T15:25:53.526Z
Learning: Ant Design v6 Select: when using the Select component, consider supplying a prefix prop to render an icon or element before the input for better visual context. Apply this guideline to TS and TSX files across the codebase where Ant Design Select is used; ensure prefix usage is accessible (e.g., provide meaningful aria-label if needed) and avoid unnecessary prefixes on simple inputs.

Applied to files:

  • frontend/javascripts/viewer/view/ai_jobs/ai_jobs_drawer.tsx
  • frontend/javascripts/admin/task/task_create_form_view.tsx
  • frontend/javascripts/dashboard/explorative_annotations_view.tsx
  • frontend/javascripts/dashboard/dashboard_task_list_view.tsx
  • frontend/javascripts/navbar.tsx
📚 Learning: 2025-12-11T15:33:06.880Z
Learnt from: knollengewaechs
Repo: scalableminds/webknossos PR: 9117
File: frontend/javascripts/admin/task/task_search_form.tsx:151-151
Timestamp: 2025-12-11T15:33:06.880Z
Learning: In Ant Design v6, do not use optionFilterProp as a standalone prop on Select. Instead, pass it inside showSearch as optionFilterProp, e.g. showSearch={{ optionFilterProp: 'label' }}. showSearch accepts boolean or an object with keys like optionFilterProp, filterOption, autoClearSearchValue. Update all Select components that use optionFilterProp to adopt the new pattern and adjust types accordingly to maintain compatibility and avoid deprecation warnings.

Applied to files:

  • frontend/javascripts/viewer/view/ai_jobs/ai_jobs_drawer.tsx
  • frontend/javascripts/admin/task/task_create_form_view.tsx
  • frontend/javascripts/dashboard/explorative_annotations_view.tsx
  • frontend/javascripts/dashboard/dashboard_task_list_view.tsx
  • frontend/javascripts/navbar.tsx
📚 Learning: 2025-12-11T15:54:47.778Z
Learnt from: knollengewaechs
Repo: scalableminds/webknossos PR: 9117
File: frontend/javascripts/dashboard/advanced_dataset/dataset_table.tsx:131-134
Timestamp: 2025-12-11T15:54:47.778Z
Learning: In Ant Design v6, Dropdown uses a flat classNames structure: classNames={{ root: '…' }}. Other components (Select, AutoComplete, Cascader, TreeSelect) use a nested structure. The deprecated overlayClassName prop for Dropdown should be replaced with classNames.root. In reviews, flag Dropdown usage that relies on overlayClassName and replace it with classNames={{ root: '…' }}. If you encounter related components, verify the correct classNames shape (flat for Dropdown, nested for others) and update accordingly. This guideline covers TSX files under the frontend codebase where Ant Design components are used.

Applied to files:

  • frontend/javascripts/viewer/view/ai_jobs/ai_jobs_drawer.tsx
  • frontend/javascripts/admin/task/task_create_form_view.tsx
  • frontend/javascripts/dashboard/explorative_annotations_view.tsx
  • frontend/javascripts/dashboard/dashboard_task_list_view.tsx
  • frontend/javascripts/navbar.tsx
📚 Learning: 2025-12-04T13:41:44.919Z
Learnt from: hotzenklotz
Repo: scalableminds/webknossos PR: 9117
File: frontend/javascripts/viewer/view/nml_upload_zone_container.tsx:186-186
Timestamp: 2025-12-04T13:41:44.919Z
Learning: In Ant Design v6, the Alert component's `message` prop has been deprecated and replaced by `title`. When migrating from v5 to v6, Alert components should use `title` for the main content (and optionally `description` for additional details).

Applied to files:

  • frontend/javascripts/admin/task/task_create_form_view.tsx
📚 Learning: 2025-10-21T10:54:16.468Z
Learnt from: knollengewaechs
Repo: scalableminds/webknossos PR: 8961
File: frontend/javascripts/viewer/model/actions/annotation_actions.ts:80-82
Timestamp: 2025-10-21T10:54:16.468Z
Learning: In frontend/javascripts/viewer/model/actions/annotation_actions.ts, the ShowManyBucketUpdatesWarningAction is intentionally not included in the AnnotationActionTypes union because it's a UI-only action that doesn't modify the annotation state through reducers.

Applied to files:

  • frontend/javascripts/dashboard/explorative_annotations_view.tsx
🧬 Code graph analysis (1)
frontend/javascripts/dashboard/explorative_annotations_view.tsx (1)
frontend/javascripts/components/link_button.tsx (1)
  • LinkButton (7-9)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: build-smoketest-push
  • GitHub Check: backend-tests
🔇 Additional comments (6)
frontend/javascripts/dashboard/dashboard_task_list_view.tsx (1)

511-511: LGTM!

The simplified heading element is cleaner and maintains the same visual output.

frontend/javascripts/admin/task/task_create_form_view.tsx (1)

167-172: LGTM!

Correctly migrated from the deprecated message prop to title for Ant Design v6 Alert component. Based on learnings, this aligns with the v6 API where message has been replaced by title.

frontend/javascripts/dashboard/explorative_annotations_view.tsx (1)

627-635: LGTM!

Using disabled LinkButton components for read-only and locked state indicators standardizes the UI and leverages Ant Design's built-in disabled styling instead of custom inline styles.

frontend/javascripts/navbar.tsx (2)

947-949: LGTM!

Good use of Ant Design Flex component to manage trailing navbar items layout with proper alignment and spacing. This replaces inline styles with a cleaner, more maintainable approach.


720-743: LGTM!

The Tag components correctly use variant="outlined" which is the Ant Design v6 approach (replacing the previous bordered prop style).

frontend/javascripts/viewer/view/ai_jobs/ai_jobs_drawer.tsx (1)

58-61: Replace size={1200} with width={1200} for custom Drawer width.

In Ant Design v6, the size prop accepts only preset string values ("default" | "large"). To set a custom pixel width like 1200px, use the width prop instead.

Likely an incorrect or invalid review comment.

Copy link
Contributor

@knollengewaechs knollengewaechs left a comment

Choose a reason for hiding this comment

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

thank you!
I only have one thing: In the old PR I had issues with opening dropdowns, and I discovered that its also true for the AI modal. Can you open it upon click and hover, too?

@knollengewaechs
Copy link
Contributor

knollengewaechs commented Dec 17, 2025

Oh, actually, I found two more things. For non-admins, the navbar has some irregular spacing.
image

Next to that, is it on purpose that the tags for "read-only" and "locked" are not aligned? Or is it not worth the individualized code?
image

both screenshots are from https://followupantdv6.webknossos.xyz/

@hotzenklotz
Copy link
Member Author

Thanks for the thorough review. I fixed the width of the "read-only" icon.

For non-admins, the navbar has some irregular spacing.

Hmm, I am not sure I follow. Perhaps you can show me. Image with some drawing or in person?

@knollengewaechs
Copy link
Contributor

Hmm, I am not sure I follow. Perhaps you can show me. Image with some drawing or in person?

image

In the picture, the space between icon and text is smaller for "Time Tracking" than for "Dashboard" and "Analysis". Do you see what I mean? Its only true if a user is neither admin nor manager

@hotzenklotz
Copy link
Member Author

@knollengewaechs I found the missing margin and fixed it. I guess this has been like this for a while now. Well spotted.

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

Labels

css Something frontend styling related frontend

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants