-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat: better relative bubble positioning #19
Draft
Termtime
wants to merge
17
commits into
Skyost:master
Choose a base branch
from
Termtime:feat/better-relative-bubble-sizing
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Feat: better relative bubble positioning #19
Termtime
wants to merge
17
commits into
Skyost:master
from
Termtime:feat/better-relative-bubble-sizing
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Seems like a great idea, thanks for this PR 👍 |
Great! I might finish this in the next week or two, I will tag you when I am done and open for review |
Fine 👍 |
…om/Termtime/BubbleShowcase into feat/better-relative-bubble-sizing
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 RelativeBubbleSlideTo 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.