Commit Graph

265 Commits

Author SHA1 Message Date
Jonathan Rainville 02d80429d6 fix(@desktop/communities): request to join fixes (#14287) 2024-05-08 16:17:10 -04:00
Lukáš Tinkl dbd3e6dc62 fix: can't join an encrypted community
- fix the corner case and allow the user to join a community without an
explicitely stated "Member" permission
- enable/disable the Share/Join/Save buttons when the permission to join
check is ongoing, or when the permission check failed
- display tooltips over the disabled buttons explaining why it's disabled
- always display the eligibility button floating on top of the
(scrollable) contents

Fixes #14473
Fixes #14299
2024-05-08 14:46:09 -04:00
Lukáš Tinkl 054c5736e3 feat(SharedAddresses): display the eligibility bubble in edit mode too
- previously, we'd display the bubble only when joining the community
- now we display it also when editing the shared addresses, with a
slightly different wording (eg. "You're an admin" -> "You'll be a
member"), hinting the user about the future change
- remove the usage of `ModuleWarning` as we don't want its delay or
transitions here, replace it with a regular red `Rectangle` + text

Fixes #13397
2024-05-08 14:46:09 -04:00
Lukáš Tinkl 74b92dd848 fix(StatusCard): fix some visual glitches
- correct propagation of hover events, fixes card flicker
- improve the ugly thick border
- token icons are now correctly rounded
- fix text descent lines are cut of ("y" and "p" truncated at the
bottom) due to excessive clipping, set correct max line count
- fix tag outline not being visible in dark mode
- add/update the corresponding SB page, with more controls to play
around with the different params

Fixes #14555
2024-05-02 15:08:28 -04:00
Alex Jbanca 6b7256cc13 fix: Hide members count from community cards when the community is encrypted and the community info is not available 2024-05-02 14:43:29 -04:00
Valentina Novgorodtceva 864a676835 chore: add object names for enable create community button and confirm community tags button 2024-05-02 13:08:31 -04:00
Jonathan Rainville 1dfc5de878 chore: disable history archive for new user and add advanced setting
Fixes #14534
2024-05-01 09:18:33 -04:00
Jonathan Rainville e463590a40 chore: hide create community button behind advanced setting
Fixes #14530

(includes a revert of the previous hide that wasn't exactly what we wanted)
2024-04-30 13:18:08 -04:00
Jonathan Rainville e17782102b Revert "chore(CommunitiesPortal): change CreateCommunity to Import from Discord"
This reverts commit 05626a886e.
2024-04-30 13:18:08 -04:00
Jonathan Rainville 05626a886e chore(CommunitiesPortal): change CreateCommunity to Import from Discord 2024-04-25 09:32:38 -04:00
Alexandra Betouni 9cad3db60f feat(ProfileShowcasePopup): Adding interactions in delegates
Closes #13702

(cherry picked from commit 53db09412a)
2024-04-15 10:03:57 -04:00
Alexandra Betouni 29e3e41410 [ProfileShowcase] Updated delegates as per design + added web tab
Closes #13421
Closes #13606
2024-04-15 10:03:57 -04:00
Emil Sawicki b810687049 fix(wallet): Update amount to send decimal handling 2024-04-12 11:28:56 -04:00
Lukáš Tinkl 9d00e82de5 chore(CommunityColumnView): fix typo 2024-04-11 10:39:55 -04:00
Michał Cieślak 2ee103a17c chore(Communities/InDropdown): performance improved
- removed multiple filtering separately for each category
- no instantiation of all delegates up front (regular ListView approach
  used)
- fixed category selection when filtering - selecting/deselecting only
  items fulfilling search criteria
- significant simplification of the code

Closes: #14275
2024-04-11 10:39:55 -04:00
Lukáš Tinkl 90840a486c chore(SharedAddressesPermissionsPanel): optimize the speed
- don't use the expensive `ExpressionFoo` in SFPM, just use
`AnyOf/AllOf` combinations where possible
- in HoldingsSelectionModel, don't call the `getTokenByKey` twice to
construct the `text`, once is enough
- lastly, rewrite the JS helper `PermissionsHelpers.getTokenByKey` to
C++; this method gets called recursively way too often from many places

In the longterm, we should provide a specific C++ transformation model
for SharedAddressesPermissionsPanel to follow the UI requirements more
closely; that way we'd be able to fix the issues here for good

Fixes #14276
2024-04-11 10:39:55 -04:00
Igor Sirotin 1a0bcd104d fix: permissions with value>1000 2024-04-11 10:39:55 -04:00
Lukáš Tinkl 1fc6e1f26b feat(SharedAddressesAccountSelector): update account sorting
- implement sorting of the wallet accounts by the number of tokens (aka tags) and
then by alphabet
- due to the delegate complexity here and usage of nested models, keep
track of the tags count separately and outside of the model
- this will be improved later on as part of the complete sort/order
design described in https://github.com/status-im/status-desktop/issues/14192

Fixes #14101
2024-04-11 10:39:55 -04:00
Lukáš Tinkl c61eeb90ea chore(SharedAddressesPermissionsPanel): use FastExpressionFilter
- speed up the construction of the permissions overview panels
2024-04-11 10:39:55 -04:00
Andrey Bocharnikov 4ce61f7ab1 fix(Permissions): tokenOwner is present in the list of collectibles when adding a permission
fixes #13561
2024-04-11 10:39:55 -04:00
Michał Cieślak e3028ffd28 feat(SharedAddressesAccountSelector): Support for collectibles in account's delegate tags
Closes: #14102
2024-04-11 10:39:55 -04:00
Lukáš Tinkl e044dfcf57 feat: Add missing eligible to join tag in CommunityMembershipSetupDialog
- implement the eligibility check in C++, returning the highest possible
role the user would be allowed to join under
- enable/disable the "Share" button based on the above permissions check
- remove all the locally placed components, access teh popup only via
Global/Popups
- calculate the `accessType` internally based on the permissions present
- update the eligibility as the async check for permissions is finished
- fix the permissions panel background color
- partially revert the share/finish/cancel buttons behavior; it must be
one button due to StatusStackModal limitations
- fix some other minor UI issues or differences to current Figma designs
- adjust SB, add the possibility to play around with different
permission models

Fixes #14100
2024-04-11 10:39:55 -04:00
Sale Djenic e2e72f0b0c fix(communities): keycard authentication marked automatically as authenticated
Closes #14174
2024-04-11 10:39:55 -04:00
Lukáš Tinkl af88cf2ef9 fix(JoinCommunity): Merge issues solved and channel hidden logic fixed
- Removed function in merge while it's still needed.
- Modified logic when channels hidden to take into account also `viewOnly` permission cases.
2024-04-11 10:39:55 -04:00
Noelia 4483eded3c fix(JoinCommunity): Add missing state ONLY private permissions and NOT MET (#14164)
* fix(JoinCommunity): Add missing state ONLY private permissions and NOT MET

- Modified `becomeMemberModel` in store to provide all member permissions.
- Modified permissions model filter to only discard  permissions that are private and NOT met.
- Updated `storybook/PermissionsModel` with new only private permissions and added new model option in corresponding pages.

Closes #14104

* fix(JoinCommunity): Text position when all channels hidden

Updated text position when `allChannelsAreHiddenBecauseNotPermitted` in community join process
2024-04-11 10:39:55 -04:00
Mykhailo Prakhov a68559ba90 fix: set correct permision UI 2024-04-11 10:39:55 -04:00
Lukáš Tinkl 76a76dcf4d fix(Shared Addresses): Requirements check pending indicator
- update shared addresses dialog to avoid small jumps when
selecting/unselecting accounts due to requirements check text displayed
- display the pending text and spinner next to the Permissions header

Fixes #14103
2024-04-11 10:39:55 -04:00
Michał Cieślak e6974f21a3 chore(Communities): CommunityIntroDialog renamed to CommunityMembershipSetupDialog
Closes: #14144
2024-04-11 10:39:55 -04:00
Noelia fa781a9340 fix(JoinCommunity): Join CTA labelling: Change text and remove existing icon
- Change text and remove existing icon.
- Removed unnecessary property `loginType` on different files.
- Renamed signals to be more accurate with existing requirements.

Closes #14098
2024-04-11 10:39:55 -04:00
Lukáš Tinkl 85645ff66d fix: can't use the Tab button in the Mint Token form
- manually setup the TAB focus chain; in the future, this should be done
properly on all new components using FocusScopes and similar

Fixes #13891
2024-04-11 10:39:55 -04:00
Jonathan Rainville 6d78ba83a2
fix(permissions): fix hang when all channel perm check return (#14259)
* fix(permissions): fix hang when all channel perm check return

Fixes #14234

The problem was that we updated **all** the models from **all** the channels of a community each time the channel requirement checks returned.

The fix is to first of all, make sure we don't call that check too often. It sometimes got called twice in a row by accident.

The other better fix is to check if anything actually changed before updating. This solves the issue almost entirely.  Since the permissions almost never change, the updates now take only a second.

* fix(permisisons): never run permission checks for privileged users

Also fixes #14234 but for admins, TMs and Owners.

Admins+ were still getting the hang, because the permission checks always returned something different than the models, because the models knew that admins have access to everything, but the permission check was running as if it were a normal user (I think, un-tested).

Anyway, the solution is more simple, we never need  to run the permission checks on admins+, because they always have access to everything!

* fix(Communities): prevent channels model from emitting unnecessary signals

Closes: #14274

* chore(Communities): improve channels metadata lookup performance

ChannelsSelectionModel is removed, replaced with plain LeftJoinModel.
Transformations of left-side model are done in a single place, not in
every delegate making the join.

* only call update functions when there is something to update + move permission model creation when needed

---------

Co-authored-by: Michał Cieślak <michalcieslak@status.im>
2024-04-03 17:55:33 -04:00
Sale Djenic c864e437aa chore(general): removing unneeded qml file 2024-03-25 13:17:56 -04:00
Sale Djenic 665d1cb949 fix(communities): deltas between designs and build for join token gated community flow
This commit:
- improves selection of addresses to reveal
- keeps the selection state for the popup lifetime
- brings higher granularity in terms of signed requests by keypairs
- meets new requirements from the latest related Figma
- merges edit shared addresses feature and request to join community features
into a single component, cause the flow is logically the same, with the only
difference that when editing revealed addresses we don't show the community
intro screen

Fixes at least points 3 and 4 from #13988
2024-03-25 13:17:56 -04:00
Mykhailo Prakhov a586c6d352
feat(desktop/communities): View community member messages functionality (#14002)
* feat(desktop/communities): View member messages functionality
2024-03-20 11:50:10 +01:00
Mykhailo Prakhov f3d2d0a809
feat(@desktop/community): add new CommunityMemberState - CommunityMemberBanWithAllMessagesDelete (#14028) 2024-03-19 16:17:02 +01:00
Lukáš Tinkl 5eb825cbe3 fix(permissions): Unable to Confirm Changes to Existing Community Permission
- distinguish between `permissionTypeLimitReached` and the new
`permissionTypeLimitExceeded`
- the latter is used to enable/disable the "Save" button when editting
the permissions as we're not going to add a new one (going over the
limit), and to also hide the warning texts

Fixes #13989
2024-03-19 12:22:03 +01:00
Michał Iskierko 9ed38bddb7
13291 hide channels (#13876)
* feat(@desktop/communities): Hide channels if the user is not permitted to view and hideIfPermissionsNotMet is set

Extend chats model with channel permissions info and hideIfPermissionsNotMet.
Visibility of chat item is based on: member roles, channel permissions, hideIfPermissionsNotMet.
If all channels from category are hidden, category item is also hidden.
If all chats in community are hidden, infomration label is displayed.

Issue #13291

* chore(@desktop): Upgrade status-go

Issue #13291
2024-03-18 13:33:07 -04:00
Lukáš Tinkl d25cefcc2e fix(StatusBaseButton): adapt to handle actions when it is disabled
- add an `interactive` property as a drop-in replacement for `enabled`;
the UI looks "disabled" but can still display e.g. a tooltip or some
loading animation
- add the ability to display a tooltip
- remove DisabledTooltipButton and replace it with a regular
`Status(Flat)Button`, using the above new features
- update storybook with the new `interactive` switch

Fixes #10185
2024-03-14 18:00:27 +01:00
Alex Jbanca 4ca7e9b32d fix(DisplayNameValidation): Integrate duplicate display name in joined communities 2024-03-14 09:18:39 +02:00
Jonathan Rainville 634591b69f
feat: hook reactions in read only channel and fix issues (#13913)
* feat: hook reactions in read only channel and fix issues

Fixes #13523

* fix crash and missing emoji popup on group chats

* code review fixes
2024-03-13 15:13:41 -04:00
Alex Jbanca aed1ae77c3 fix(ChannelPopup): Fix channel popup width 2024-03-12 17:08:27 +02:00
Anthony Laibe 115610fcf6 feat(@wallet): unknown token 2024-03-11 11:29:32 +01:00
Alex Jbanca 49aa747fdf feat(ChannelPermissions): Show confirmation dialog before closing the channel edit popup 2024-03-06 14:40:23 +02:00
Mikhail Rogachev 0455832f92
feat: Add `scanCommunitiesMembersForName` endpoint (#13789)
Close #13434
2024-03-01 22:12:19 +03:00
Godfrain Jacques 0a42bd0742
(desktop/fix) Fix Owner token holder representation (#13712)
fix #12065 token owner presentation in Token section by displaying the owner
token holder as contact
2024-02-28 10:02:44 -08:00
Michal Iskierko 3b5d55090d fix(@desktop/permissions): Handle correct values in permissions
Add new field AmountInWeis to token criteria dto.
Keep strings instead of floats in token_criteria_item.
HoldingSelectionModel keeps amount in wei-like units but they are displayed in permissions as floats (divided by decimals).

Issue #11588
2024-02-27 19:33:27 +01:00
Mykhailo Prakhov 996199b910
feat(desktop@communities): change kicked/banned member behavior (#13706)
feat: change kicked/banned member behavior
2024-02-27 12:55:56 +01:00
Noelia 3386ce74e7 feat(ProfileShowcase): Created first info popup
- Created `ProfileShowcaseInfoPopup` component.
- Added storybook support for the new popup component.
- Added new popup into the application flow.
- New property stored in local account settings file.

Closes #13338
2024-02-26 10:08:52 +01:00
Khushboo Mehta 085bf762a5 feat(@desktop/wallet): Update token details view
closes #12373
2024-02-23 13:03:28 +01:00
Mykhailo Prakhov 12569d795f
feat(@desktop/community): allow owner delete all messages during the ban and ban/unban AC notifications (#13653) 2024-02-22 12:01:01 +01:00