Skip to content

Clean up timezone selector behavior and add back to agenda RH panel#4

Merged
jennifer-richards merged 12 commits into
jennifer/agenda-tz-widgetfrom
jennifer/tix3737
Apr 7, 2022
Merged

Clean up timezone selector behavior and add back to agenda RH panel#4
jennifer-richards merged 12 commits into
jennifer/agenda-tz-widgetfrom
jennifer/tix3737

Conversation

@jennifer-richards

Copy link
Copy Markdown
Collaborator

This addresses ietf-tools#3737 by restoring the timezone selector and display to the RH navigation panel on the agenda page. It additionally cleans up the behavior of the existing selector a bit:

  • keep multiple of the widget instances in sync
  • update select2 widget when tz is changed via radio button

This javascript/html template is reused on the upcoming meetings page. The changes here address ietf-tools#3757 by removing the "Meeting" timezone option from that page.

This builds on changes made in #3, so I've temporarily targeted that branch. Once that is merged, I'll sort out the branching.

  * add "minimal" option to render tz select buttons only
  * move tz-display "onchange" events into timezone.js
  * update timezone.js to handle radio inputs in addition to select
  * render second timezone select widget on the agenda's floating RH panel
Previously, kept the magic word "local" to guess the local timezone,
but this complicates keeping multiple sets of radios in sync. Instead,
replace "local" with guessed timezone name at init time.
It will show until the end of the day, styled to indicate that it is not
functional.

@meadmaker meadmaker left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

My review comments are only first a question and second something that involve a code comment. Publish this whenever you feel ready.

// Copyright The IETF Trust 2021, All Rights Reserved

// Copyright The IETF Trust 2021, All Rights Reserved
/* global moment */

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

What does this do?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

It notifies eslint that 'moment' is a globally defined symbol

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

(though it certainly looks like something that we should all share on Earth Day)

Comment thread ietf/static/js/timezone.js Outdated

// Select timezone to use. Arg is name of a timezone or 'local' to guess local tz.
function use_timezone(newtz) {
// Guess local timezone if necessary

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Seems like this comment should have been deleted along with the following lines that it described.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

yep, thanks

Base automatically changed from jennifer/tix3697 to jennifer/current-agenda-session April 7, 2022 13:19
@jennifer-richards jennifer-richards changed the base branch from jennifer/current-agenda-session to jennifer/agenda-tz-widget April 7, 2022 14:58
@jennifer-richards jennifer-richards marked this pull request as ready for review April 7, 2022 14:59
@jennifer-richards jennifer-richards merged commit b618af2 into jennifer/agenda-tz-widget Apr 7, 2022
@jennifer-richards jennifer-richards deleted the jennifer/tix3737 branch April 7, 2022 15:01
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Jul 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants