Skip to content

feat: new Shell (jump to) home screen #17916

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 21 commits into from
Jun 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
c846d41
fix(StatusCommunityCard): allow not displaying the bottom tags row
caybro May 5, 2025
bbbd213
chore(StatusTooltip): allow overriding the tooltip color
caybro May 5, 2025
d57f3f4
fix(ConcatModel): expose the marker role as a QVariant
caybro May 23, 2025
e45d3a8
feat: Desktop Shell Mode homepage
caybro May 5, 2025
fa16c0d
feat(Shell): use the standard color and radius
caybro May 28, 2025
81443b7
feat(Shell): sort the grid items by the recency
caybro May 28, 2025
8ab85aa
fix(Shell): extract the stobyook chats and dapps models
caybro May 29, 2025
6b6585a
fix(SectionModel): propagate updates for the `CanJoin` role
caybro May 29, 2025
ab5346b
feat(ProfileButton): extra the self profile button to a separate comp…
caybro May 29, 2025
93cccd6
feat(Settings): extract the quit confirmation popup
caybro May 29, 2025
9bb7d69
fix(StringUtils): fix reading resource files
caybro May 29, 2025
3fb9f3c
chore(tests): add some object names for tests
caybro Jun 4, 2025
799ab74
chore(Shell): add some docu about expected/provided model roles
caybro Jun 4, 2025
8d30d28
fix(AppMain): fix launching Swap from Shell
caybro Jun 4, 2025
fc29adb
chore(Shell): some formatting fixes
caybro Jun 4, 2025
1639cbb
fix(ProfileButton): remove ProfileStore, make it a pure component
caybro Jun 4, 2025
e44114a
fix(ObjectProxyModel): fix signalling dataChanged for r/w models
caybro Jun 4, 2025
b4db567
fix(Shell): use ObjectProxyModel instead of a custom C++ one
caybro Jun 4, 2025
49c6ecd
fix(Shell): open the context menus at the right spot
caybro Jun 5, 2025
f07fd8c
chore(Shell): some formatting fixes
caybro Jun 5, 2025
2e10611
fix(ShellContainer): take transformed models on input
caybro Jun 5, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/app/global/feature_flags.nim
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ const DEFAULT_FLAG_SEND_VIA_PERSONAL_CHAT_ENABLED = true
const DEFAULT_FLAG_PAYMENT_REQUEST_ENABLED = true
const DEFAULT_FLAG_SIMPLE_SEND_ENABLED = true
const DEFAULT_FLAG_MARKET_ENABLED = true
const DEFAULT_FLAG_SHELL_ENABLED = false

