Storybook: `PagesModel.qml` removed, adding new pages simplified

Closes: #11716
This commit is contained in:
Michał Cieślak 2023-07-31 14:21:14 +02:00 committed by Michał
parent 6c5c36584a
commit cb07625a57
125 changed files with 417 additions and 543 deletions

View File

@ -51,13 +51,14 @@ add_library(${PROJECT_LIB}
figmalinksmodel.cpp figmalinksmodel.h figmalinksmodel.cpp figmalinksmodel.h
figmalinkssource.cpp figmalinkssource.h figmalinkssource.cpp figmalinkssource.h
modelutils.cpp modelutils.h modelutils.cpp modelutils.h
pagesmodel.h pagesmodel.cpp
sectionsdecoratormodel.cpp sectionsdecoratormodel.h sectionsdecoratormodel.cpp sectionsdecoratormodel.h
) )
add_executable( add_executable(
${PROJECT_NAME} ${PROJECT_NAME}
main.cpp main.cpp
main.qml PagesModel.qml main.qml
${CORE_QML_FILES} ${CORE_QML_FILES}
${CORE_JS_FILES} ${CORE_JS_FILES}
${STORYBOOK_QML_FILES} ${STORYBOOK_QML_FILES}

View File

@ -1,464 +0,0 @@
import QtQuick 2.15
ListModel {
ListElement {
title: "Playground"
section: "Views"
}
ListElement {
title: "ProfileDialogView"
section: "Views"
}
ListElement {
title: "CommunitiesPortalLayout"
section: "Views"
}
ListElement {
title: "EditPermissionView"
section: "Views"
}
ListElement {
title: "EditAirdropView"
section: "Views"
}
ListElement {
title: "ProfileFetchingView"
section: "Views"
}
ListElement {
title: "LoginView"
section: "Views"
}
ListElement {
title: "AboutView"
section: "Views"
}
ListElement {
title: "PermissionsView"
section: "Views"
}
ListElement {
title: "JoinCommunityView"
section: "Views"
}
ListElement {
title: "EditCommunityTokenView"
section: "Views"
}
ListElement {
title: "CommunityTokenView"
section: "Views"
}
ListElement {
title: "MintedTokensView"
section: "Views"
}
ListElement {
title: "AmountToSendView"
section: "Views"
}
ListElement {
title: "TokenListView"
section: "Views"
}
ListElement {
title: "MessageContextMenu"
section: "Views"
}
ListElement {
title: "DeviceSyncingView"
section: "Views"
}
ListElement {
title: "PasswordView"
section: "Views"
}
ListElement {
title: "CommunitiesView"
section: "Views"
}
ListElement {
title: "OwnerTokenWelcomeView"
section: "Views"
}
ListElement {
title: "EditNetworkView"
section: "Views"
}
ListElement {
title: "EditOwnerTokenView"
section: "Views"
}
ListElement {
title: "AccountView"
section: "Views"
}
ListElement {
title: "StatusCommunityCard"
section: "Panels"
}
ListElement {
title: "ProfilePopupInviteFriendsPanel"
section: "Panels"
}
ListElement {
title: "ProfilePopupInviteMessagePanel"
section: "Panels"
}
ListElement {
title: "UserListPanel"
section: "Panels"
}
ListElement {
title: "PermissionsSettingsPanel"
section: "Panels"
}
ListElement {
title: "PermissionQualificationPanel"
section: "Panels"
}
ListElement {
title: "PermissionConflictWarningPanel"
section: "Panels"
}
ListElement {
title: "ColumnHeaderPanel"
section: "Panels"
}
ListElement {
title: "JoinPermissionsOverlayPanel"
section: "Panels"
}
ListElement {
title: "DidYouKnowSplashScreen"
section: "Panels"
}
ListElement {
title: "MintTokensSettingsPanel"
section: "Panels"
}
ListElement {
title: "AirdropsSettingsPanel"
section: "Panels"
}
ListElement {
title: "ChatAnchorButtonsPanel"
section: "Panels"
}
ListElement {
title: "TokenHoldersPanel"
section: "Panels"
}
ListElement {
title: "SortableTokenHoldersPanel"
section: "Panels"
}
ListElement {
title: "ProfileSocialLinksPanel"
section: "Panels"
}
ListElement {
title: "ProfileShowcaseCommunitiesPanel"
section: "Panels"
}
ListElement {
title: "ProfileShowcaseAccountsPanel"
section: "Panels"
}
ListElement {
title: "ProfileShowcaseCollectiblesPanel"
section: "Panels"
}
ListElement {
title: "ProfileShowcaseAssetsPanel"
section: "Panels"
}
ListElement {
title: "TokenPanel"
section: "Panels"
}
ListElement {
title: "SequenceColumnLayout"
section: "Panels"
}
ListElement {
title: "FeesPanel"
section: "Panels"
}
ListElement {
title: "FeeRow"
section: "Panels"
}
ListElement {
title: "FeesBox"
section: "Panels"
}
ListElement {
title: "ChatPermissionQualificationPanel"
section: "Panels"
}
ListElement {
title: "PrivilegedTokenArtworkPanel"
section: "Panels"
}
ListElement {
title: "OverviewSettingsPanel"
section: "Panels"
}
ListElement {
title: "EditSettingsPanel"
section: "Panels"
}
ListElement {
title: "OverviewSettingsFooter"
section: "Panels"
}
ListElement {
title: "StatusInfoBoxPanel"
section: "Panels"
}
ListElement {
title: "OverviewSettingsChart"
section: "Panels"
}
ListElement {
title: "BurnTokensPopup"
section: "Popups"
}
ListElement {
title: "InviteFriendsToCommunityPopup"
section: "Popups"
}
ListElement {
title: "CreateChannelPopup"
section: "Popups"
}
ListElement {
title: "HoldingsDropdown"
section: "Popups"
}
ListElement {
title: "MembersDropdown"
section: "Popups"
}
ListElement {
title: "InDropdown"
section: "Popups"
}
ListElement {
title: "CommunityIntroDialog"
section: "Popups"
}
ListElement {
title: "TokenPermissionsPopup"
section: "Popups"
}
ListElement {
title: "SignTokenTransactionsPopup"
section: "Popups"
}
ListElement {
title: "SignMultiTokenTransactionsPopup"
section: "Popups"
}
ListElement {
title: "RemotelyDestructPopup"
section: "Popups"
}
ListElement {
title: "SharedAddressesPopup"
section: "Popups"
}
ListElement {
title: "AlertPopup"
section: "Popups"
}
ListElement {
title: "NetworkSelectPopup"
section: "Popups"
}
ListElement {
title: "SendModal"
section: "Popups"
}
ListElement {
title: "UserAgreementPopup"
section: "Popups"
}
ListElement {
title: "ExportControlNodePopup"
section: "Popups"
}
ListElement {
title: "ImportControlNodePopup"
section: "Popups"
}
ListElement {
title: "StatusButton"
section: "Controls"
}
ListElement {
title: "MembersSelector"
section: "Components"
}
ListElement {
title: "ImagesGridView"
section: "Components"
}
ListElement {
title: "ContactsListAndSearch"
section: "Components"
}
ListElement {
title: "StatusInput"
section: "Components"
}
ListElement {
title: "StatusChatInput"
section: "Components"
}
ListElement {
title: "StatusChatListAndCategories"
section: "Components"
}
ListElement {
title: "StatusScrollView"
section: "Components"
}
ListElement {
title: "StatusMessage"
section: "Components"
}
ListElement {
title: "StatusDotsLoadingIndicator"
section: "Components"
}
ListElement {
title: "StatusFlowSelector"
section: "Components"
}
ListElement {
title: "StatusItemSelector"
section: "Components"
}
ListElement {
title: "StatusGroupBox"
section: "Components"
}
ListElement {
title: "AddressesInputList"
section: "Components"
}
ListElement {
title: "AddressesSelectorPanel"
section: "Components"
}
ListElement {
title: "AirdropRecipientsSelector"
section: "Components"
}
ListElement {
title: "AirdropTokensSelector"
section: "Components"
}
ListElement {
title: "StatusEmojiAndColorComboBox"
section: "Components"
}
ListElement {
title: "DerivationPathInput"
section: "Components"
}
ListElement {
title: "NetworkFilter"
section: "Components"
}
ListElement {
title: "InlineNetworksComboBox"
section: "Components"
}
ListElement {
title: "TokenItem"
section: "Components"
}
ListElement {
title: "PermissionsRow"
section: "Components"
}
ListElement {
title: "StatusImageCropPanel"
section: "Components"
}
ListElement {
title: "StatusBlockProgressBar"
section: "Components"
}
ListElement {
title: "StatusDatePicker"
section: "Components"
}
ListElement {
title: "StatusDateRangePicker"
section: "Components"
}
ListElement {
title: "StatusChatListItem"
section: "Components"
}
ListElement {
title: "SortableTokenHoldersList"
section: "Components"
}
ListElement {
title: "SettingsPageHeader"
section: "Components"
}
ListElement {
title: "BrowserSettings"
section: "Settings"
}
ListElement {
title: "LanguageCurrencySettings"
section: "Settings"
}
ListElement {
title: "IntroPanel"
section: "Panels"
}
ListElement {
title: "PopupSizing"
section: "Research / Examples"
}
ListElement {
title: "TransactionDelegate"
section: "Wallet"
}
ListElement {
title: "TransactionAddress"
section: "Wallet"
}
ListElement {
title: "TransactionAddressTile"
section: "Wallet"
}
ListElement {
title: "TransactionDetailView"
section: "Wallet"
}
ListElement {
title: "WalletHeader"
section: "Wallet"
}
ListElement {
title: "StatusTxProgressBar"
section: "Wallet"
}
ListElement {
title: "ActivityFilterMenu"
section: "Wallet"
}
ListElement {
title: "ProfileAccounts"
section: "Wallet"
}
}

View File

@ -6,8 +6,14 @@
#include "figmadecoratormodel.h" #include "figmadecoratormodel.h"
#include "figmalinks.h" #include "figmalinks.h"
#include "figmalinkssource.h" #include "figmalinkssource.h"
#include "pagesmodel.h"
#include "sectionsdecoratormodel.h" #include "sectionsdecoratormodel.h"
struct PagesModelInitialized : public PagesModel {
explicit PagesModelInitialized(QObject *parent = nullptr)
: PagesModel(QML_IMPORT_ROOT + QStringLiteral("/pages"), parent) {}
};
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
@ -37,9 +43,10 @@ int main(int argc, char *argv[])
for (const auto& path : additionalImportPaths) for (const auto& path : additionalImportPaths)
engine.addImportPath(path); engine.addImportPath(path);
qmlRegisterType<SectionsDecoratorModel>("Storybook", 1, 0, "SectionsDecoratorModel");
qmlRegisterType<FigmaDecoratorModel>("Storybook", 1, 0, "FigmaDecoratorModel"); qmlRegisterType<FigmaDecoratorModel>("Storybook", 1, 0, "FigmaDecoratorModel");
qmlRegisterType<FigmaLinksSource>("Storybook", 1, 0, "FigmaLinksSource"); qmlRegisterType<FigmaLinksSource>("Storybook", 1, 0, "FigmaLinksSource");
qmlRegisterType<PagesModelInitialized>("Storybook", 1, 0, "PagesModel");
qmlRegisterType<SectionsDecoratorModel>("Storybook", 1, 0, "SectionsDecoratorModel");
qmlRegisterUncreatableType<FigmaLinks>("Storybook", 1, 0, "FigmaLinks", {}); qmlRegisterUncreatableType<FigmaLinks>("Storybook", 1, 0, "FigmaLinks", {});
auto watcherFactory = [additionalImportPaths](QQmlEngine*, QJSEngine*) { auto watcherFactory = [additionalImportPaths](QQmlEngine*, QJSEngine*) {

View File

@ -72,3 +72,4 @@ SplitView {
} }
} }
// category: Views

View File

@ -103,3 +103,5 @@ SplitView {
} }
} }
} }
// category: Views

