-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Message/event pinning #5142
Merged
Merged
Message/event pinning #5142
Changes from 14 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
774c3db
Pin/unpin message option in a message's context menu
turt2live 5daa16a
Add panel for pinned messages.
turt2live fa5a23e
Permalink pins to their original events
turt2live 9b11f57
Add action bar to pinned event tiles; support unpinning from the panel
turt2live 59a253a
Don't show the unpin button if the user can't unpin the message.
turt2live efdb4b0
i18n for 'Jump to message' button
turt2live f7389b7
Hide the pin option in the context menu if the user can't pin messages
turt2live 965a25b
Fix bug where rooms missing m.room.pinned_events could not pin messages
turt2live aff0288
Don't fail if an event doesn't belong to a room.
turt2live 0a3bc1c
Don't try to show redacted messages
turt2live b0190f6
i18n for remaining strings
turt2live 2d5acfc
Filter pinned events before rendering
turt2live 078ee54
Move the PinnedEventsPanel to the react-sdk
turt2live 2d153a7
Split up CSS; use .catch instead of .then
turt2live 3e066d3
Merge branch 'develop' into travis/pinned_messages
turt2live 6926c96
Hide pinning messages behind a labs settings
turt2live 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 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 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 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 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
67 changes: 67 additions & 0 deletions
67
src/skins/vector/css/matrix-react-sdk/views/rooms/_PinnedEventTile.scss
This file contains 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,67 @@ | ||
/* | ||
Copyright 2017 Travis Ralston | ||
|
||
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_PinnedEventTile { | ||
min-height: 40px; | ||
margin-bottom: 5px; | ||
width: 100%; | ||
border-radius: 5px; // for the hover | ||
} | ||
|
||
.mx_PinnedEventTile:hover { | ||
background-color: $event-selected-color; | ||
} | ||
|
||
.mx_PinnedEventTile .mx_PinnedEventTile_sender { | ||
color: #868686; | ||
font-size: 0.8em; | ||
vertical-align: top; | ||
display: block; | ||
padding-bottom: 3px; | ||
} | ||
|
||
.mx_PinnedEventTile .mx_EventTile_content { | ||
margin-left: 50px; | ||
position: relative; | ||
top: 0; | ||
left: 0; | ||
} | ||
|
||
.mx_PinnedEventTile .mx_BaseAvatar { | ||
float: left; | ||
margin-right: 10px; | ||
} | ||
|
||
.mx_PinnedEventTile:hover .mx_PinnedEventTile_actions { | ||
display: block; | ||
} | ||
|
||
.mx_PinnedEventTile_actions { | ||
float: right; | ||
margin-right: 10px; | ||
display: none; | ||
} | ||
|
||
.mx_PinnedEventTile_unpinButton { | ||
display: inline-block; | ||
cursor: pointer; | ||
margin-left: 10px; | ||
} | ||
|
||
.mx_PinnedEventTile_gotoButton { | ||
display: inline-block; | ||
font-size: 0.8em; | ||
} |
37 changes: 37 additions & 0 deletions
37
src/skins/vector/css/matrix-react-sdk/views/rooms/_PinnedEventsPanel.scss
This file contains 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,37 @@ | ||
/* | ||
Copyright 2017 Travis Ralston | ||
|
||
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_PinnedEventsPanel { | ||
border-top: 1px solid $primary-hairline-color; | ||
} | ||
|
||
.mx_PinnedEventsPanel_body { | ||
max-height: 300px; | ||
overflow-y: auto; | ||
padding-bottom: 15px; | ||
} | ||
|
||
.mx_PinnedEventsPanel_header { | ||
margin: 0; | ||
padding-top: 8px; | ||
padding-bottom: 15px; | ||
} | ||
|
||
.mx_PinnedEventsPanel_cancel { | ||
margin: 12px; | ||
float: right; | ||
display: inline-block; | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ftr these will just fall back to UK English if they're not there so adding them here doesn't actually do anything
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only reason I include these is to make weblate not complain about en-us being <100%.