Commit Graph

46 Commits

Author SHA1 Message Date
Benoit Marty
035aaf5aa2 Sync strings. 2025-07-09 16:20:47 +02:00
ElementBot
1944004409 Sync Strings from Localazy (#4983)
Co-authored-by: bmarty <3940906+bmarty@users.noreply.github.com>
2025-07-04 14:37:59 +00:00
bmarty
2e8f8ec057 Sync Strings from Localazy 2025-06-30 00:33:54 +00:00
bmarty
e826ed726f Sync Strings from Localazy 2025-06-16 00:31:39 +00:00
Benoit Marty
cfe33df5aa Convert a11y_polls_percent_of_total to plurals 2025-06-13 13:04:24 +02:00
Benoit Marty
9dd0f46926 Improve accessibility of Poll answers. 2025-06-13 10:15:37 +02:00
Benoit Marty
d44f5e563f Replace Material icons with Compound icons wherever it's possible 2025-02-26 22:19:19 +01:00
Benoit Marty
05fc76822a Apply dual licenses: AGPL + Element Commercial to file headers.
2 replace all actions have been performed:
- "SPDX-License-Identifier: AGPL-3.0-only" to "SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial"
- "Please see LICENSE in the repository root for full details." to "Please see LICENSE files in the repository root for full details."
2025-01-07 10:05:04 +01:00
Benoit Marty
2b016227e9 Migrate license to AGPL.
Run script `uv run license-editor --repository ../element-x-android`
2024-09-06 17:19:19 +02:00
ganfra
7b64685777 Pinned events : simplify poll content view 2024-08-30 18:27:19 +02:00
Jorge Martin Espinosa
950e502ca6 Improve screenshot testing with ComposablePreviewScanner (#3125)
* Use ComposablePreviewScanner to rework how screenshot testing works
* Add test sharding
* Update screenshots
* Fixes for Element Gallery

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
Co-authored-by: Benoit Marty <benoit@matrix.org>
2024-07-03 13:05:06 +02:00
Benoit Marty
df1dd6bba5 Rename some fun regarding polls 2024-05-29 12:32:51 +02:00
Benoit Marty
87689d787e Lambda parameters in a composable function should be in present tense, not past tense.
https://mrmans0n.github.io/compose-rules/rules/#naming-parameters-properly
2024-05-29 12:18:23 +02:00
Benoit Marty
0938935d16 Rename Preview to follow code convention 2024-04-19 14:30:45 +02:00
Benoit Marty
69711bf316 Add trophy icon next the the winner vote in polls. 2024-03-26 17:58:31 +01:00
Benoit Marty
cae23f2415 Rename PollAnswerItem.isDisclosed to PollAnswerItem.showVotes for clarity.
Indeed the value is set to true for disclosed poll or if poll is ended.
2024-03-26 17:42:34 +01:00
Benoit Marty
422ff67953 Remove unecessary parenthesis 2024-03-08 22:21:06 +01:00
Benoit Marty
44836cb4d0 PollHistoryView: add UI test. 2024-03-08 17:24:00 +01:00
Jorge Martin Espinosa
973c57d401 Update Compound to v0.0.5 and update icons (#2380)
Update Compound to `v0.0.5`:

- Make sure we fix all the breaking changes.
- Update some icons to use the compound version instead.
-Replace icons with their Compound counterparts when possible.
- Clean up unused icons.
- Fix issues with incorrect icons or sizes being used after replacing the temporary icons with the Compound ones.

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2024-02-12 16:41:58 +00:00
Benoit Marty
72b89338b3 Remove Modifier parameter in private function when only default value is used.
This will improve the code coverage metrics, and this also fixes a few potential bug, where the Modifier was used several times.
2024-02-08 11:06:06 +01:00
renovate[bot]
7e9cda3aa9 Update plugin ktlint to v12.1.0 (#2200)
* Update plugin ktlint to v12.1.0

* Run `./gradlew ktlintFormat` and fix some issues manually.

* Fix other issues reproted by Ktlint

* Limit false positives, KtLint removes unnecessary curly brace in String templates.

* Remove useless Unit

* Minor improvements over ktlint changes

* Restore `AlertDialogContent` behaviour

* Update screenshots

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Benoit Marty <benoit@matrix.org>
Co-authored-by: Jorge Martín <jorgem@element.io>
Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2024-01-10 16:22:24 +01:00
ganfra
79d59eb5de PollHistory : simplify so we only have one Node. Also enrich PollHistoryState. 2023-12-06 19:27:50 +01:00
ganfra
67ec58a4f4 Polls: share logic around PollContent 2023-12-05 14:06:59 +01:00
Marco Romano
61b623041b WIP: Poll History 2023-12-01 09:28:07 +01:00
Jorge Martin Espinosa
a8b85fb4e6 Extract compound tokens and theming to compound-android library (#1888)
* Replace tokens & icons with the external Compound ones

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-11-27 10:30:07 +01:00
jonnyandrew
634d8167ea Allow polls to be edited (#1869)
Polls can be edited if they do not have any votes

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-11-24 16:47:58 +00:00
Marco Romano
202173c8e3 Update poll icons from Compound (#1849)
* Use compound icons for polls

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-11-22 13:35:04 +01:00
Benoit Marty
638186ff5a Progress for LinearProgressIndicator and CircularProgressIndicator are now lambdas. 2023-11-02 14:51:42 +01:00
Marco Romano
295e10e612 Show poll creator view in timeline (#1429)
- Shows edit/end poll buttons when the user is the creator of the poll.
- Only the end poll button is wired right now as there is no "edit poll" screen yet.
2023-09-26 11:19:24 +02:00
Marco Romano
20813deeaa Push TimelineEvents further down the UI tree. (#1424)
So that timeline items don't have to route their callback all the way down to TimelinePresenter.
2023-09-25 15:31:10 +00:00
Benoit Marty
d2ca528679 Detekt: Rename DayNightPreviews to PreviewsDayNight to follow naming convention.
MultiPreview annotations should start with `Previews` as prefix
2023-09-21 08:30:36 +02:00
Benoit Marty
426bb5b622 Remove unused resource, and use compound icons when possible. 2023-09-20 16:45:38 +02:00
Benoit Marty
8fedc40008 Remove VectorIcons object, inline the values. 2023-09-20 16:44:59 +02:00
Marco Romano
44a9da8fbf Make PollContentView a11y friendly
Improves a bit how screen readers read polls in the timeline.
- Adds a few `contentDescription` so that talkback reads “poll” or “ended poll” before the poll question.
- Changes the compose structure of the answers so that they are properly scanned by the screen reader. This meant getting rid of the `IconToggleButton` which was made redundant by the use of the `selectable`.
2023-09-15 09:53:17 +02:00
Marco Romano
c3e595bf4f Set proper progress indicator track color on polls (#1295)
Not yet a semantic color, so hardcoding it.
2023-09-13 11:51:29 +02:00
Marco Romano
aa67dfb17a New icons for Poll and Poll end (#1280)
Now both icons come from our designs and have a consistent size and padding (previously the poll one was coming from the material icons).
2023-09-12 13:35:26 +02:00
Marco Romano
88eda62f56 New icon for "poll end" in both action menu and timeline item. (#1203)
- Also fixes preview of action list (reply is included as it will soon be added).
2023-08-31 15:40:51 +02:00
Marco Romano
14791c3628 Poll vote (#1181)
- Adds sendPollVote rust room API (still not operational, need to wait for a rust sdk release)
- Adds an optional EventId in TimelineItemPollContent
- Wires the poll answer click listeners all the way to the TimelinePresenter in order to call the new room API
- Shows question as message summary in long press menu

Closes https://github.com/vector-im/element-meta/issues/2025
2023-08-30 15:05:11 +00:00
Marco Romano
b4e6d83fb7 "Create poll" UI (#1143)
NB: This is missing analytics, which will be added once https://github.com/matrix-org/matrix-analytics-events/pull/85 is merged.

Closes https://github.com/vector-im/element-meta/issues/2011
2023-08-29 22:31:21 +02:00
Florian Renaud
b39f805da5 Add missing modifier 2023-08-22 16:11:57 +02:00
Florian Renaud
3696cdfe30 Rename previews 2023-08-22 10:55:18 +02:00
Florian Renaud
5ee61a01ad Render ended poll with winning answers 2023-08-22 10:55:18 +02:00
Florian Renaud
cfe8430733 Rename progress variable to percentage 2023-08-22 10:55:18 +02:00
Florian Renaud
91e92a5cc4 Use custom RadioButton 2023-08-22 10:55:17 +02:00
Florian Renaud
00752d851a Update UI for poll in the timeline 2023-08-22 10:55:17 +02:00
Florian Renaud
f2d1658ffa "View only" polls in the timeline (#1031)
* Handle poll events from the sdk

* Render started poll event in the timeline

* Create poll module

* Check poll kind before revealing the results

* Check if user has voted before revealing the results

* Add active poll previews

* Minor cleanup

* Update todos

* Fix CI

* Remove hardcoded string

* Update preview

* changelog file

* Update screenshots

* Use CommonPlurals

* Set poll root view as selectableGroup

* Improve poll result rendering

* Update screenshots

* Add missing showkase processor

* Update screenshots

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-08-16 14:19:12 +00:00