View File

@ -100,3 +100,5 @@ SplitView {
} }
} }
} }
// category: Wallet

View File

@ -69,3 +69,5 @@ SplitView {
} }
} }
} }
// category: Components

View File

@ -77,3 +77,5 @@ SplitView {
} }
} }
} }
// category: Components

View File

@ -200,3 +200,5 @@ SplitView {
} }
} }
} }
// category: Components

View File

@ -60,3 +60,5 @@ ColumnLayout {
onClicked: listModel.clear() onClicked: listModel.clear()
} }
} }
// category: Components

View File

@ -243,3 +243,5 @@ SplitView {
} }
} }
} }
// category: Panels

View File

@ -59,4 +59,4 @@ SplitView {
} }
} }
// category: Popups

View File

@ -111,3 +111,5 @@ SplitView {
} }
} }
} }
// category: Views

View File

@ -151,4 +151,4 @@ SplitView {
} }
} }
// category: Components

View File

@ -123,4 +123,5 @@ SplitView {
} }
} }
// category: Popups

View File

@ -64,3 +64,5 @@ SplitView {
} }
} }
} }
// category: Panels

View File

@ -36,3 +36,5 @@ SplitView {
logsView.logText: logs.logText logsView.logText: logs.logText
} }
} }
// category: Panels

View File

@ -98,3 +98,5 @@ SplitView {
} }
} }
} }
// category: Panels

View File

@ -89,3 +89,5 @@ SplitView {
} }
} }
} }
// category: Views

View File

@ -179,3 +179,5 @@ SplitView {
} }
} }
} }
// category: Views

View File

@ -173,3 +173,4 @@ Nemo enim 😋 ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit,
} }
} }
// category: Popups

View File

@ -392,3 +392,5 @@ SplitView {
} }
} }
} }
// category: Views

View File

@ -161,3 +161,5 @@ Pane {
} }
} }
} }
// category: Components

View File

@ -87,3 +87,5 @@ SplitView {
} }
} }
} }
// category: Popups

View File

@ -416,6 +416,7 @@ SplitView {
border.width: 1 border.width: 1
radius: 5 radius: 5
} }
} }
// category: Components

View File

@ -68,3 +68,5 @@ SplitView {
SplitView.preferredWidth: 300 SplitView.preferredWidth: 300
} }
} }
// category: Views

View File

@ -34,5 +34,6 @@ SplitView {
} }
} }
} }
} }
// category: Panels

View File

@ -350,3 +350,5 @@ SplitView {
} }
} }
} }
// category: Views

View File

@ -60,3 +60,5 @@ SplitView {
} }
} }
} }
// category: Views

