Skip to content
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

Stickies: release candidate #3249

Merged
merged 122 commits into from
Apr 14, 2024
Merged

Stickies: release candidate #3249

merged 122 commits into from
Apr 14, 2024

Conversation

steveruizok
Copy link
Collaborator

@steveruizok steveruizok commented Mar 24, 2024

This PR is the target for the stickies PRs that are moving forward. It should collect changes.

  • New icon
  • Improved shadows
  • Shadow LOD
  • New colors / theme options
  • Shrink text size to avoid word breaks on the x axis
  • Hide indicator whilst typing (reverted)
  • Adjacent note positions
    • buttons / clone handles
    • position helpers for creating / translating (pits)
    • keyboard shortcuts: (Tab, Shift+tab (RTL aware), Cmd-Enter, Shift+Cmd+enter)
    • multiple shape translating
  • Text editing
    • Edit on type (feature flagged)
    • click goes in correct place
  • Notes as parents (reverted)
  • Update colors
  • Update SVG appearance

Change Type

  • sdk — Changes the tldraw SDK
  • feature — New feature

Test Plan

Todo: fold in test plans for child PRs

Unit tests:

  • Shrink text size to avoid word breaks on the x axis
  • Adjacent notes
    • buttons (clone handles)
    • position helpers (pits)
    • keyboard shortcuts: (Tab, Shift+tab (RTL aware), Cmd-Enter, Shift+Cmd+enter)
  • Text editing
    • Edit on type
    • click goes in correct place

Release Notes

  • Improves sticky notes (see list)

@huppy-bot huppy-bot bot added feature New feature sdk Affects the tldraw sdk labels Mar 24, 2024
Copy link

vercel bot commented Mar 24, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
examples ✅ Ready (Inspect) Visit Preview Apr 14, 2024 6:37pm
1 Ignored Deployment
Name Status Preview Updated (UTC)
tldraw-docs ⬜️ Ignored (Inspect) Visit Preview Apr 14, 2024 6:37pm

This PR adds a new Sticky icon:

<img width="548" alt="image"
src="https://github.com/tldraw/tldraw/assets/23072548/cd72e23d-b2c0-427f-a3dc-54cef09f0bda">

### Change Type

- [x] `improvement`

---------

Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
This PR:
- adds slightly randomized transformed shadows to sticky notes
- removes the border from sticky notes
- tightens up the border radius for notes

<img width="1363" alt="image"
src="https://github.com/tldraw/tldraw/assets/23072548/6ffc8c76-82ef-45af-9f04-6fb3b8af32db">

<img width="1588" alt="image"
src="https://github.com/tldraw/tldraw/assets/23072548/c2172ed4-748d-4957-972e-f80be62685cd">


### Change Type

<!-- ❗ Please select a 'Scope' label ❗️ -->

- [x] `sdk` — Changes the tldraw SDK
- [ ] `dotcom` — Changes the tldraw.com web app
- [ ] `docs` — Changes to the documentation, examples, or templates.
- [ ] `vs code` — Changes to the vscode plugin
- [ ] `internal` — Does not affect user-facing stuff

<!-- ❗ Please select a 'Type' label ❗️ -->

- [ ] `bugfix` — Bug fix
- [ ] `feature` — New feature
- [x] `improvement` — Improving existing features
- [ ] `chore` — Updating dependencies, other boring stuff
- [ ] `galaxy brain` — Architectural changes
- [ ] `tests` — Changes to any test code
- [ ] `tools` — Changes to infrastructure, CI, internal scripts,
debugging tools, etc.
- [ ] `dunno` — I don't know

### Release Notes

- Adds sticky note shadows
The gif shows it all. This is a further iteration on
https://github.com/tldraw/tldraw/pull/3142/files
This doesn't mean that we necessarily want to keep the `growY` property.
It just shows that we can sometimes rely on the CSS `overflow-wrap`
property and sometimes we can try to actively avoid where it makes
sense.

I put a lower size limit of 12 but I think I'm open to having a higher
one, maybe 14? Hard to say.

- [x] SVG export
- [x] Check previous text wrapping PRs for a text torture file
- [x] Tests


https://github.com/tldraw/tldraw/assets/469604/352b2721-b2e7-40ec-bb19-46e0bd607e1c

### Change Type

<!-- ❗ Please select a 'Scope' label ❗️ -->

- [x] `sdk` — Changes the tldraw SDK
- [ ] `dotcom` — Changes the tldraw.com web app
- [ ] `docs` — Changes to the documentation, examples, or templates.
- [ ] `vs code` — Changes to the vscode plugin
- [ ] `internal` — Does not affect user-facing stuff

<!-- ❗ Please select a 'Type' label ❗️ -->

- [ ] `bugfix` — Bug fix
- [ ] `feature` — New feature
- [x] `improvement` — Improving existing features
- [ ] `chore` — Updating dependencies, other boring stuff
- [ ] `galaxy brain` — Architectural changes
- [ ] `tests` — Changes to any test code
- [ ] `tools` — Changes to infrastructure, CI, internal scripts,
debugging tools, etc.
- [ ] `dunno` — I don't know


### Test Plan

1. Add a step-by-step description of how to test your PR here.
2.

- [ ] Unit Tests
- [ ] End to end tests

### Release Notes

- Add a brief release note for your PR here.
Breakout from #2953
Auto-edit a shape upon keystroke. Related to this change is that we
shouldn't do the selection of all text when editing (and it would
conflict currently with this behavior, or at least we'd have to special
case). In any case, I would argue that it's odd and doesn't feel like
the right move — this PR updates it so that it puts the cursor at the
end of the text which to me feels better or more expected.

### Change Type

- [x] `patch` — Bug fix

### Release Notes

- Sticky note: auto-edit on keystroke.
This reverts commit b211874.
@steveruizok
Copy link
Collaborator Author

Research PRs:

@steveruizok steveruizok added this pull request to the merge queue Apr 14, 2024
Merged via the queue into main with commit 41601ac Apr 14, 2024
10 checks passed
@steveruizok steveruizok deleted the stickies-rc branch April 14, 2024 18:43
@mimecuvalo mimecuvalo restored the stickies-rc branch April 16, 2024 15:44
@mimecuvalo
Copy link
Member

(fyi i brought back the stickies-rc branch - i needed to bisect on some stuff)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature sdk Affects the tldraw sdk
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants