Skip to content

fix(StatusPopupMenu): Refactoring #8341

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

Merged
merged 1 commit into from
Nov 22, 2022
Merged

Conversation

igor-sirotin
Copy link
Contributor

@igor-sirotin igor-sirotin commented Nov 21, 2022

Part of #7232
As continuation of status-im/StatusQ#894.

⚠️ NOTE:
This is a PR to a temporary branch fix/status-menu
After this PR is merged, I will update and test the main application. And create a PR to master.

  1. All Menu components are refactored.
  2. Some UI improvements made:
    • Highlight menu when submenu opened
    • Proper colors for disabled menu items
  3. I'm also planning to rename the components as following in a separate PR after testing with status-desktop
Old name New name
StatusPopupMenu StatusMenu
StatusMenuItem StatusAction
StatusMenuItemDelegate StatusMenuItem

StatusQ checklist

  • add documentation if necessary (new component, new feature)
  • update sandbox app
    • in case of new component, add new component page
    • in case of new features, add variation to existing component page
    • nice to have: add it to the demo application as well
  • test changes in both light and dark theme?

Screenshot of functionality (including design for comparison)

  • I've checked the design and this PR matches it
2022-11-21.11.44.28.mov

@status-im-auto
Copy link
Member

status-im-auto commented Nov 21, 2022

Jenkins Builds

Commit #️⃣ Finished (UTC) Duration Platform Result
⁉️ dc3ea0e #1 2022-11-21 09:08:14 ~4 min imports 📄log
✔️ dc3ea0e #1 2022-11-21 09:08:29 ~4 min linux-cpp 📦pkg
dc3ea0e #1 2022-11-21 09:12:40 ~8 min e2e 📄log
✔️ dc3ea0e #1 2022-11-21 09:13:54 ~10 min macos 📦dmg
✔️ dc3ea0e #1 2022-11-21 09:15:57 ~12 min linux 📦tgz
✔️ dc3ea0e #1 2022-11-21 09:31:04 ~27 min windows 📦exe
✔️ 426ecf9 #2 2022-11-21 16:35:51 ~4 min linux-cpp 📦pkg
⁉️ 426ecf9 #2 2022-11-21 16:37:26 ~6 min imports 📄log
✔️ 426ecf9 #2 2022-11-21 16:44:19 ~13 min linux 📦tgz
✔️ 426ecf9 #2 2022-11-21 16:50:02 ~18 min macos 📦dmg
✔️ 426ecf9 #2 2022-11-21 17:12:29 ~41 min windows 📦exe
426ecf9 #2 2022-11-21 17:44:02 ~8 min e2e 📄log

Copy link
Member

@caybro caybro left a comment

Choose a reason for hiding this comment

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

Code looks good, just some minor nits

Copy link
Contributor

@osmaczko osmaczko left a comment

Choose a reason for hiding this comment

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

Nice delegate simplification 👍 left some comments

closePolicy: Popup.CloseOnPressOutside | Popup.CloseOnEscape
topPadding: 8
bottomPadding: 8
bottomMargin: 16

property int menuItemCount: 0
property var subMenuItemIcons: []
property StatusAssetSettings assetSettings: StatusAssetSettings {
Copy link
Contributor

Choose a reason for hiding this comment

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

IMO it doesn't belong here. It should be defined by the delegate.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's here for nested menus (which is possible with QML):
image

color: "transparent"
}

property StatusFontSettings fontSettings: StatusFontSettings {}
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as above.

@igor-sirotin igor-sirotin merged commit e471144 into fix/status-menu Nov 22, 2022
@igor-sirotin igor-sirotin deleted the fix/issue-7232 branch November 22, 2022 07:09
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.

4 participants