View File

@ -106,3 +106,4 @@ SplitView {
} }
} }
// category: Views

View File

@ -113,3 +113,5 @@ SplitView {
} }
} }
} }
// category: Views

View File

@ -104,3 +104,5 @@ SplitView {
} }
} }
} }
// category: Views

View File

@ -31,3 +31,5 @@ SplitView {
} }
} }
} }
// category: Panels

View File

@ -51,3 +51,5 @@ SplitView {
logsView.logText: logs.logText logsView.logText: logs.logText
} }
} }
// category: Popups

View File

@ -136,3 +136,5 @@ SplitView {
} }
} }
} }
// category: Panels

View File

@ -225,3 +225,5 @@ SplitView {
} }
} }
} }
// category: Panels

View File

@ -112,3 +112,5 @@ SplitView {
} }
} }
} }
// category: Panels

View File

@ -172,3 +172,5 @@ SplitView {
} }
} }
} }
// category: Popups

View File

@ -109,3 +109,5 @@ Pane {
} }
} }
} }
// category: Components

View File

@ -191,3 +191,5 @@ SplitView {
logsView.logText: logs.logText logsView.logText: logs.logText
} }
} }
// category: Popups

View File

@ -73,3 +73,5 @@ SplitView {
} }
} }
} }
// category: Popups

View File

