Edit poll UX (#2151)

* Add edit poll on room proxy

* Add CreatePollMode

* Add “edit poll” presentation flow

* Add delete poll section

* Inject editing poll

* Add submit action

* Refactor validation logic

* Add edit/delete actions

* Fix bubble timestamp for polls

* Update localisations

* Refactor CreatePoll -> PollForm

* Refactor tests

* Update rust sdk to 0.0.5-november23

* Update confirmation alerts

* Add edit support in TimelineItem menu

* Refactor a11y id

* Cleanup

* Fix failing tests

* Add tests

* Refine isEditable workaround

* Refactor timestamp in TimelineItemBubbledStylerView
This commit is contained in:
Alfonso Grillo
2023-11-23 12:19:15 +01:00
committed by GitHub
parent 5b55ce4e8c
commit 2e4b321ef2
36 changed files with 670 additions and 335 deletions

View File

@@ -45,7 +45,7 @@ enum A11yIdentifiers {
static let migrationScreen = MigrationScreen()
static let notificationSettingsScreen = NotificationSettingsScreen()
static let notificationSettingsEditScreen = NotificationSettingsEditScreen()
static let createPollScreen = CreatePollScreen()
static let pollFormScreen = PollFormScreen()
struct AlertInfo {
let primaryButton = "alert_info-primary_button"
@@ -234,14 +234,13 @@ enum A11yIdentifiers {
let roomTopic = "create_room-room_topic"
}
struct CreatePollScreen {
let question = "create_poll-question"
let create = "create_poll-create"
let addOption = "create_poll-add_option"
let pollKind = "create_poll-kind"
private let optionPrefix = "create_poll-option"
struct PollFormScreen {
let addOption = "poll_form-add_option"
let pollKind = "poll_form-kind"
let question = "poll_form-question"
let submit = "poll_form-submit"
private let optionPrefix = "poll_form-option"
func optionID(_ index: Int) -> String {
"\(optionPrefix)-\(index)"
}