-
Notifications
You must be signed in to change notification settings - Fork 85
fix: Optimize ContactsView & MembersTabPanel settings pages #16979
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
caybro
merged 5 commits into
master
from
16612-settings-optimize-contactsview-settings-page
Jan 14, 2025
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
474badd
chore(StatusTab[Bar,Button]): UI updates
caybro 9eb3647
chore(StatusCheckBox/Switch): UI updates & some fixes
caybro fda55e4
fix: Optimize ContactsView & MembersTabPanel settings pages
caybro 8f5eef8
ContactView: indpendent lists per tab
micieslak b78e369
chore(@e2e): change tests according to new UI
anastasiyaig File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
import QtQuick 2.15 | ||
|
||
import StatusQ 0.1 | ||
|
||
import Models 1.0 | ||
import Storybook 1.0 | ||
|
||
import shared.stores 1.0 as SharedStores | ||
import AppLayouts.Profile.views 1.0 | ||
import AppLayouts.Profile.stores 1.0 | ||
import mainui.adaptors 1.0 | ||
|
||
Item { | ||
ContactsView { | ||
sectionTitle: "Contacts" | ||
anchors.fill: parent | ||
anchors.leftMargin: 64 | ||
anchors.topMargin: 16 | ||
contentWidth: 560 | ||
|
||
contactsStore: ContactsStore { | ||
function joinPrivateChat(pubKey) {} | ||
function acceptContactRequest(pubKey, contactRequestId) {} | ||
function dismissContactRequest(pubKey, contactRequestId) {} | ||
|
||
function resolveENS(value) {} | ||
|
||
signal resolvedENS(string resolvedPubKey, string resolvedAddress, | ||
string uuid) | ||
} | ||
utilsStore: SharedStores.UtilsStore { | ||
function getEmojiHash(publicKey) { | ||
if (publicKey === "") | ||
return "" | ||
|
||
return JSON.stringify( | ||
["👨🏻🍼", "🏃🏿♂️", "🌇", "🤶🏿", "🏮","🤷🏻♂️", "🤦🏻", | ||
"📣", "🤎", "👷🏽", "😺", "🥞", "🔃", "🧝🏽♂️"]) | ||
} | ||
} | ||
|
||
mutualContactsModel: adaptor.mutualContacts | ||
blockedContactsModel: adaptor.blockedContacts | ||
pendingContactsModel: adaptor.pendingContacts | ||
pendingReceivedContactsCount: adaptor.pendingReceivedRequestContacts.count | ||
} | ||
|
||
ContactsModelAdaptor { | ||
id: adaptor | ||
|
||
allContacts: UsersModel {} | ||
} | ||
} | ||
|
||
// category: Views | ||
// status: good |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
import QtQuick 2.15 | ||
import QtQuick.Controls 2.15 | ||
import QtQuick.Layouts 1.15 | ||
|
||
import StatusQ.Controls 0.1 | ||
|
||
import Storybook 1.0 | ||
|
||
SplitView { | ||
id: root | ||
|
||
orientation: Qt.Vertical | ||
Logs { id: logs } | ||
|
||
Item { | ||
SplitView.fillWidth: true | ||
SplitView.fillHeight: true | ||
|
||
Rectangle { | ||
width: switchControl.width | ||
height: switchControl.height | ||
anchors.centerIn: parent | ||
color: "transparent" | ||
border.width: 1 | ||
border.color: "pink" | ||
|
||
StatusCheckBox { | ||
id: switchControl | ||
anchors.centerIn: parent | ||
text: ctrlWithText.checked ? "Check me out" : "" | ||
leftSide: !ctrlInverted.checked | ||
changeCursor: ctrlCursor.checked | ||
checked: true | ||
enabled: ctrlEnabled.checked | ||
tristate: ctrlTristate.checked | ||
size: ctrlSmall.checked ? StatusCheckBox.Size.Small : StatusCheckBox.Size.Regular | ||
onClicked: logs.logEvent("clicked()") | ||
onToggled: logs.logEvent("toggled()") | ||
} | ||
} | ||
} | ||
|
||
LogsAndControlsPanel { | ||
SplitView.minimumHeight: 320 | ||
SplitView.preferredHeight: 320 | ||
|
||
logsView.logText: logs.logText | ||
|
||
ColumnLayout { | ||
Layout.fillWidth: true | ||
|
||
Switch { | ||
id: ctrlEnabled | ||
text: "Enabled" | ||
checked: true | ||
} | ||
Switch { | ||
id: ctrlCursor | ||
text: "Change cursor" | ||
checked: true | ||
} | ||
Switch { | ||
id: ctrlInverted | ||
text: "Inverted" | ||
} | ||
Switch { | ||
id: ctrlSmall | ||
text: "Small size" | ||
} | ||
Switch { | ||
id: ctrlTristate | ||
text: "Tristate" | ||
} | ||
Switch { | ||
id: ctrlWithText | ||
text: "With text" | ||
checked: true | ||
} | ||
} | ||
} | ||
} | ||
|
||
// category: Controls | ||
// status: good |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
import QtQuick 2.15 | ||
import QtQuick.Controls 2.15 | ||
import QtQuick.Layouts 1.15 | ||
|
||
import StatusQ.Controls 0.1 | ||
|
||
import Storybook 1.0 | ||
|
||
SplitView { | ||
id: root | ||
|
||
orientation: Qt.Vertical | ||
Logs { id: logs } | ||
|
||
Item { | ||
SplitView.fillWidth: true | ||
SplitView.fillHeight: true | ||
|
||
Rectangle { | ||
width: switchControl.width | ||
height: switchControl.height | ||
anchors.centerIn: parent | ||
color: "transparent" | ||
border.width: 1 | ||
border.color: "pink" | ||
|
||
StatusSwitch { | ||
id: switchControl | ||
anchors.centerIn: parent | ||
text: ctrlWithText.checked ? "Check me out" : "" | ||
leftSide: !ctrlInverted.checked | ||
checked: true | ||
enabled: ctrlEnabled.checked | ||
onClicked: logs.logEvent("clicked()") | ||
onToggled: logs.logEvent("toggled()") | ||
} | ||
} | ||
} | ||
|
||
LogsAndControlsPanel { | ||
SplitView.minimumHeight: 200 | ||
SplitView.preferredHeight: 200 | ||
|
||
logsView.logText: logs.logText | ||
|
||
ColumnLayout { | ||
Layout.fillWidth: true | ||
|
||
Switch { | ||
id: ctrlEnabled | ||
text: "Enabled" | ||
checked: true | ||
} | ||
Switch { | ||
id: ctrlInverted | ||
text: "Inverted" | ||
} | ||
Switch { | ||
id: ctrlWithText | ||
text: "With text" | ||
checked: true | ||
} | ||
} | ||
} | ||
} | ||
|
||
// category: Controls | ||
// status: good |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import QtQuick 2.15 | ||
|
||
import StatusQ.Controls 0.1 | ||
|
||
Item { | ||
id: root | ||
|
||
Rectangle { | ||
width: tabbar.childrenRect.width | ||
height: tabbar.childrenRect.height | ||
anchors.centerIn: parent | ||
color: "transparent" | ||
border.width: 1 | ||
border.color: "pink" | ||
|
||
StatusTabBar { | ||
id: tabbar | ||
anchors.centerIn: parent | ||
|
||
StatusTabButton { | ||
width: implicitWidth | ||
text: "Contacts" | ||
} | ||
StatusTabButton { | ||
width: implicitWidth | ||
text: "Pending contacts" | ||
badge.value: 2 | ||
} | ||
StatusTabButton { | ||
width: implicitWidth | ||
enabled: false | ||
text: "Blocked & disabled" | ||
} | ||
StatusTabButton { | ||
width: implicitWidth | ||
text: "Misc" | ||
} | ||
} | ||
} | ||
} | ||
|
||
// category: Controls | ||
// status: good |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.