@ -85,3 +85,5 @@ Item {
} }
} }
} }
// category: Components

View File

@ -85,3 +85,5 @@ SplitView {
} }
} }
} }
// category: Panels

View File

@ -136,3 +136,5 @@ SplitView {
logsView.logText: logs.logText logsView.logText: logs.logText
} }
} }
// category: Popups

View File

@ -299,3 +299,5 @@ Nemo enim 😋 ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit,
} }
} }
} }
// category: Views

View File

@ -169,3 +169,5 @@ SplitView {
} }
} }
} }
// category: Panels

View File

@ -105,4 +105,4 @@ SplitView {
} }
} }
// category: Components

View File

@ -110,3 +110,5 @@ SplitView {
// model editor will go here // model editor will go here
} }
} }
// category: Views

View File

@ -346,3 +346,5 @@ SplitView {
} }
} }
} }
// category: Popups

View File

@ -250,3 +250,4 @@ SplitView {
} }
} }
// category: Components

View File

@ -127,3 +127,5 @@ SplitView {
} }
} }
} }
// category: Views

View File

@ -181,3 +181,5 @@ SplitView {
} }
} }
} }
// category: Panels

View File

@ -94,3 +94,5 @@ SplitView {
} }
} }
} }
// category: Views

View File

@ -115,3 +115,5 @@ SplitView {
} }
} }
} }
// category: Components

View File

@ -302,3 +302,5 @@ SplitView {
} }
} }
} }
// category: Popups

View File

@ -28,3 +28,5 @@ SplitView {
return from + Math.random() * (to - from) return from + Math.random() * (to - from)
} }
} }
// category: Panels

View File

@ -56,3 +56,5 @@ SplitView {
} }
} }
} }
// category: Panels

View File

@ -32,3 +32,5 @@ SplitView {
} }
} }
} }
// category: Panels

View File

@ -77,3 +77,5 @@ SplitView {
} }
} }
} }
// category: Views

View File

@ -67,3 +67,5 @@ SplitView {
} }
} }
} }
// category: Views

View File

@ -88,3 +88,5 @@ SplitView {
} }
} }
} }
// category: Panels

View File

@ -97,3 +97,5 @@ SplitView {
} }
} }
} }
// category: Panels

View File

@ -200,3 +200,5 @@ SplitView {
} }
} }
} }
// category: Components

View File

@ -125,3 +125,5 @@ SplitView {
} }
} }
} }
// category: Panels

View File

@ -136,6 +136,4 @@ SplitView {
} }
} }
// category: Views

View File

@ -25,3 +25,5 @@ Item {
" but do not commit changes to that page." " but do not commit changes to that page."
} }
} }
// category: _

View File

@ -252,3 +252,5 @@ Item {
} }
} }
} }
// category: Research / Examples

View File

@ -96,3 +96,5 @@ SplitView {
} }
} }
} }
// category: Panels

View File

@ -2,14 +2,11 @@ import QtQuick 2.14
import QtQuick.Controls 2.14 import QtQuick.Controls 2.14
import AppLayouts.Profile.controls 1.0 import AppLayouts.Profile.controls 1.0
import StatusQ.Core 0.1 import StatusQ.Core 0.1
import utils 1.0 import utils 1.0
import Storybook 1.0
import Models 1.0 import Models 1.0
import Storybook 1.0
SplitView { SplitView {
id: root id: root
@ -53,3 +50,5 @@ SplitView {
} }
} }
} }
// category: Wallet

View File

@ -524,3 +524,5 @@ Say hi, or find me on Twitter, GitHub, or Mastodon."
} }
} }
} }
// category: Views

View File

@ -113,3 +113,5 @@ SplitView {
} }
} }
} }
// category: Views

View File

@ -89,3 +89,5 @@ Item {
} }
} }
} }
// category: Panels

View File

@ -91,3 +91,5 @@ Item {
} }
} }
} }
// category: Panels

View File

@ -83,3 +83,5 @@ SplitView {
} }
} }
} }
// category: Panels

View File

@ -112,3 +112,5 @@ SplitView {
} }
} }
} }
// category: Panels

