Skip to content

["floating" feature branch] Add useKFloatingPosition#1240

Merged
MisRob merged 4 commits into
learningequality:floating-productionfrom
MisRob:floating-production-01
Apr 23, 2026
Merged

["floating" feature branch] Add useKFloatingPosition#1240
MisRob merged 4 commits into
learningequality:floating-productionfrom
MisRob:floating-production-01

Conversation

@MisRob

@MisRob MisRob commented Apr 21, 2026

Copy link
Copy Markdown
Member

Description

The first PR in the series that aims to prepare selected parts of #1114 for production environment. Targets floating-production feature branch. The next PR will be for useKFloatingInteraction.

Adds useKFloatingPosition composable with new documentation pages

Note that Floating UI may be replaced by Popper, depending on results of browser testing in Kolibri & dev discussion (the structure of the composable and documentation will be the same for both, except few differences).

Issue addressed

Part of #1158

Changelog

Skipped. Will prepare the changelog before merging the feature branch to develop.

AI usage

I used Claude for draft and then further assistance when iterating on it. There's not a place that I wouldn't tweak or see ;) Also self-reviewed the final diff fully.

@MisRob
MisRob force-pushed the floating-production-01 branch from ec3d54e to 20a704e Compare April 21, 2026 18:48
@MisRob
MisRob marked this pull request as ready for review April 21, 2026 18:48
@MisRob
MisRob requested a review from rtibblesbot April 21, 2026 18:56
@MisRob MisRob added the TODO: needs review Waiting for review label Apr 21, 2026
@rtibbles rtibbles self-assigned this Apr 21, 2026

@rtibblesbot rtibblesbot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Clean, focused addition of useKFloatingPosition with solid documentation.

CI passing. Verified the three new/updated docs pages (useKFloatingPosition, floatingelements, browsersupport) and the interactive tooltip example against the Netlify preview — all render correctly, the DocsWarning component is visually consistent, and the tooltip example works as expected. No design spec to compare against; color-contrast and html-lang a11y violations are pre-existing site-wide issues.

  • suggestion: missing .catch() on the computePosition promise — see inline
  • suggestion: test mock resolves with {} but no assertion covers the style update — see inline
  • nitpick: partial mock leaves middleware exports undefined — see inline
  • praise: defensive cleanup before re-init, verified by tests — see inline

@rtibblesbot's comments are generated by an LLM, and should be evaluated accordingly

How was this generated?

Reviewed the pull request diff checking for:

  • Correctness: bugs, edge cases, undocumented behavior, resource leaks, hardcoded values
  • Design: unnecessary complexity, naming, readability, comment accuracy, redundant state
  • Architecture: duplicated concerns, minimal interfaces, composition over inheritance
  • Testing: behavior-based assertions, mocks only at hard boundaries, accurate coverage
  • Completeness: missing dependencies, unupdated usages, i18n, accessibility, security
  • Principles: DRY (same reason to change), SRP, Rule of Three (no premature abstraction)
  • Checked CI status and linked issue acceptance criteria
  • For UI changes: inspected screenshots for layout, visual completeness, and consistency

Comment thread lib/composables/useKFloatingPosition/index.js Outdated
Comment thread lib/composables/useKFloatingPosition/__tests__/index.spec.js Outdated
Comment thread lib/composables/useKFloatingPosition/__tests__/index.spec.js
Comment thread lib/composables/useKFloatingPosition/index.js

@rtibbles rtibbles left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

All changes make sense to me.

@MisRob
MisRob merged commit 1384266 into learningequality:floating-production Apr 23, 2026
6 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

TODO: needs review Waiting for review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants