Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix missing context menu on right click in the community column + tests #6641

Merged
merged 2 commits into from
Jul 27, 2022

Conversation

jrainville
Copy link
Member

@jrainville jrainville commented Jul 25, 2022

Fixes #6609

The menu was lost because it used to be set as part of the ScrollView background, but it got changed to a Flickable as part of the fix to the scrolls being not smooth.
Anyway, background doesn't exist on Flickables, so I removed it and moved the MouseArea to the CommunityColumnView instead.

Second commit adds integration tests

StatusQ PR: status-im/StatusQ#802

@jrainville jrainville requested review from a team, iurimatias, stefandunca and noeliaSD and removed request for a team and iurimatias July 25, 2022 20:31
@jrainville
Copy link
Member Author

@noelia-santos you are the tester for this one

@status-im-auto
Copy link
Member

status-im-auto commented Jul 25, 2022

Jenkins Builds

Click to see older builds (3)
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 5bdedfb #1 2022-07-25 20:40:43 ~8 min macos 📦dmg
✔️ 5bdedfb #1 2022-07-25 20:43:33 ~11 min linux 📦tgz
✔️ 5bdedfb #1 2022-07-25 20:54:23 ~22 min windows 📦exe
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 5c91ec2 #2 2022-07-26 16:37:11 ~9 min macos 📦dmg
✔️ 5c91ec2 #2 2022-07-26 16:37:46 ~10 min linux 📦tgz
✔️ 6f17084 #3 2022-07-27 14:42:25 ~10 min linux 📦tgz
✔️ 6f17084 #3 2022-07-27 14:42:49 ~11 min windows 📦exe
✔️ 6f17084 #3 2022-07-27 14:46:42 ~15 min macos 📦dmg

Copy link
Member

@micieslak micieslak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but 2 small suggestions added

onTriggered: Global.openPopup(createCategoryPopup)
adminPopupMenu.showInviteButton = false
adminPopupMenu.popup()
adminPopupMenu.y = Qt.binding(function () {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could be slightly more concise with the new notation:

                        adminPopupMenu.y = Qt.binding(() =>
                            root.height - adminPopupMenu.height - createChannelOrCategoryBtn.height - 20
                        )

StatusPopupMenu {
property bool showInviteButton: false

id: adminPopupMenu
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please keep id first

Copy link
Contributor

@noeliaSD noeliaSD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Some minor comments that you can decide if you want to address here or in a different discuss it in a different task!

@@ -34,21 +34,23 @@ Feature: Status Desktop community
Scenario Outline: Admin creates a community channel
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some identation issues in the previous examples (User creates a community) scenario


Scenario Outline: Admin edits a community channel
When the user creates a community named myCommunity, with description My community description, intro Community Intro and outro Community Outro
Then the user lands on the community named myCommunity
When the admin creates a community channel named test-channel, with description My description
When the admin creates a community channel named test-channel, with description My description with the method bottom_menu
Then the user lands on the community channel named test-channel
When the admin edits a community channel named <community_channel_name> to the name <new_community_channel_name>
Then the user lands on the community channel named <new_community_channel_name>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm thinking here we can add more validations, maybe in a separated task. I did some of them in the "create group chat" task, so we can take profit of some methods there and test if the toolbar name is the channel expected name, if the chat history title corresponds with the channel name and so on!

@When("the admin creates a community channel named |any|, with description |any|")
def step(context, community_channel_name, community_channel_description):
_statusCommunityScreen.create_community_channel(community_channel_name, community_channel_description)
@When("the admin creates a community channel named |any|, with description |any| with the method |any|")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another comment related to validation.. maybe we can add some validation regarding the admin user.. Can we verify the community channel is created BY THE ADMIN??

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure. Technically, a user could not create a channel, so we can do another test later where a user joins a community and test if they can create a channel (they shouldn't be able to).

def create_community_channel(self, communityChannelName: str, communityChannelDescription: str):
click_obj_by_name(CommunityScreenComponents.COMMUNITY_CREATE_CHANNEL_OR_CAT_BUTTON.value)
def create_community_channel(self, communityChannelName: str, communityChannelDescription: str, method: str):
if (method == "bottom_menu"):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could it make sense to use an enum here instead of a string?

Fixes #6609

The menu was lost because it used to be set as part of the ScrollView background, but it got changed to  a Flickable as part of the fix to the scrolls being not smooth.
Anyway, background doesn't exist on Flickables, so I removed it and moved the MouseArea to the CommunityColumnView instead.
@jrainville jrainville force-pushed the fix/missing-community-context-menu branch from 5c91ec2 to 6f17084 Compare July 27, 2022 14:31
@jrainville jrainville merged commit 3f10da8 into master Jul 27, 2022
@jrainville jrainville deleted the fix/missing-community-context-menu branch July 27, 2022 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Context menu missing + regression test
4 participants