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

fix(core): in release documents rows only show errors count #8628

Merged
merged 1 commit into from
Feb 14, 2025

Conversation

pedrobonamin
Copy link
Contributor

Description

Only show errors for the error count in the release documents row.

Screenshot 2025-02-13 at 15 56 34

What to review

Testing

Open a release in which a document has both error and warnings or info, the document should only account for the number of errors.

Notes for release

n/a

Copy link

vercel bot commented Feb 13, 2025

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 Feb 14, 2025 8:58am
performance-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 14, 2025 8:58am
test-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 14, 2025 8:58am
2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
studio-workshop ⬜️ Ignored (Inspect) Visit Preview Feb 14, 2025 8:58am
test-next-studio ⬜️ Ignored (Inspect) Feb 14, 2025 8:58am

Copy link
Contributor

No changes to documentation

Copy link
Contributor

github-actions bot commented Feb 13, 2025

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 42.68% 54207 / 126991
🔵 Statements 42.68% 54207 / 126991
🔵 Functions 48.06% 2783 / 5790
🔵 Branches 78.96% 10423 / 13200
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/sanity/src/core/releases/tool/detail/documentTable/DocumentTableColumnDefs.tsx 84.9% 82.75% 100% 84.9% 69-74, 185-205
Generated in workflow #30369 for commit 1f463c9 by the Vitest Coverage Report Action

Copy link
Contributor

github-actions bot commented Feb 13, 2025

⚡️ Editor Performance Report

Updated Fri, 14 Feb 2025 08:57:25 GMT

Benchmark reference
latency of sanity@latest
experiment
latency of this branch
Δ (%)
latency difference
article (title) 27.0 efps (37ms) 25.6 efps (39ms) +2ms (+5.4%)
article (body) 78.1 efps (13ms) 72.7 efps (14ms) +1ms (-/-%)
article (string inside object) 29.4 efps (34ms) 26.3 efps (38ms) +4ms (+11.8%)
article (string inside array) 25.6 efps (39ms) 23.0 efps (44ms) +5ms (+11.5%)
recipe (name) 50.0 efps (20ms) 52.6 efps (19ms) -1ms (-5.0%)
recipe (description) 58.8 efps (17ms) 58.8 efps (17ms) +0ms (-/-%)
recipe (instructions) 99.9+ efps (6ms) 99.9+ efps (5ms) -1ms (-/-%)
synthetic (title) 18.5 efps (54ms) 19.6 efps (51ms) -3ms (-5.6%)
synthetic (string inside object) 19.4 efps (52ms) 20.0 efps (50ms) -2ms (-2.9%)

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) 37ms 41ms 46ms 152ms 139ms 10.2s
article (body) 13ms 14ms 16ms 99ms 117ms 4.9s
article (string inside object) 34ms 36ms 40ms 199ms 130ms 6.3s
article (string inside array) 39ms 41ms 44ms 247ms 228ms 6.7s
recipe (name) 20ms 21ms 25ms 38ms 0ms 7.1s
recipe (description) 17ms 19ms 21ms 36ms 0ms 4.5s
recipe (instructions) 6ms 7ms 7ms 10ms 0ms 3.0s
synthetic (title) 54ms 58ms 67ms 362ms 1376ms 20.4s
synthetic (string inside object) 52ms 53ms 59ms 231ms 805ms 8.6s

🧪 Experiment result

The performance result of this branch

Benchmark latency p75 p90 p99 blocking time test duration
article (title) 39ms 44ms 46ms 283ms 165ms 11.7s
article (body) 14ms 18ms 33ms 135ms 419ms 5.5s
article (string inside object) 38ms 40ms 44ms 140ms 121ms 6.8s
article (string inside array) 44ms 46ms 51ms 63ms 337ms 7.4s
recipe (name) 19ms 21ms 22ms 37ms 0ms 7.7s
recipe (description) 17ms 19ms 20ms 59ms 0ms 4.5s
recipe (instructions) 5ms 6ms 7ms 9ms 0ms 3.1s
synthetic (title) 51ms 55ms 66ms 461ms 882ms 12.9s
synthetic (string inside object) 50ms 54ms 60ms 112ms 1044ms 8.5s

📚 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.

Copy link
Contributor

github-actions bot commented Feb 13, 2025

Component Testing Report Updated Feb 14, 2025 10:04 AM (UTC)

❌ Failed Tests (3) -- expand for details
File Status Duration Passed Skipped Failed
comments/CommentInput.spec.tsx ✅ Passed (Inspect) 1m 8s 15 0 0
formBuilder/ArrayInput.spec.tsx ✅ Passed (Inspect) 12s 3 0 0
formBuilder/inputs/PortableText/Annotations.spec.tsx ❌ Failed (Inspect) 2m 35s 3 0 3
formBuilder/inputs/PortableText/copyPaste/CopyPaste.spec.tsx ✅ Passed (Inspect) 52s 11 7 0
formBuilder/inputs/PortableText/copyPaste/CopyPasteFields.spec.tsx ✅ Passed (Inspect) 0s 0 12 0
formBuilder/inputs/PortableText/Decorators.spec.tsx ✅ Passed (Inspect) 26s 6 0 0
formBuilder/inputs/PortableText/DisableFocusAndUnset.spec.tsx ✅ Passed (Inspect) 15s 3 0 0
formBuilder/inputs/PortableText/DragAndDrop.spec.tsx ✅ Passed (Inspect) 27s 6 0 0
formBuilder/inputs/PortableText/FocusTracking.spec.tsx ✅ Passed (Inspect) 1m 7s 15 0 0
formBuilder/inputs/PortableText/Input.spec.tsx ✅ Passed (Inspect) 1m 36s 21 0 0
formBuilder/inputs/PortableText/ObjectBlock.spec.tsx ✅ Passed (Inspect) 2m 3s 21 0 0
formBuilder/inputs/PortableText/PresenceCursors.spec.tsx ✅ Passed (Inspect) 13s 3 9 0
formBuilder/inputs/PortableText/Styles.spec.tsx ✅ Passed (Inspect) 26s 6 0 0
formBuilder/inputs/PortableText/Toolbar.spec.tsx ✅ Passed (Inspect) 1m 43s 21 0 0
formBuilder/tree-editing/TreeEditing.spec.tsx ✅ Passed (Inspect) 0s 0 3 0
formBuilder/tree-editing/TreeEditingNestedObjects.spec.tsx ✅ Passed (Inspect) 0s 0 3 0

@@ -175,7 +175,9 @@ export const getDocumentTableColumnDefs: (
</Flex>
),
cell: ({cellProps, datum}) => {
const validationErrorCount = datum.validation.validation.length
const validationErrorCount = datum.validation.validation.filter(
Copy link
Member

Choose a reason for hiding this comment

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

Q: Do you think we should also add this into ReleaseScheduleButton to only disable schedule and publish for releases that have validation errors and allow warning through?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's a valid concern, but this button is checking for the hasError condition from the validation, so I think it should be fine as we have it.
const hasDocumentValidationErrors = documents.some(({validation}) => validation.hasError)
This is fixing the errors but keeping the warnings and info.

Screenshot 2025-02-13 at 16 37 44

jordanl17
jordanl17 previously approved these changes Feb 13, 2025
Copy link
Member

@jordanl17 jordanl17 left a comment

Choose a reason for hiding this comment

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

One q, but it's extra scope I suppose

Copy link
Contributor

@juice49 juice49 left a comment

Choose a reason for hiding this comment

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

Nice—seems sensible to me.

@pedrobonamin pedrobonamin merged commit 3bb4392 into next Feb 14, 2025
63 checks passed
@pedrobonamin pedrobonamin deleted the sapp-2101 branch February 14, 2025 10:08
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.

3 participants