Skip to content

Conversation

@georgianaonoleata1904
Copy link
Contributor

Closes #229132

Summary

  • this pr removes the conditional check for displaying the timezone field, ensuring it is always visible on both create and edit Maintenance Window pages, as a timezone is always configured (either Browser or a specific one)
@georgianaonoleata1904 georgianaonoleata1904 self-assigned this Nov 3, 2025
@georgianaonoleata1904 georgianaonoleata1904 requested a review from a team as a code owner November 3, 2025 09:05
@georgianaonoleata1904 georgianaonoleata1904 added bug Fixes for quality problems that affect the customer experience Team:ResponseOps Platform ResponseOps team (formerly the Cases and Alerting teams) t// backport:version Backport to applied version labels v9.3.0 v8.19.7 v9.1.7 v9.2.1 labels Nov 3, 2025
@elasticmachine
Copy link
Contributor

Pinging @elastic/response-ops (Team:ResponseOps)

@georgianaonoleata1904 georgianaonoleata1904 added the release_note:skip Skip the PR/issue when compiling release notes label Nov 3, 2025
const [defaultEndDateValue] = useState<string>(moment().add(30, 'minutes').toISOString());
const [isModalVisible, setIsModalVisible] = useState(false);
const { defaultTimezone, isBrowser } = useDefaultTimezone();
const { defaultTimezone } = useDefaultTimezone();
Copy link
Contributor

Choose a reason for hiding this comment

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

isBrowser comes from a function that is declared in this file and only used here. If that result key is not necessary anymore, we should remove it from the original function, too.

Also, I don't fully understand what isBrowser did in this file. 😅

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed isBrowser from the hook. I think the original intent was to display the timezone only if it's automatically determined from the user's browser. This is the original PR that introduced the timezone field

}

const useDefaultTimezone = () => {
const kibanaTz: string = useUiSetting('dateFormat:tz');
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you please add a test for when kibanaTz is undefined?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done, added the test

@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] Scout Test Run Builder / serverless-security - EUI testing wrapper: EuiDataGrid - data grid, run

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
alerting 88.2KB 88.1KB -96.0B

History

cc @georgianaonoleata1904

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:version Backport to applied version labels bug Fixes for quality problems that affect the customer experience release_note:skip Skip the PR/issue when compiling release notes Team:ResponseOps Platform ResponseOps team (formerly the Cases and Alerting teams) t// v8.19.7 v9.1.7 v9.2.1 v9.3.0

3 participants