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

feat: Start in Create button is now enabled by default #7884

Merged
merged 1 commit into from
Nov 26, 2024

Conversation

snorrees
Copy link
Contributor

@snorrees snorrees commented Nov 26, 2024

Description

This PR makes "Start in Create" button enabled by default for pristine, new documents.

For more context, see the original feature PR: #7635

Testing

Feel free to run test-create-integration-studio locally and check that it has a Start in Create button for new documents.

Notes for release

For new documents you will now find a "Start in Create" button in place of "Publish"

image

This allows you to start authoring the document in Sanity Create, by linking a new Create document to the Studio document.

By default any Studio deployed with sanity deploy (on this version or later) will have the button show up in the deployed studio.
For studios hosted with other means, please confer Configuring Content Mapping documentation.

Configure for localhost

To enable "Start in Create" on localhost, you will have to configure beta.create.fallbackStudioOrigin.
This value must exactly match the name shown for a studio deployment in the Sanity project management console, and the studio must have create-manifest.json available.

import { defineConfig } from 'sanity';

export default defineConfig({
  // ...rest of config
  beta: {
    create: {
      startInCreateEnabled: true,
      fallbackStudioOrigin: 'my-cool-project.sanity.studio'
    }
  }
})

Opting out

You can hide the "Start in Create" button by setting beta.create.startInCreateEnabled: false:

import { defineConfig } from 'sanity';

export default defineConfig({
  // ...rest of config
  beta: {
    create: {
      startInCreateEnabled: false,
    }
  }
})

More on Content Mapping

For more details, see our Configuring Content Mapping documentation.

Copy link

vercel bot commented Nov 26, 2024

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

Name Status Preview Comments Updated (UTC)
page-building-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 26, 2024 2:21pm
performance-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 26, 2024 2:21pm
test-next-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 26, 2024 2:21pm
test-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 26, 2024 2:21pm
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
studio-workshop ⬜️ Ignored (Inspect) Nov 26, 2024 2:21pm

Copy link
Contributor

No changes to documentation

Copy link
Contributor

Component Testing Report Updated Nov 26, 2024 2:27 PM (UTC)

❌ Failed Tests (1) -- expand for details
File Status Duration Passed Skipped Failed
comments/CommentInput.spec.tsx ✅ Passed (Inspect) 47s 15 0 0
formBuilder/ArrayInput.spec.tsx ✅ Passed (Inspect) 9s 3 0 0
formBuilder/inputs/PortableText/Annotations.spec.tsx ✅ Passed (Inspect) 31s 6 0 0
formBuilder/inputs/PortableText/copyPaste/CopyPaste.spec.tsx ✅ Passed (Inspect) 40s 11 7 0
formBuilder/inputs/PortableText/copyPaste/CopyPasteFields.spec.tsx ✅ Passed (Inspect) 0s 0 12 0
formBuilder/inputs/PortableText/Decorators.spec.tsx ✅ Passed (Inspect) 19s 6 0 0
formBuilder/inputs/PortableText/DisableFocusAndUnset.spec.tsx ✅ Passed (Inspect) 11s 3 0 0
formBuilder/inputs/PortableText/DragAndDrop.spec.tsx ✅ Passed (Inspect) 2m 5s 2 0 0
formBuilder/inputs/PortableText/FocusTracking.spec.tsx ✅ Passed (Inspect) 48s 15 0 0
formBuilder/inputs/PortableText/Input.spec.tsx ✅ Passed (Inspect) 1m 52s 21 0 0
formBuilder/inputs/PortableText/ObjectBlock.spec.tsx ✅ Passed (Inspect) 1m 21s 18 0 0
formBuilder/inputs/PortableText/PresenceCursors.spec.tsx ✅ Passed (Inspect) 9s 3 9 0
formBuilder/inputs/PortableText/RangeDecoration.spec.tsx ✅ Passed (Inspect) 28s 9 0 0
formBuilder/inputs/PortableText/Styles.spec.tsx ✅ Passed (Inspect) 19s 6 0 0
formBuilder/inputs/PortableText/Toolbar.spec.tsx ❌ Failed (Inspect) 46s 11 0 1
formBuilder/tree-editing/TreeEditing.spec.tsx ✅ Passed (Inspect) 0s 0 3 0
formBuilder/tree-editing/TreeEditingNestedObjects.spec.tsx ✅ Passed (Inspect) 0s 0 3 0

Copy link
Contributor

⚡️ Editor Performance Report

Updated Tue, 26 Nov 2024 14:32:09 GMT

