feat: data-birb-target attribute, scale cap, sticky note size persistence - #33
Open
daedaevibin wants to merge 1 commit into
Open
feat: data-birb-target attribute, scale cap, sticky note size persistence#33daedaevibin wants to merge 1 commit into
daedaevibin wants to merge 1 commit into
Conversation
- Add [data-birb-target] to default focusable elements so site owners can mark buttons, cards, and other elements as valid perch targets (closes IdreesInc#19 partially, addresses sites without prominent images) - Cap birb scale multiplier at 5x to prevent the bird from growing so large it covers the entire UI (closes IdreesInc#25) - Persist sticky note width/height via ResizeObserver so notes maintain their size across page reloads (closes IdreesInc#29)
This file contains hidden or 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
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.
Changes
1.
data-birb-targetattribute support (addresses #19)Any element with
data-birb-targetis now a valid perch target for the bird. This lets site owners make buttons, cards, and other interactive elements bird-friendly without needing<img>tags.2. Cap birb scale at 5x (closes #25)
The scale multiplier is now capped at
Math.min(5, ...)to prevent the bird from growing so large it covers the entire UI and becomes impossible to interact with.3. Persist sticky note size (closes #29)
Sticky note width and height are now saved via
ResizeObserverand restored on load, so notes maintain their size across page reloads.Testing: Verified all three changes in the embed build. The
data-birb-targetselector works alongside existingimg,video, and.birb-sticky-notetargets.