Skip to content

Commit

Permalink
fix(InviteFriendsToCommunityPopup): adaptive popup height, consistent…
Browse files Browse the repository at this point in the history
… footer height

Closes: #7604
Closes: #7605
  • Loading branch information
micieslak committed Nov 8, 2022
1 parent c32973b commit 6237d3c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion storybook/pages/InviteFriendsToCommunityPopupPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ SplitView {
}

communitySectionModule: QtObject {
function inviteUsersToCommunity() {
function inviteUsersToCommunity(keys, message) {
logs.logEvent("communitySectionModule::inviteUsersToCommunity",
["keys", "message"], arguments)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ StatusStackModal {
QtObject {
id: d

// values from Figma design
readonly property int footerButtonsHeight: 44
readonly property int popupContentHeight: 551

function sendInvites(pubKeys, inviteMessage) {
const error = root.communitySectionModule.inviteUsersToCommunity(JSON.stringify(pubKeys), inviteMessage);
d.processInviteResult(error);
Expand All @@ -51,14 +55,14 @@ StatusStackModal {

stackTitle: qsTr("Invite Contacts to %1").arg(community.name)
width: 640
implicitHeight: 700

padding: 0
leftPadding: 0
rightPadding: 0

nextButton: StatusButton {
objectName: "InviteFriendsToCommunityPopup_NextButton"
implicitHeight: d.footerButtonsHeight
text: qsTr("Next")
enabled: root.pubKeys.length
onClicked: {
Expand All @@ -68,6 +72,7 @@ StatusStackModal {

finishButton: StatusButton {
objectName: "InviteFriendsToCommunityPopup_SendButton"
implicitHeight: d.footerButtonsHeight
enabled: root.pubKeys.length > 0
text: qsTr("Send Invites")
onClicked: {
Expand All @@ -87,6 +92,8 @@ StatusStackModal {

stackItems: [
Item {
implicitHeight: d.popupContentHeight

CommunityProfilePopupInviteFriendsPanel {
anchors.fill: parent
anchors.topMargin: 16
Expand Down

0 comments on commit 6237d3c

Please sign in to comment.