Skip to content

fix(StatusSearchLocationMenu): Refactor using new StatusPopupMenu #8436

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 28, 2022

Conversation

igor-sirotin
Copy link
Contributor

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

Part of #7232
As continuation of #8341

What does the PR do

  • Refactor StatusSearchLocationMenu
  • Added ringSettings
  • Refactored StatusMenuItemDelegate to use StatusSmartIdenticon
  • Removed StatusSpellcheckingMenuItems as unused
  • Introduce StatusMenuInstantiator for creating menu elements from a model

⚠️ NOTE:
This is a PR to a temporary branch fix/status-menu
I'm publishing changes one by one to make the code review process easier

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)

Снимок экрана 2022-11-24 в 16 11 07

image

Снимок экрана 2022-11-24 в 16 11 10

Снимок экрана 2022-11-24 в 16 11 13

Снимок экрана 2022-11-24 в 16 11 16

@igor-sirotin igor-sirotin marked this pull request as draft November 24, 2022 13:23
@status-im-auto
Copy link
Member

status-im-auto commented Nov 24, 2022

Jenkins Builds

Click to see older builds (15)
Commit #️⃣ Finished (UTC) Duration Platform Result
1c2b33e #1 2022-11-24 13:25:03 ~4 min imports 📄log
✔️ 1c2b33e #1 2022-11-24 13:26:09 ~6 min linux-cpp 📄log
1c2b33e #1 2022-11-24 13:26:44 ~6 min macos 📄log
1c2b33e #1 2022-11-24 13:26:56 ~6 min linux 📄log
1c2b33e #1 2022-11-24 13:36:43 ~16 min windows 📄log
✔️ 364141b #2 2022-11-24 14:24:37 ~5 min linux-cpp 📄log
364141b #2 2022-11-24 14:25:12 ~5 min macos 📄log
⁉️ 364141b #2 2022-11-24 14:25:25 ~5 min imports 📄log
364141b #2 2022-11-24 14:26:15 ~6 min linux 📄log
364141b #2 2022-11-24 14:30:41 ~11 min windows 📄log
09e90b1 #3 2022-11-24 16:32:52 ~4 min linux 📄log
⁉️ 09e90b1 #3 2022-11-24 16:33:05 ~4 min imports 📄log
✔️ 09e90b1 #3 2022-11-24 16:33:41 ~5 min linux-cpp 📄log
09e90b1 #3 2022-11-24 16:40:45 ~12 min windows 📄log
09e90b1 #3 2022-11-24 16:42:10 ~13 min macos 📄log
Commit #️⃣ Finished (UTC) Duration Platform Result
d9d0764 #4 2022-11-24 21:15:16 ~3 min macos 📄log
✔️ d9d0764 #4 2022-11-24 21:15:40 ~4 min linux-cpp 📄log
f931d96 #5 2022-11-24 21:18:58 ~3 min macos 📄log
✔️ f931d96 #5 2022-11-24 21:19:31 ~3 min linux-cpp 📄log
⁉️ f931d96 #5 2022-11-24 21:20:06 ~4 min imports 📄log
f931d96 #5 2022-11-24 21:24:11 ~8 min linux 📄log
f931d96 #5 2022-11-24 21:36:58 ~21 min windows 📄log

@igor-sirotin igor-sirotin force-pushed the fix/7232-serach-location-menu branch from 1c2b33e to 364141b Compare November 24, 2022 14:19
@igor-sirotin igor-sirotin changed the title fix(StatusMenu): Refactor StatusSearchLocationMenu. Rename components. fix(StatusMenu): Refactor StatusSearchLocationMenu Nov 24, 2022
@igor-sirotin igor-sirotin changed the title fix(StatusMenu): Refactor StatusSearchLocationMenu fix(StatusSearchLocationMenu): Refactor using new StatusPopupMenu Nov 24, 2022
@igor-sirotin igor-sirotin marked this pull request as ready for review November 24, 2022 14:20
@igor-sirotin igor-sirotin force-pushed the fix/7232-serach-location-menu branch from 09e90b1 to d9d0764 Compare November 24, 2022 21:11
@igor-sirotin igor-sirotin force-pushed the fix/7232-serach-location-menu branch from d9d0764 to f931d96 Compare November 24, 2022 21:15
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.

I haven't checked it thoroughly but at first sight it looks ok. I will have another look when you create PR for fix/status-menu.

@igor-sirotin
Copy link
Contributor Author

I haven't checked it thoroughly but at first sight it looks ok. I will have another look when you create PR for fix/status-menu.

Thanks!
Though, be careful, because fix/status-menu PR will contain renaming of components. It might be not easy to review it in that mess. 🙂

Copy link
Member

@jrainville jrainville left a comment

Choose a reason for hiding this comment

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

LGTM. I' d just like one of the members of the UI cohort give a looks since there are a lot of StatusQ changes. cc @caybro

menu.removeMenu(object)
else if (object instanceof Action)
menu.removeAction(object)
else // if (object instanceof MenuItem)
Copy link
Member

Choose a reason for hiding this comment

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

Is the comment still needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nope, it's not. Thanks for pointing.
I removed it locally, will push is as part of next PR, not to block this one 🙂

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jrainville, added here: #8473

Copy link
Member

@0x-r4bbit 0x-r4bbit left a comment

Choose a reason for hiding this comment

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

Skimmed through the code and judging also by screenshots, this looks good to me.
Just a minor thing to improve but I'll leave that up to you

name: root.text
letterSize: 11
readonly property StatusIdenticonRingSettings defaultRingSettings: StatusIdenticonRingSettings {
ringPxSize: Math.max(1.5, d.assetSettings.width / 24.0)
Copy link
Member

Choose a reason for hiding this comment

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

Not sure if worth it, but we seem to be doing the same thing here: https://github.com/status-im/status-desktop/pull/8436/files#diff-a295c8811d526e0c83e97c3c9431b689b5cce6e9ff2b0c73bcc39b003a7a18edR31 maybe it makes sense to have a little utils function for that so we ensure this doesn't get out of sync when changes are made?

Copy link
Contributor Author

@igor-sirotin igor-sirotin Nov 28, 2022

Choose a reason for hiding this comment

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

Good point, thanks! Found it in 5 places 🤦
Added it as part of next PR #8473, not to block this one

import StatusQ.Core.Utils 0.1 as StatusQUtils

StatusPopupMenu {
id: root
dim: false
Copy link
Member

Choose a reason for hiding this comment

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

I assume we're getting a dim: false experience by other means now?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeap, we have it in the StatusPopupMenu. And always had actually 🙂

@igor-sirotin igor-sirotin merged commit d415829 into fix/status-menu Nov 28, 2022
@igor-sirotin igor-sirotin deleted the fix/7232-serach-location-menu branch November 28, 2022 11:14
@igor-sirotin igor-sirotin mentioned this pull request Nov 29, 2022
3 tasks
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.

5 participants