Skip to content
This repository was archived by the owner on Feb 17, 2025. It is now read-only.

Feat: better relative bubble positioning#19

Draft
Termtime wants to merge 17 commits into
Skyost:masterfrom
Termtime:feat/better-relative-bubble-sizing
Draft

Feat: better relative bubble positioning#19
Termtime wants to merge 17 commits into
Skyost:masterfrom
Termtime:feat/better-relative-bubble-sizing

Conversation

@Termtime

@Termtime Termtime commented Oct 14, 2021

Copy link
Copy Markdown
Contributor

Fixes #16
This also supersedes part of the effort that #11 was doing, but I think a bit better, instead of declaring manually by how much you want the container to expand, we just let it automatically use the remainder of the parent's size in the direction that has the most space.

For this I added a new system that allows the expansion of the slide's child beyond the highlighted area, it is heavily assisted by an Align widget (or in the case of the example the SpeechBubble's NipLocation which sets an alignment). And its not possible to center the slide in the highlighted area when you are totally inside one of the quadrants of the screen, the only place where we kinda expand while keeping it centered is when we are not inside only one quadrant (also known as being in the center quadrant of the screen). I added a bunch of private helper functions inside RelativeBubbleSlide

To enable it you must set enableExtraSpace: true when declaring the RelativeBubbleSlide, this way it will be an opt-in change for previous users, and the previous system is still preserved and used by default.

Also modified the example to add showcases of the new system and how it looks.

LMK what you think @Skyost

Also, something that would be a breaking change is that previously that when you set direction: AxisDirection.right it would actually put the bubbleSlide to the left and vice-versa, I have fixed this, so it could break someone's BubbleShowcase, I would suggest moving a major version for the next release.

@Termtime Termtime marked this pull request as draft October 14, 2021 23:46
@Skyost Skyost self-assigned this Oct 24, 2021
@Skyost

Skyost commented Oct 24, 2021

Copy link
Copy Markdown
Owner

LMK what you think @Skyost

Seems like a great idea, thanks for this PR 👍

@Termtime

Copy link
Copy Markdown
Contributor Author

Great! I might finish this in the next week or two, I will tag you when I am done and open for review

@Skyost

Skyost commented Oct 27, 2021

Copy link
Copy Markdown
Owner

Fine 👍

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BubbleShowcase cannot exceed highlighted widget's dimensions

2 participants