Reactions: Add more button (#1314)

* Add expand/collapse UI for reactions

- Adds a CollapsibleFlowLayout for controlling the layout
- Adds tests for  this layout and some mocks for testing layouts generally
- Improves the rendering of the reaction buttons which were not pixel perfect
- Adds the UI for the expand collapse buttons including the count of hidden items in the collapsed state.

* Add comment for reactionsCollapsed binding.

* Add the add more button and change the layout to be reactions specific and account for the add more button specifics.

* Update CollapsibleReactionLayout.swift

* Rename lines to rows, to hopefully ease the incoming merge.

* Add LayoutValueKey to organise subviews by item type.

- create ReactionLayoutItemType to tag subviews with ReactionLayoutItem
- Add LayoutValueKey support to the layout mocks
- Fix some mistakes in the merge
- Make the test code a bit more DRY
- Make the animation of the addMore and collapse buttons consistent

* Fix naming of the add more button label

* Address comments and fix padding

- Fix typos
- Use pdf/svg for icon
- Fix incorrect padding from a bad merge

* Fix "Add more" button padding to match designs

* Update snapshot test reference images.

* Fix naming, add Preserves Vector Data
This commit is contained in:
David Langley
2023-07-14 17:32:32 +01:00
committed by GitHub
parent a44a60cb0a
commit b31af77686
20 changed files with 415 additions and 141 deletions
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:2536457833f1e02d6526f3cce18bfd89629f715cb28266bbc4c2c4117ea65caa
size 292394
oid sha256:1de36174221c11e943109f468dca4ee795cb8ca90313d7ed9c01814a736f32c1
size 296863
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4f8ff0d944bce8228a6c656d0a4e694be4262237c956545eb02bf4ccefd99524
size 292274
oid sha256:28731b6aa52a65348cdb8f985e9458b8df8a276b467e88fc81be06019072909f
size 296744
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:53bb76fe68c4191683679d2640447f1197ca332c9f6d54baaece8892da4d6e65
size 374657
oid sha256:4d8d79e503071161a1c4f93ddb5eceaa8093a5f03190f67674996a968403b9ac
size 373443
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:295992c13e2831693a810b7034c1ab41cb81f969de802a238e691599f4718950
size 374348
oid sha256:a346d75dabdd2aa5bfffa9864f8f6ea03df2706aaf41b89cc8bbfaef813911c0
size 373150
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c15292dae68fb8d0680fe6dcffba981801016df4e5601a9cb0bcca5748bc7fd9
size 293483
oid sha256:bed1e8ca4a425d95b51012d1f1071a4cae29e52d86b977fc2b4939907a10ed52
size 297947
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:40cf545f40203e7e77231aa44cf43756f00f9a0860c1260b7db13d4a69b6399b
size 293363
oid sha256:1850339aab3fe5dcea8a3208bd2ff6b10bbee1af9f33f79c8346467365d47c1a
size 297828
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:cd9b2eca15f4756abb3865f7488de286ce8e210e61c0e15ac2aa3f1899246964
size 367914
oid sha256:6ed2478dfe1709d4bf89c14e4ef260bfbbb842c03d0cea6d582e2f83d4138aa4
size 365987
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:277ffaa4c038e5e41e0092190c045ce886a757ff6fc478feec7c0ee2c8c5282b
size 367605
oid sha256:4f1675bb9365c8c1f7e13ce74ea8b6c63cafb300ecfc61d73ed6d47358a8a877
size 365694