# Compile time feature flags
const DEFAULT_FLAG_DAPPS_ENABLED = true
Expand All @@ -35,6 +36,7 @@ featureFlag("SEND_VIA_PERSONAL_CHAT_ENABLED", DEFAULT_FLAG_SEND_VIA_PERSONAL_CHA
featureFlag("PAYMENT_REQUEST_ENABLED", DEFAULT_FLAG_PAYMENT_REQUEST_ENABLED)
featureFlag("SIMPLE_SEND_ENABLED", DEFAULT_FLAG_SIMPLE_SEND_ENABLED)
featureFlag("MARKET_ENABLED", DEFAULT_FLAG_MARKET_ENABLED)
featureFlag("SHELL_ENABLED", DEFAULT_FLAG_SHELL_ENABLED)

featureFlag("DAPPS_ENABLED", DEFAULT_FLAG_DAPPS_ENABLED, true)
featureFlag("CONNECTOR_ENABLED", DEFAULT_FLAG_CONNECTOR_ENABLED, true)
Expand Down Expand Up @@ -81,6 +83,7 @@ QtObject:
simpleSendEnabled: bool
keycardEnabled: bool
marketEnabled: bool
shellEnabled: bool

proc setup(self: FeatureFlags) =
self.QObject.setup()
Expand All @@ -92,6 +95,7 @@ QtObject:
self.simpleSendEnabled = SIMPLE_SEND_ENABLED
self.keycardEnabled = KEYCARD_ENABLED
self.marketEnabled = MARKET_ENABLED
self.shellEnabled = SHELL_ENABLED

proc delete*(self: FeatureFlags) =
self.QObject.delete()
Expand Down Expand Up @@ -147,3 +151,9 @@ QtObject:

proc getMarketEnabled*(self: FeatureFlags): bool {.slot.} =
return self.marketEnabled

QtProperty[bool] shellEnabled:
read = getShellEnabled

proc getShellEnabled*(self: FeatureFlags): bool {.slot.} =
return self.shellEnabled
2 changes: 1 addition & 1 deletion src/app/modules/shared_models/section_model.nim
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ QtObject:
updateRoleWithValue(joined, Joined, item.joined)
updateRoleWithValue(spectated, Spectated, item.spectated)
updateRoleWithValue(isMember, IsMember, item.isMember)
updateRoleWithValue(isMember, IsMember, item.isMember)
updateRoleWithValue(canJoin, CanJoin, item.canJoin)
updateRoleWithValue(canManageUsers, CanManageUsers, item.canManageUsers)
updateRoleWithValue(canRequestAccess, CanRequestAccess, item.canRequestAccess)
updateRoleWithValue(access, Access, item.access)
Expand Down
2 changes: 2 additions & 0 deletions storybook/pages/ColorsPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ SplitView {
font.weight: Font.Medium
}
TextField {
Layout.preferredWidth: 200
readonly property string searchText: text.toLowerCase()
id: searchField
}
Expand Down Expand Up @@ -280,3 +281,4 @@ SplitView {
}

// category: Core
// status: good
36 changes: 25 additions & 11 deletions storybook/pages/CommunitiesPortalDummyModel.qml
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
import QtQuick 2.14
import QtQuick 2.15

import Models 1.0

ListModel {

readonly property var emptyModel: ListModel {}

Component.onCompleted: append([
Component.onCompleted: append(entries)

readonly property var entries: [
{
featured: false,
id: "id1",
loaded: true,
icon: ModelsData.icons.status,
banner: ModelsData.banners.status,
color: "blue",
color: "mediumblue",
name: "Status.app",
description: "Your portal to Web3. Secure wallet. Private messaging. Requires secret tokens to join",
members: 130,
Expand Down Expand Up @@ -43,7 +45,9 @@ ListModel {
},
]),
permissionsModel: PermissionsModel.privatePermissionsMemberNotMetModel,
allTokenRequirementsMet: false
allTokenRequirementsMet: false,
hasNotification: true,
notificationsCount: 3
},
{
featured: true,
Expand Down Expand Up @@ -73,7 +77,9 @@ ListModel {
},
]),
permissionsModel: PermissionsModel.twoShortPermissionsModel,
allTokenRequirementsMet: false
allTokenRequirementsMet: false,
hasNotification: true,
notificationsCount: 0
},
{
featured: true,
Expand Down Expand Up @@ -108,7 +114,7 @@ ListModel {
icon: ModelsData.icons.dragonereum,
banner: ModelsData.banners.dragonereum,
color: "black",
name: "Dragonereum",
name: "Dragonereum lorem ipsum dolor sit amet",
description: "A community of cat lovers, meow!",
members: 34,
activeMembers: 20,
Expand Down Expand Up @@ -138,7 +144,9 @@ ListModel {
available: true,
tags: JSON.stringify([]),
permissionsModel: PermissionsModel.channelsOnlyPermissionsModelNotMet,
allTokenRequirementsMet: false
allTokenRequirementsMet: false,
hasNotification: true,
notificationsCount: 33
},
{
featured: false,
Expand Down Expand Up @@ -168,7 +176,9 @@ ListModel {
},
]),
permissionsModel: PermissionsModel.threeShortPermissionsModel,
allTokenRequirementsMet: false
allTokenRequirementsMet: false,
hasNotification: false,
notificationsCount: 33
},
{
featured: false,
Expand Down Expand Up @@ -219,7 +229,9 @@ ListModel {
},
]),
permissionsModel: PermissionsModel.twoLongPermissionsModel,
allTokenRequirementsMet: true
allTokenRequirementsMet: true,
hasNotification: true,
notificationsCount: 0
},
{
featured: false,
Expand All @@ -236,7 +248,9 @@ ListModel {
available: true,
tags: JSON.stringify([]),
permissionsModel: emptyModel,
allTokenRequirementsMet: false
allTokenRequirementsMet: false,
hasNotification: true,
notificationsCount: 100
}
])
]
}
4 changes: 2 additions & 2 deletions storybook/pages/CommunitiesViewPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ SplitView {
logs.logEvent("profileSectionStore::communitiesProfileModule::leaveCommunity", ["communityId"], arguments)
}
}
property var communitiesList: ctrlEmptyView.checked ? emptyModel : communitiesModel
readonly property var communitiesList: ctrlEmptyView.checked ? emptyModel : communitiesModel
}
rootStore: AppLayoutsStores.RootStore {
function isMyCommunityRequestPending(communityId) {
Expand Down Expand Up @@ -90,5 +90,5 @@ SplitView {
}

// category: Views

// status: good
// https://www.figma.com/file/idUoxN7OIW2Jpp3PMJ1Rl8/%E2%9A%99%EF%B8%8F-Settings-%7C-Desktop?type=design&node-id=16089-387522&t=HRT9BmZXnl7Lt55Q-0
196 changes: 196 additions & 0 deletions storybook/pages/ShellContainerPage.qml
Copy link
Member

Choose a reason for hiding this comment

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

On Qt 5.15.2 it reports bunch of warnings when launched and used:

file:///home/michalc/workspace/status-desktop/ui/app/AppLayouts/Shell/ShellAdaptor.qml:238:13: Unable to assign [undefined] to QString
file:///home/michalc/workspace/status-desktop/ui/imports/utils/Utils.qml:934: TypeError: Cannot call method 'isCompressedPubKey' of null
file:///home/michalc/Qt/5.15.2/gcc_64/qml/QtQuick/Controls.2/Universal/ScrollBar.qml:82:13: QML NumberAnimation: Cannot animate non-existent property "opacity"
file:///home/michalc/Qt/5.15.2/gcc_64/qml/QtQuick/Controls.2/Universal/ScrollBar.qml:87:17: QML PropertyAction: Cannot animate non-existent property "opacity"
file:///home/michalc/Qt/5.15.2/gcc_64/qml/QtQuick/Controls.2/Universal/ScrollBar.qml:89:17: QML NumberAnimation: Cannot animate non-existent property "opacity"
file:///home/michalc/Qt/5.15.2/gcc_64/qml/QtQuick/Controls.2/Universal/ScrollBar.qml:82:13: QML NumberAnimation: Cannot animate non-existent property "opacity"
file:///home/michalc/Qt/5.15.2/gcc_64/qml/QtQuick/Controls.2/Universal/ScrollBar.qml:87:17: QML PropertyAction: Cannot animate non-existent property "opacity"
file:///home/michalc/Qt/5.15.2/gcc_64/qml/QtQuick/Controls.2/Universal/ScrollBar.qml:89:17: QML NumberAnimation: Cannot animate non-existent property "opacity"
file:///home/michalc/Qt/5.15.2/gcc_64/qml/QtQuick/Controls.2/Universal/ScrollBar.qml:82:13: QML NumberAnimation: Cannot animate non-existent property "opacity"
file:///home/michalc/Qt/5.15.2/gcc_64/qml/QtQuick/Controls.2/Universal/ScrollBar.qml:87:17: QML PropertyAction: Cannot animate non-existent property "opacity"
file:///home/michalc/Qt/5.15.2/gcc_64/qml/QtQuick/Controls.2/Universal/ScrollBar.qml:89:17: QML NumberAnimation: Cannot animate non-existent property "opacity"
qml: !!! ITEM ACTIVATED; key:  ; sectionType: 1 ; itemId: 
qml: !!! ITEM ACTIVATED; key:  ; sectionType: 3 ; itemId: 
qml: !!! ITEM ACTIVATED; key: 2;id13 ; sectionType: 2 ; itemId: id13
file:///home/michalc/workspace/status-desktop/ui/app/AppLayouts/Shell/ShellGrid.qml:140:13: Unable to assign [undefined] to bool
file:///home/michalc/workspace/status-desktop/ui/app/AppLayouts/Shell/ShellGrid.qml:140:13: Unable to assign [undefined] to bool
file:///home/michalc/workspace/status-desktop/ui/app/AppLayouts/Shell/ShellGrid.qml:194:13: Unable to assign [undefined] to QUrl
file:///home/michalc/workspace/status-desktop/ui/app/AppLayouts/Shell/ShellGrid.qml:123:13: Unable to assign [undefined] to bool
file:///home/michalc/workspace/status-desktop/ui/app/AppLayouts/Shell/ShellGrid.qml:119:13: Unable to assign [undefined] to int
file:///home/michalc/workspace/status-desktop/ui/app/AppLayouts/Shell/ShellGrid.qml:114:13: Unable to assign [undefined] to QUrl
file:///home/michalc/workspace/status-desktop/ui/app/AppLayouts/Shell/ShellGrid.qml:122:13: Unable to assign [undefined] to bool
file:///home/michalc/workspace/status-desktop/ui/app/AppLayouts/Shell/ShellGrid.qml:120:13: Unable to assign [undefined] to int
file:///home/michalc/workspace/status-desktop/ui/StatusQ/src/StatusQ/Components/StatusRoundIcon.qml:26:5: QML StatusIcon: Cannot open: file:///home/michalc/workspace/status-desktop/ui/app/AppLayouts/Shell/dapp
file:///home/michalc/workspace/status-desktop/ui/app/AppLayouts/Shell/ShellGrid.qml:116:13: Unable to assign [undefined] to int
file:///home/michalc/workspace/status-desktop/ui/app/AppLayouts/Shell/ShellGrid.qml:115:13: Unable to assign [undefined] to bool
file:///home/michalc/workspace/status-desktop/ui/app/AppLayouts/Shell/ShellGrid.qml:140:13: Unable to assign [undefined] to bool
file:///home/michalc/workspace/status-desktop/ui/app/AppLayouts/Shell/ShellGrid.qml:158:13: Unable to assign [undefined] to QString
file:///home/michalc/workspace/status-desktop/ui/app/AppLayouts/Shell/ShellGrid.qml:159:13: Unable to assign [undefined] to QString
file:///home/michalc/workspace/status-desktop/ui/StatusQ/src/StatusQ/Components/StatusLetterIdenticon.qml:39:5: QML StatusEmoji: Cannot open: file:///home/michalc/workspace/status-desktop/ui/StatusQ/src/assets/twemoji/svg/75.svg
file:///home/michalc/workspace/status-desktop/ui/app/AppLayouts/Shell/ShellGrid.qml:123:13: Unable to assign [undefined] to bool
file:///home/michalc/workspace/status-desktop/ui/app/AppLayouts/Shell/ShellGrid.qml:119:13: Unable to assign [undefined] to int
file:///home/michalc/workspace/status-desktop/ui/app/AppLayouts/Shell/ShellGrid.qml:114:13: Unable to assign [undefined] to QUrl
file:///home/michalc/workspace/status-desktop/ui/app/AppLayouts/Shell/ShellGrid.qml:122:13: Unable to assign [undefined] to bool
file:///home/michalc/workspace/status-desktop/ui/app/AppLayouts/Shell/ShellGrid.qml:120:13: Unable to assign [undefined] to int
file:///home/michalc/workspace/status-desktop/ui/StatusQ/src/StatusQ/Components/StatusRoundIcon.qml:26:5: QML StatusIcon: Cannot open: file:///home/michalc/workspace/status-desktop/ui/app/AppLayouts/Shell/☀️
file:///home/michalc/workspace/status-desktop/ui/app/AppLayouts/Shell/ShellGrid.qml:140:13: Unable to assign [undefined] to bool
file:///home/michalc/workspace/status-desktop/ui/app/AppLayouts/Shell/ShellGrid.qml:177:13: Unable to assign [undefined] to int
file:///home/michalc/workspace/status-desktop/ui/app/AppLayouts/Shell/ShellGrid.qml:178:13: Unable to assign [undefined] to int
file:///home/michalc/workspace/status-desktop/ui/app/AppLayouts/Shell/ShellGrid.qml:123:13: Unable to assign [undefined] to bool
file:///home/michalc/workspace/status-desktop/ui/app/AppLayouts/Shell/ShellGrid.qml:119:13: Unable to assign [undefined] to int
file:///home/michalc/workspace/status-desktop/ui/app/AppLayouts/Shell/ShellGrid.qml:114:13: Unable to assign [undefined] to QUrl
file:///home/michalc/workspace/status-desktop/ui/app/AppLayouts/Shell/ShellGrid.qml:122:13: Unable to assign [undefined] to bool
file:///home/michalc/workspace/status-desktop/ui/app/AppLayouts/Shell/ShellGrid.qml:120:13: Unable to assign [undefined] to int
file:///home/michalc/Qt/5.15.2/gcc_64/qml/QtQuick/Controls.2/Universal/ScrollBar.qml:82:13: QML NumberAnimation: Cannot animate non-existent property "opacity"
file:///home/michalc/Qt/5.15.2/gcc_64/qml/QtQuick/Controls.2/Universal/ScrollBar.qml:87:17: QML PropertyAction: Cannot animate non-existent property "opacity"
file:///home/michalc/Qt/5.15.2/gcc_64/qml/QtQuick/Controls.2/Universal/ScrollBar.qml:89:17: QML NumberAnimation: Cannot animate non-existent property "opacity"
qml: !!! ITEM ACTIVATED; key: 1;id1 ; sectionType: 1 ; itemId: id1

Copy link
Member

Choose a reason for hiding this comment

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

And on Qt 6.9:

file:///home/michalc/workspace/status-desktop/storybook/main.qml:337:5: QML Settings: The Settings type from Qt.labs.settings is deprecated and will be removed in a future release. Please use the one from QtCore instead.
file:///home/michalc/workspace/status-desktop/storybook/src/Storybook/LogsAndControlsPanel.qml:46:5: QML Settings: The Settings type from Qt.labs.settings is deprecated and will be removed in a future release. Please use the one from QtCore instead.
file:///home/michalc/workspace/status-desktop/ui/app/AppLayouts/Shell/ShellAdaptor.qml:322:5: QML Settings: The Settings type from Qt.labs.settings is deprecated and will be removed in a future release. Please use the one from QtCore instead.
file:///home/michalc/workspace/status-desktop/ui/StatusQ/src/StatusQ/Core/LocaleUtils.qml:290:37: QML Settings: The Settings type from Qt.labs.settings is deprecated and will be removed in a future release. Please use the one from QtCore instead.
file:///home/michalc/workspace/status-desktop/ui/imports/utils/Utils.qml:934: TypeError: Cannot call method 'isCompressedPubKey' of null
Storybook started, Qt runtime version: 6.9.0 ; built against version: "6.9.0" installed in: "/home/michalc/Qt/6.9.0/gcc_64" ; QQC style: "Universal"
qt.qml.defaultmethod: Assigning an object to a signal handler is deprecated. Instead, create the object, give it an id, and call the desired slot from the signal handler. The object is: QQuickSequentialAnimation(0x64e4352d3990)
qt.qml.defaultmethod: Assigning an object to a signal handler is deprecated. Instead, create the object, give it an id, and call the desired slot from the signal handler. The object is: QQuickSequentialAnimation(0x64e4353cc8a0)
qt.qml.defaultmethod: Assigning an object to a signal handler is deprecated. Instead, create the object, give it an id, and call the desired slot from the signal handler. The object is: QQuickSequentialAnimation(0x64e433d2f450)
qt.qml.defaultmethod: Assigning an object to a signal handler is deprecated. Instead, create the object, give it an id, and call the desired slot from the signal handler. The object is: QQuickSequentialAnimation(0x64e435429790)
qt.qml.defaultmethod: Assigning an object to a signal handler is deprecated. Instead, create the object, give it an id, and call the desired slot from the signal handler. The object is: QQuickSequentialAnimation(0x64e435448230)
qt.qml.defaultmethod: Assigning an object to a signal handler is deprecated. Instead, create the object, give it an id, and call the desired slot from the signal handler. The object is: QQuickSequentialAnimation(0x64e435a726f0)
qml: !!! ITEM ACTIVATED; key: 1;id5 ; sectionType: 1 ; itemId: id5
file:///home/michalc/workspace/status-desktop/ui/app/AppLayouts/Shell/ShellGrid.qml:177:13: Unable to assign [undefined] to int
file:///home/michalc/workspace/status-desktop/ui/StatusQ/src/StatusQ/Components/StatusLetterIdenticon.qml:39:5: QML StatusEmoji: Cannot open: file:///home/michalc/workspace/status-desktop/ui/StatusQ/src/assets/twemoji/svg/68.svg
file:///home/michalc/workspace/status-desktop/ui/StatusQ/src/StatusQ/Components/StatusLetterIdenticon.qml:39:5: QML StatusEmoji: Cannot open: file:///home/michalc/workspace/status-desktop/ui/StatusQ/src/assets/twemoji/svg/68.svg
file:///home/michalc/workspace/status-desktop/ui/StatusQ/src/StatusQ/Components/StatusLetterIdenticon.qml:39:5: QML StatusEmoji: Cannot open: file:///home/michalc/workspace/status-desktop/ui/StatusQ/src/assets/twemoji/svg/68.svg
qrc:/qt-project.org/imports/QtQuick/Controls/Universal/ScrollBar.qml:55:17: QML PropertyAction: Cannot animate non-existent property "opacity"
qml: !!! ITEM 2;id15 PINNED: true
file:///home/michalc/workspace/status-desktop/ui/app/AppLayouts/Shell/ShellGrid.qml:177:13: Unable to assign [undefined] to int
file:///home/michalc/workspace/status-desktop/ui/app/AppLayouts/Shell/ShellGrid.qml:177:13: Unable to assign [undefined] to int
file:///home/michalc/workspace/status-desktop/ui/app/AppLayouts/Shell/ShellGrid.qml:123:13: Unable to assign [undefined] to bool
file:///home/michalc/workspace/status-desktop/ui/app/AppLayouts/Shell/ShellGrid.qml:114:13: Unable to assign [undefined] to QUrl
file:///home/michalc/workspace/status-desktop/ui/app/AppLayouts/Shell/ShellGrid.qml:123:13: Unable to assign [undefined] to bool
file:///home/michalc/workspace/status-desktop/ui/app/AppLayouts/Shell/ShellGrid.qml:114:13: Unable to assign [undefined] to QUrl
qt.qml.defaultmethod: Assigning an object to a signal handler is deprecated. Instead, create the object, give it an id, and call the desired slot from the signal handler. The object is: QQuickSequentialAnimation(0x64e434d28c70)
qrc:/qt-project.org/imports/QtQuick/Controls/Universal/ScrollBar.qml:55:17: QML PropertyAction: Cannot animate non-existent property "opacity"
qml: !!! ITEM 1;id3 PINNED: true
file:///home/michalc/workspace/status-desktop/ui/app/AppLayouts/Shell/ShellGrid.qml:123:13: Unable to assign [undefined] to bool
file:///home/michalc/workspace/status-desktop/ui/app/AppLayouts/Shell/ShellGrid.qml:114:13: Unable to assign [undefined] to QUrl
file:///home/michalc/workspace/status-desktop/ui/app/AppLayouts/Shell/ShellGrid.qml:177:13: Unable to assign [undefined] to int
file:///home/michalc/workspace/status-desktop/ui/app/AppLayouts/Shell/ShellGrid.qml:177:13: Unable to assign [undefined] to int
qt.qml.defaultmethod: Assigning an object to a signal handler is deprecated. Instead, create the object, give it an id, and call the desired slot from the signal handler. The object is: QQuickSequentialAnimation(0x64e435668a90)

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah I can have a look but I think Jo fixed it here (in a followup PR): 2d356b2#diff-6ddeba0597852c62e6c0a914206e286d48b2ea35ee179c2e284567d2c64c0432R306

Original file line number Diff line number Diff line change
@@ -0,0 +1,196 @@
import QtQuick 2.15
import QtQuick.Controls 2.15
import QtQuick.Layouts 1.15

import StatusQ 0.1
import StatusQ.Core 0.1
import StatusQ.Components 0.1

import Models 1.0
import Storybook 1.0

import utils 1.0

import AppLayouts.Shell 1.0
import AppLayouts.Profile.stores 1.0 as ProfileStores

SplitView {
id: root

orientation: Qt.Vertical

Logs { id: logs }

ShellContainer {
id: shell
SplitView.fillWidth: true
SplitView.fillHeight: true

ShellAdaptor {
id: shellAdaptor

sectionsBaseModel: SectionsModel {}
chatsBaseModel: ChatsModel {}
walletsBaseModel: WalletAccountsModel {}
dappsBaseModel: DappsModel {}

showCommunities: ctrlShowCommunities.checked || ctrlShowAllEntries.checked
showSettings: ctrlShowSettings.checked || ctrlShowAllEntries.checked
showChats: ctrlShowChats.checked || ctrlShowAllEntries.checked
showWallets: ctrlShowWallets.checked || ctrlShowAllEntries.checked
showDapps: ctrlShowDapps.checked || ctrlShowAllEntries.checked

showEnabledSectionsOnly: ctrlShowEnabledSectionsOnly.checked
marketEnabled: ctrlMarketEnabled.checked

syncingBadgeCount: 2
messagingBadgeCount: 4
showBackUpSeed: true

searchPhrase: shell.searchPhrase

profileId: profileStore.pubkey
}

shellEntriesModel: shellAdaptor.shellEntriesModel
sectionsModel: shellAdaptor.sectionsModel
pinnedModel: shellAdaptor.pinnedModel

profileStore: ProfileStores.ProfileStore {
id: profileStore
readonly property string pubkey: "0xdeadbeef"
readonly property string compressedPubKey: "zxDeadBeef"
readonly property string name: "John Roe"
readonly property string icon: ModelsData.icons.rarible
readonly property int colorId: 7
readonly property var colorHash: [{colorId: 7, segmentLength: 1}, {colorId: 6, segmentLength: 2}]
property int currentUserStatus: Constants.currentUserStatus.automatic
}

getEmojiHashFn: function(pubKey) { // <- root.utilsStore.getEmojiHash(pubKey)
if (pubKey === "")
return ""

return["👨🏻‍🍼", "🏃🏿‍♂️", "🌇", "🤶🏿", "🏮","🤷🏻‍♂️", "🤦🏻", "📣", "🤎", "👷🏽", "😺", "🥞", "🔃", "🧝🏽‍♂️"]
}
getLinkToProfileFn: function(pubKey) { // <- root.rootStore.contactStore.getLinkToProfile(pubKey)
return Constants.userLinkPrefix + pubKey
}

useNewDockIcons: ctrlNewIcons.checked
hasUnseenACNotifications: ctrlHasNotifications.checked
aCNotificationCount: ctrlNotificationsCount.value

onItemActivated: function(key, sectionType, itemId) {
shellAdaptor.setTimestamp(key, new Date().valueOf())
logs.logEvent("onItemActivated", ["key", "sectionType", "itemId"], arguments)
console.info("!!! ITEM ACTIVATED; key:", key, "; sectionType:", sectionType, "; itemId:", itemId)
}
onItemPinRequested: function(key, pin) {
shellAdaptor.setPinned(key, pin)
if (pin)
shellAdaptor.setTimestamp(key, new Date().valueOf()) // update the timestamp so that the pinned dock items are sorted by their recency
logs.logEvent("onItemPinRequested", ["key", "pin"], arguments)
console.info("!!! ITEM", key, "PINNED:", pin)
}
onDappDisconnectRequested: function(dappUrl) {
logs.logEvent("onDappDisconnectRequested", ["dappUrl"], arguments)
console.info("!!! DAPP DISCONNECT:", dappUrl)
}

onNotificationButtonClicked: {
logs.logEvent("onNotificationButtonClicked") // <- openActivityCenterPopup()
}
onSetCurrentUserStatusRequested: function (status) {
profileStore.currentUserStatus = status
logs.logEvent("onSetCurrentUserStatusRequested", ["status"], arguments) // <- root.rootStore.setCurrentUserStatus(status)
}
onViewProfileRequested: function(pubKey) {
logs.logEvent("onViewProfileRequested", ["pubKey"], arguments) // <- Global.openProfilePopup(pubKey)
}
}

LogsAndControlsPanel {
SplitView.minimumHeight: 300
SplitView.preferredHeight: 300
SplitView.fillWidth: true

logsView.logText: logs.logText

ColumnLayout {
Switch {
id: ctrlNewIcons
text: "Use new dock icons"
checked: true
}
Switch {
id: ctrlShowEnabledSectionsOnly
text: "Show enabled sections only"
}
Switch {
id: ctrlMarketEnabled
text: "Market enabled"
checked: true
}
RowLayout {
Switch {
id: ctrlShowAllEntries
text: "Show all entries"
checked: true
}
Switch {
id: ctrlShowCommunities
text: "Show Communities"
checked: true
enabled: !ctrlShowAllEntries.checked
}
Switch {
id: ctrlShowChats
text: "Show Chats"
checked: true
enabled: !ctrlShowAllEntries.checked
}
Switch {
id: ctrlShowWallets
text: "Show Wallets"
checked: true
enabled: !ctrlShowAllEntries.checked
}
Switch {
id: ctrlShowSettings
text: "Show Settings"
checked: true
enabled: !ctrlShowAllEntries.checked
}
Switch {
id: ctrlShowDapps
text: "Show dApps"
checked: true
enabled: !ctrlShowAllEntries.checked
}
}
RowLayout {
Switch {
id: ctrlHasNotifications
text: "Has unseen notifications"
}
Label { text: " Count:" }
SpinBox {
id: ctrlNotificationsCount
from: 0
to: 100
value: 0
enabled: ctrlHasNotifications.checked
}
}
Button {
text: "Reset"
onClicked: shellAdaptor.clear()
}
}
}
}

// category: Sections
// status: good
// https://www.figma.com/design/uXJKlC0LaUjvwL5MEsI9v4/Shell----Desktop?node-id=251-357756&m=dev
3 changes: 2 additions & 1 deletion storybook/pages/StatusChatListAndCategoriesPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ SplitView {
itemId: "id3"
categoryId: "id2"
name: "Channel Y_1"
emoji: "💩"
active: false
notificationsCount: 0
hasUnreadMessages: true
Expand All @@ -91,7 +92,7 @@ SplitView {
active: false
notificationsCount: 0
hasUnreadMessages: false
color: ""
color: "red"
colorId: 3
icon: ""
muted: false
Expand Down
Loading