Benchmark reference
latency of sanity@latest
experiment
latency of this branch
Δ (%)
latency difference
article (title) 23.8 efps (42ms) 24.1 efps (42ms) -1ms (-1.2%)
article (body) 59.5 efps (17ms) 63.7 efps (16ms) -1ms (-6.5%)
article (string inside object) 25.6 efps (39ms) 27.0 efps (37ms) -2ms (-5.1%)
article (string inside array) 23.3 efps (43ms) 24.1 efps (42ms) -2ms (-3.5%)
recipe (name) 47.6 efps (21ms) 47.6 efps (21ms) +0ms (-/-%)
recipe (description) 55.6 efps (18ms) 58.8 efps (17ms) -1ms (-5.6%)
recipe (instructions) 99.9+ efps (7ms) 99.9+ efps (6ms) -1ms (-/-%)
synthetic (title) 19.2 efps (52ms) 19.2 efps (52ms) +0ms (-/-%)
synthetic (string inside object) 20.0 efps (50ms) 18.9 efps (53ms) +3ms (+6.0%)

efps — editor "frames per second". The number of updates assumed to be possible within a second.

Derived from input latency. efps = 1000 / input_latency

Detailed information

🏠 Reference result

The performance result of sanity@latest

Benchmark latency p75 p90 p99 blocking time test duration
article (title) 42ms 46ms 55ms 238ms 293ms 11.4s
article (body) 17ms 19ms 32ms 153ms 237ms 5.5s
article (string inside object) 39ms 42ms 50ms 163ms 159ms 7.3s
article (string inside array) 43ms 45ms 52ms 326ms 382ms 7.5s
recipe (name) 21ms 23ms 29ms 42ms 0ms 7.2s
recipe (description) 18ms 19ms 22ms 40ms 0ms 4.6s
recipe (instructions) 7ms 9ms 10ms 11ms 0ms 3.3s
synthetic (title) 52ms 53ms 56ms 111ms 298ms 13.3s
synthetic (string inside object) 50ms 53ms 58ms 504ms 827ms 8.1s

🧪 Experiment result

The performance result of this branch

Benchmark latency p75 p90 p99 blocking time test duration
article (title) 42ms 45ms 66ms 213ms 215ms 11.5s
article (body) 16ms 18ms 21ms 82ms 206ms 5.3s
article (string inside object) 37ms 40ms 51ms 310ms 338ms 7.4s
article (string inside array) 42ms 44ms 50ms 160ms 148ms 6.9s
recipe (name) 21ms 23ms 28ms 40ms 0ms 7.1s
recipe (description) 17ms 19ms 21ms 29ms 0ms 4.5s
recipe (instructions) 6ms 8ms 10ms 28ms 0ms 3.3s
synthetic (title) 52ms 55ms 59ms 63ms 221ms 14.1s
synthetic (string inside object) 53ms 55ms 60ms 312ms 588ms 8.0s

📚 Glossary

column definitions

  • benchmark — the name of the test, e.g. "article", followed by the label of the field being measured, e.g. "(title)".
  • latency — the time between when a key was pressed and when it was rendered. derived from a set of samples. the median (p50) is shown to show the most common latency.
  • p75 — the 75th percentile of the input latency in the test run. 75% of the sampled inputs in this benchmark were processed faster than this value. this provides insight into the upper range of typical performance.
  • p90 — the 90th percentile of the input latency in the test run. 90% of the sampled inputs were faster than this. this metric helps identify slower interactions that occurred less frequently during the benchmark.
  • p99 — the 99th percentile of the input latency in the test run. only 1% of sampled inputs were slower than this. this represents the worst-case scenarios encountered during the benchmark, useful for identifying potential performance outliers.
  • blocking time — the total time during which the main thread was blocked, preventing user input and UI updates. this metric helps identify performance bottlenecks that may cause the interface to feel unresponsive.
  • test duration — how long the test run took to complete.

@snorrees snorrees marked this pull request as ready for review November 26, 2024 14:43
@snorrees snorrees requested a review from a team as a code owner November 26, 2024 14:43
@snorrees snorrees requested review from RitaDias and removed request for a team November 26, 2024 14:43
Copy link
Contributor

@RitaDias RitaDias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LET'S GO! 8)

@snorrees snorrees added this pull request to the merge queue Nov 26, 2024
Merged via the queue into next with commit 3057e2b Nov 26, 2024
58 checks passed
@snorrees snorrees deleted the feat/enable-start-in-create branch November 26, 2024 14:51
snorrees added a commit that referenced this pull request Nov 26, 2024
bjoerge added a commit that referenced this pull request Nov 27, 2024
* next:
  Revert "feat: Start in Create button is now enabled by default (#7884)"
  feat: Start in Create button is now enabled by default (#7884)
RitaDias pushed a commit that referenced this pull request Nov 28, 2024
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.

2 participants