Page MenuHomePhabricator

Draft: Cache last selected event during ongoing event participation
Open, Needs TriagePublic

Description

Implement a mechanism to remember the last selected event by the user during an ongoing event, so that the same event is pre-selected automatically in future edits made during that same event.

This behavior should apply to both:

  • Source Editor
  • Visual Editor (VE)

The pre-selected value must only apply if:

  • The user is still participating in the same ongoing event
  • The field has not been manually changed before the editor is shown

The confirmation modal (see related task) should also include a checkbox:

"Remember this event for future edits" TBD


Maybe something like: TDB
Use localStorage or mw.storage with event ID as key to persist the last selected value per ongoing event context.


BDD

gherkin
Feature: Pre-fill the event field based on last user selection during ongoing event

  Scenario: User selects an event and chooses to remember it
    Given the user is logged in
    And the user is participating in an ongoing event
    And the user selects an event in the event field
    And the user checks "Remember this event for future edits" TBD
    When the user saves the edit
    Then the selected event ID is stored locally for reuse

  Scenario: User opens a new edit session during the same ongoing event
    Given the user is logged in
    And the user is participating in the same ongoing event
    And the user previously remembered an event ID
    When the edit interface is loaded
    Then the event field is pre-filled with the remembered event ID

  Scenario: User opens a new edit session after the event has ended
    Given the user is no longer participating in the remembered event
    When the edit interface is loaded
    Then the event field is shown
    And the default option "Is this edit related to an event?" TBD is selected