Skip to content

feat: data-birb-target attribute, scale cap, sticky note size persistence - #33

Open
daedaevibin wants to merge 1 commit into
IdreesInc:mainfrom
daedaevibin:feat/data-birb-target
Open

feat: data-birb-target attribute, scale cap, sticky note size persistence#33
daedaevibin wants to merge 1 commit into
IdreesInc:mainfrom
daedaevibin:feat/data-birb-target

Conversation

@daedaevibin

Copy link
Copy Markdown

Changes

1. data-birb-target attribute support (addresses #19)

Any element with data-birb-target is 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.

<button data-birb-target>Click me</button>
<div data-birb-target class="card">...</div>

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 ResizeObserver and restored on load, so notes maintain their size across page reloads.


Testing: Verified all three changes in the embed build. The data-birb-target selector works alongside existing img, video, and .birb-sticky-note targets.

- 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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sticky Note size should persist Giant bird problems

1 participant