pseudoankit / coachmark

A lighweight compose multiplatform libray to create better onboarding experience for users.
Apache License 2.0
125 stars 9 forks source link

min distance from screen not configurable for each tooltip #18

Closed pseudoankit closed 10 months ago

pseudoankit commented 11 months ago

current this value can be passed in Overlay Layout, so it's can't be configured for each individual item as shown in below video, I can't specify the value for any specific tooltip

The idea is to move this to ToolTipConfig

Screen_recording_20231205_092016.webm

glasheen99 commented 11 months ago

I don't understand why the user would want this

pseudoankit commented 11 months ago

that can be a common usecase right eg if an user want to have a offset of 12 for top coachmark but 8 for bottom one, usecase can be anything like there's a button behind and they want to show a poriton of it also always better to give flexibility if we can

glasheen99 commented 11 months ago

But using distance-from-screen-edge as a general way to control tooltip size will give very different results on screens of different sizes, or portrait vs. landscape.

And the user can already avoid hiding other UI elements by using a different setting for placement - top/bottom/start/end.

I did intend to suggest some more direct way to influence tooltip width: setting a max width (to put it simply) so that we can get a reasonably narrow, multiline tooltip instead of a very wide, single-line tooltip (especially for tablets, but maybe also large phones in landscape orientation). But that could probably be a single setting for all tooltips.