View File

@ -104,3 +104,5 @@ SplitView {
} }
} }
} }
// category: Panels

View File

@ -99,3 +99,5 @@ SplitView {
} }
} }
} }
// category: Panels

View File

@ -140,3 +140,5 @@ SplitView {
logsView.logText: logs.logText logsView.logText: logs.logText
} }
} }
// category: Panels

View File

@ -76,4 +76,4 @@ SplitView {
} }
} }
// category: Popups

View File

@ -137,3 +137,5 @@ SplitView {
SplitView.fillWidth: true SplitView.fillWidth: true
} }
} }
// category: Popups

View File

@ -54,3 +54,5 @@ Item {
} }
} }
} }
// category: Panels

View File

@ -104,3 +104,5 @@ SplitView {
} }
} }
} }
// category: Components

View File

@ -153,3 +153,5 @@ SplitView {
} }
} }
} }
// category: Popups

View File

@ -170,4 +170,4 @@ SplitView {
} }
} }
// category: Popups

View File

@ -119,4 +119,4 @@ SplitView {
} }
} }
// category: Popups

View File

@ -48,3 +48,5 @@ SplitView {
logsView.logText: logs.logText logsView.logText: logs.logText
} }
} }
// category: Components

View File

@ -82,3 +82,5 @@ SplitView {
} }
} }
} }
// category: Panels

View File

@ -66,3 +66,5 @@ SplitView {
} }
} }
} }
// category: Components

View File

@ -270,3 +270,4 @@ SplitView {
} }
} }
// category: Controls

View File

@ -112,29 +112,31 @@ SplitView {
} }
Pane { Pane {
SplitView.minimumWidth: 300 SplitView.minimumWidth: 300
SplitView.preferredWidth: 300 SplitView.preferredWidth: 300
ColumnLayout { ColumnLayout {
anchors.fill: parent anchors.fill: parent
CheckBox { CheckBox {
id: enabledCheckBox id: enabledCheckBox
text: "enabled" text: "enabled"
checked: true checked: true
} }
MenuSeparator { MenuSeparator {
Layout.fillWidth: true Layout.fillWidth: true
} }
UsersModelEditor { UsersModelEditor {
id: modelEditor id: modelEditor
Layout.fillWidth: true Layout.fillWidth: true
Layout.fillHeight: true Layout.fillHeight: true
model: fakeUsersModel model: fakeUsersModel
onRemoveClicked: fakeUsersModel.remove(index, 1) onRemoveClicked: fakeUsersModel.remove(index, 1)
onRemoveAllClicked: fakeUsersModel.clear() onRemoveAllClicked: fakeUsersModel.clear()
onAddClicked: fakeUsersModel.append(modelEditor.getNewUser(fakeUsersModel.count)) onAddClicked: fakeUsersModel.append(modelEditor.getNewUser(fakeUsersModel.count))
} }
} }
} }
} }
// category: Components

View File

@ -113,3 +113,5 @@ SplitView {
} }
} }
} }
// category: Components

View File

@ -127,3 +127,5 @@ SplitView {
} }
} }
} }
// category: Components

View File

@ -89,3 +89,5 @@ SplitView {
} }
} }
} }
// category: Panels

View File

@ -69,3 +69,4 @@ SplitView {
} }
} }
// category: Components

View File

@ -36,3 +36,5 @@ SplitView {
Component.onCompleted: dialog.open() Component.onCompleted: dialog.open()
} }
} }
// category: Components

View File

@ -35,3 +35,5 @@ Item {
} }
} }
} }
// category: Components

View File

@ -40,3 +40,5 @@ SplitView {
} }
} }
} }
// category: Components

View File

@ -51,3 +51,5 @@ ColumnLayout {
onClicked: listModel.clear() onClicked: listModel.clear()
} }
} }
// category: Components

View File

@ -130,3 +130,5 @@ SplitView {
} }
} }
} }
// category: Components

View File

@ -296,3 +296,5 @@ SplitView {
} }
} }
} }
// category: Components

Some files were not shown because too many files have changed in this diff Show More