Poll history - ended polls list items (#10119)
* wip * remove dupe * use poll model relations in all cases * update mpollbody tests to use poll instance * update poll fetching login in pinned messages card * add pinned polls to room polls state * add spinner while relations are still loading * handle no poll in end poll dialog * strict errors * render a poll body that errors for poll end events * add fetching logic to pollend tile * extract poll testing utilities * test mpollend * strict fix * more strict fix * strict fix for forwardref * add filter component * update poll test utils * add unstyled filter tab group * filtertabgroup snapshot * lint * update test util setupRoomWithPollEvents to allow testing multiple polls in one room * style filter tabs * test error message for past polls * sort polls list by latest * extract poll option display components from pollbody * add ended poll list item component * use named export for polllistitem * test POllListItemEnded * comments * strict fixes * extract poll option display components * strict fixes * strict
This commit is contained in:
parent
7e5122b379
commit
a06163ee98
15 changed files with 472 additions and 18 deletions
|
@ -0,0 +1,60 @@
|
|||
/*
|
||||
Copyright 2023 The Matrix.org Foundation C.I.C.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
.mx_PollListItemEnded {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
color: $primary-content;
|
||||
}
|
||||
|
||||
.mx_PollListItemEnded_title {
|
||||
display: grid;
|
||||
justify-content: left;
|
||||
align-items: center;
|
||||
grid-gap: $spacing-8;
|
||||
grid-template-columns: min-content 1fr min-content;
|
||||
grid-template-rows: auto;
|
||||
}
|
||||
|
||||
.mx_PollListItemEnded_icon {
|
||||
height: 14px;
|
||||
width: 14px;
|
||||
color: $quaternary-content;
|
||||
padding-left: $spacing-8;
|
||||
}
|
||||
|
||||
.mx_PollListItemEnded_date {
|
||||
font-size: $font-12px;
|
||||
color: $secondary-content;
|
||||
}
|
||||
|
||||
.mx_PollListItemEnded_question {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.mx_PollListItemEnded_answers {
|
||||
display: grid;
|
||||
grid-gap: $spacing-8;
|
||||
margin-top: $spacing-12;
|
||||
}
|
||||
|
||||
.mx_PollListItemEnded_voteCount {
|
||||
// 6px to match PollOption padding
|
||||
margin: $spacing-8 0 0 6px;
|
||||
}
|
|
@ -18,7 +18,6 @@ limitations under the License.
|
|||
border: 1px solid $quinary-content;
|
||||
border-radius: 8px;
|
||||
padding: 6px 12px;
|
||||
max-width: 550px;
|
||||
background-color: $background;
|
||||
|
||||
.mx_StyledRadioButton_content,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue