Closed Bug 2070101 Opened 2 months ago Closed 15 days ago

Add Calendar Read Dialog Edit control for editable events

Categories

(Calendar :: Calendar Frontend, task, P3)

task
Points:
2

Tracking

(Not tracked)

RESOLVED FIXED
161 Branch

People

(Reporter: arschmitz, Assigned: vineet)

References

(Blocks 2 open bugs)

Details

Attachments

(1 external file)

Summary:
Add an Edit button to the Calendar Read Dialog. Show it only when the user can
edit the event being shown. Bug 2020692 makes the button open an editor.

Finish setting up the button before showing and positioning the dialog. The
button must not appear late and change the size of an already positioned dialog.

Links:

Acceptance criteria:

  • Put an Edit button in the dialog's action area. Give it a translated name
    and support keyboard and screen-reader access.
  • Show Edit only after the current event has loaded and editing is allowed.
  • Hide Edit while loading, after a load error, when editing is not allowed,
    or when the dialog clears or changes its event.
  • If the dialog switches from event A to event B, a late result for A must not
    show an Edit button for B.
  • Set the button's visibility before the dialog is shown and positioned.
    The button must not change the dialog size after positioning.

Required implementation details:

  • Use canEdit from the current source session supplied by Bug 2061191. A source
    session identifies one request to load an event; its result must match the
    event now shown in the dialog.
  • Render from the initial Redux update when the dialog connects, then from
    later updates through storeObserver. Do not add a getter that reads the store.
  • Selectors read Redux state only. Keep live events, calendar objects, and DOM
    objects outside Redux; store only serializable IDs, values, and data objects.
  • Complete the visibility update before PositionedDialog.show() runs. Keep the
    existing rule that loading and initial rendering finish before positioning.

Minimum test coverage:

  • Check the button's translated accessible name and keyboard access.
  • Check the initial Redux update and later changes to editing permission.
  • Check editable events, non-editable events, loading, load errors, and clearing
    or replacing the event.
  • Load A, switch to B, then finish loading A. Check that A cannot show Edit for B.
  • Check the button state before positioning and that it causes no later growth.
  • Run axe checks on the displayed states where supported.

Out of scope:

  • Opening either editor; Bug 2020692 owns that work.
  • Adding the new-dialog preference or deciding which editor to open.
  • Changing positioning or sizing beyond preserving the existing load-before-show rule.
Blocks: 2020692
Points: --- → 2
Assignee: nobody → martin
Blocks: 2072248
Assignee: martin → vineet
No longer blocks: tb-cal-read-bugs
Type: defect → task
Blocks: 2080883
No longer blocks: 2072248

How to Test

  • Turn on new calendar read dialog
  • Add a calendar that has events that aren't yours
  • Create an event
  • Check if edit button is visible on new event
  • On your local calendar, right click and open properties and check "Read Only" to test edit button visibilty
  • Check edit button is not visible on events you don't own
Attachment #9669254 - Attachment description: WIP: Bug 2070101 - Calendar Read Dialog: Add edit button and show/hide button if event is editable. → Bug 2070101 - Calendar Read Dialog: Add edit button and show/hide button if event is editable. r=#thunderbird-front-end-reviewers
Status: NEW → ASSIGNED
Target Milestone: --- → 161 Branch

Pushed by daniel@thunderbird.net:
https://hg.mozilla.org/comm-central/rev/6690b93ffd4c
Calendar Read Dialog: Add edit button and show/hide button if event is editable. r=tobyp,klamping

Status: ASSIGNED → RESOLVED
Closed: 15 days ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: