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(releases): timezone selection updates filtering and dateTime display on release overview #7854

Merged
merged 16 commits into from
Nov 21, 2024

Conversation

jordanl17
Copy link
Member

@jordanl17 jordanl17 commented Nov 21, 2024

Description

calendarlocalePR
Above demonstrates that:

  • Selecting a timezone will highlight the correct date as being today in the calendar
  • Will present the dates of releases according to the selected timezone
  • Will filter by date according to those releases within the timezone date
  • Can change the timezone

What to review

Note that useTimeZone and a few other helpers were introduced in ScheduledPublishing and still exist nested in that directory.

As part of a quick follow PR (coming shortly), I'll move these parts that are now shared across content releases and scheduled publishing to a more generic place.

Testing

Updated tests for ReleasesOverview
Added mocks for useTimeZone

Notes for release

N/A

Copy link

vercel bot commented Nov 21, 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 21, 2024 4:55pm
performance-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 21, 2024 4:55pm
test-next-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 21, 2024 4:55pm
test-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 21, 2024 4:55pm
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
studio-workshop ⬜️ Ignored (Inspect) Visit Preview Nov 21, 2024 4:55pm

Copy link
Contributor

No changes to documentation

Copy link
Contributor

github-actions bot commented Nov 21, 2024

Component Testing Report Updated Nov 21, 2024 4:55 PM (UTC)

✅ All Tests Passed -- expand for details
File Status Duration Passed Skipped Failed
comments/CommentInput.spec.tsx ✅ Passed (Inspect) 1m 12s 15 0 0
formBuilder/ArrayInput.spec.tsx ✅ Passed (Inspect) 14s 3 0 0
formBuilder/inputs/PortableText/Annotations.spec.tsx ✅ Passed (Inspect) 39s 6 0 0
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) 27s 6 0 0
formBuilder/inputs/PortableText/DisableFocusAndUnset.spec.tsx ✅ Passed (Inspect) 15s 3 0 0
formBuilder/inputs/PortableText/DragAndDrop.spec.tsx ✅ Passed (Inspect) 3m 0s 0 0 0
formBuilder/inputs/PortableText/FocusTracking.spec.tsx ✅ Passed (Inspect) 1m 8s 15 0 0
formBuilder/inputs/PortableText/Input.spec.tsx ✅ Passed (Inspect) 2m 45s 21 0 0
formBuilder/inputs/PortableText/ObjectBlock.spec.tsx ✅ Passed (Inspect) 1m 44s 18 0 0
formBuilder/inputs/PortableText/PresenceCursors.spec.tsx ✅ Passed (Inspect) 13s 3 9 0
formBuilder/inputs/PortableText/RangeDecoration.spec.tsx ✅ Passed (Inspect) 40s 9 0 0
formBuilder/inputs/PortableText/Styles.spec.tsx ✅ Passed (Inspect) 27s 6 0 0
formBuilder/inputs/PortableText/Toolbar.spec.tsx ✅ Passed (Inspect) 53s 12 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

Copy link
Contributor

github-actions bot commented Nov 21, 2024

⚡️ Editor Performance Report

Updated Thu, 21 Nov 2024 16:58:05 GMT

Benchmark reference
latency of sanity@latest
experiment
latency of this branch
Δ (%)
latency difference
article (title) 16.9 efps (59ms) 12.8 efps (78ms) +19ms (+32.2%) 🔴
article (body) 59.9 efps (17ms) 60.2 efps (17ms) -0ms (-0.6%)
article (string inside object) 18.2 efps (55ms) 13.5 efps (74ms) +19ms (+34.5%) 🔴
article (string inside array) 15.6 efps (64ms) 11.4 efps (88ms) +24ms (+37.5%) 🔴
recipe (name) 30.3 efps (33ms) 20.0 efps (50ms) +17ms (+51.5%) 🔴
recipe (description) 33.3 efps (30ms) 20.8 efps (48ms) +18ms (+60.0%) 🔴
recipe (instructions) 99.9+ efps (7ms) 99.9+ efps (7ms) +0ms (-/-%)
synthetic (title) 14.7 efps (68ms) 5.8 efps (173ms) +105ms (+154.4%) 🔴
synthetic (string inside object) 14.1 efps (71ms) 6.0 efps (166ms) +95ms (+133.8%) 🔴

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) 59ms 62ms 71ms 221ms 467ms 13.6s
article (body) 17ms 19ms 21ms 80ms 112ms 5.4s
article (string inside object) 55ms 57ms 64ms 200ms 251ms 8.4s
article (string inside array) 64ms 69ms 79ms 221ms 740ms 9.1s
recipe (name) 33ms 35ms 68ms 89ms 0ms 8.9s
recipe (description) 30ms 31ms 37ms 135ms 6ms 6.1s
recipe (instructions) 7ms 9ms 11ms 34ms 19ms 3.5s
synthetic (title) 68ms 72ms 78ms 352ms 1482ms 14.5s
synthetic (string inside object) 71ms 79ms 126ms 458ms 1930ms 10.9s

🧪 Experiment result

The performance result of this branch

Benchmark latency p75 p90 p99 blocking time test duration
article (title) 78ms 82ms 119ms 326ms 2761ms 16.0s
article (body) 17ms 18ms 49ms 213ms 426ms 6.3s
article (string inside object) 74ms 80ms 85ms 377ms 2557ms 11.3s
article (string inside array) 88ms 95ms 132ms 270ms 3162ms 12.3s
recipe (name) 50ms 52ms 58ms 92ms 854ms 13.1s
recipe (description) 48ms 51ms 83ms 105ms 832ms 8.2s
recipe (instructions) 7ms 9ms 10ms 90ms 74ms 3.7s
synthetic (title) 173ms 188ms 367ms 850ms 10877ms 29.2s
synthetic (string inside object) 166ms 174ms 188ms 740ms 9704ms 20.9s

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

@jordanl17 jordanl17 marked this pull request as ready for review November 21, 2024 10:47
@jordanl17 jordanl17 requested a review from a team as a code owner November 21, 2024 10:47
@jordanl17 jordanl17 requested review from cngonzalez and RitaDias and removed request for a team and cngonzalez November 21, 2024 10:47
Comment on lines 32 to 34
if (timeZone.abbreviation === localeTimeZoneAbbreviation) return ''

return `(${timeZone.abbreviation})`
Copy link
Contributor

Choose a reason for hiding this comment

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

super small nit but you can always make this be

Suggested change
if (timeZone.abbreviation === localeTimeZoneAbbreviation) return ''
return `(${timeZone.abbreviation})`
return timeZone.abbreviation === localeTimeZoneAbbreviation ? '' : `(${timeZone.abbreviation})`

right?

Copy link
Member Author

Choose a reason for hiding this comment

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

So much nicer, thank you!

import useTimeZone, {getLocalTimeZone} from '../../useTimeZone'

const mockTimeZone: NormalizedTimeZone = {
abbreviation: 'SCT', // Sanity Central Time :)
Copy link
Contributor

Choose a reason for hiding this comment

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

ayyy 8)

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.

Super small nitpick but otherwise looks good!

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