kolibri-design-system icon indicating copy to clipboard operation
kolibri-design-system copied to clipboard

Research solution for popovers

Open MisRob opened this issue 1 year ago • 5 comments

Summary

Currently, to achieve popover-like elements

  • we use "popper.js": "1.16.1" under the hood of KTooltip
  • some of the long-time-ago-forked Keen UI components utilize "tippy.js": "4.2.1"

These are quite old versions that blocked some refactoring and proved to be hard to upgrade. We need to either upgrade or replace by another library or native platform APIs, depending on when when we work on this. On that opportunity, it’d be ideal to move towards using a single solution.

This issue tracks current and future use-cases and their requirements, and collects related libraries and native platform APIs. Its goal is to research and decide on next steps.

Use-cases

Requirements

The following are must-haves directly motivated by our use-cases.

  • Satisfies our browserlist
  • a11y-first
  • Performant
  • Can be teleported to a chosen element
  • Integrates well with Vue Composition API
  • Not limited to plain text only, can receive rich HTML content via slot or similar
    • To support Kolibri onboarding flow (Slack thread)
    • Crucial requirement for scalability
  • Can adjust its size and position cleverly
    • For example when rendered close to page’s edges

Related

Libraries

(not evaluated against the requirements yet)

Native APIs

MisRob avatar Aug 22 '24 17:08 MisRob

Current Kolibri Browser Support List:

  • 'Android > 4.4.3',
  • 'Chrome >= 49',
  • 'ChromeAndroid >= 49',
  • 'Edge >= 18',
  • 'Firefox >= 52',
  • 'FirefoxAndroid >= 68',
  • 'iOS >= 9.3',
  • 'Opera >= 67',
  • 'QQAndroid >= 10.4',
  • 'Safari >= 11.1',
  • 'Samsung >= 4',
  • 'UCAndroid >= 12.12',

Floating-UI Browser Support List:

  • Chrome >= 73
  • Firefox >= 78
  • Edge >= 79
  • Safari >= 12.0
  • iOS >= 12.0
  • Opera >= 53

Floating-vue (powered by Floating-UI) Browser Support List:

This package has been renamed from v-tooltip to floating-vue and now uses floating-ui instead of popperjs.

  • Chrome >= 73
  • Firefox >= 78
  • Edge >= 79
  • Safari >= 12.0
  • iOS >= 12.0
  • Opera >= 53

VueTippy (powered by Tippy.js) Browser Support List:

This package is a Vue.js 3 wrapper for Tippy.js All modern browsers are supported. Proxy mobile browsers like Opera Mini are not supported.

LianaHarris360 avatar Sep 16 '24 14:09 LianaHarris360

Thank you @LianaHarris360, very helpful.

MisRob avatar Sep 16 '24 15:09 MisRob

Leaving a note here from the meeting with @LianaHarris360 @marcellamaki @AlexVelezLl regarding on of the use-cases (Kolibri onboarding tutorial) that could be eventually related to this broader issue: Regarding the browsers support, we may go with the progressive enhancement approach for some features or compromise some of the other requirements. More to come as we keep exploring this area in the upcoming months :)

MisRob avatar Sep 16 '24 15:09 MisRob

@MisRob Pls Assign This Issue To Me I Want to work on this issue..

asmit27rai avatar Jan 15 '25 09:01 asmit27rai

Hi @asmit27rai, thanks for volunteering! I'm sorry, this issue is not available. It's best to choose one of the unassigned "help wanted". We keep adding new ones so keep an eye on it regularly!

MisRob avatar Jan 16 '25 15:01 MisRob

Research, proof of concept, and most important decisions are completed https://github.com/learningequality/kolibri-design-system/pull/1114 so I will close. Will be opening issues for final implementations.

MisRob avatar Nov 04 '25 16:11 MisRob