Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Integrate searching public rooms and people into the new search experience #8707

Merged
merged 88 commits into from
Jun 15, 2022
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
1d3a2f6
Extract search result avatar into separate component
justjanne May 25, 2022
34e3a9a
Create new hook to get profile info based for an mxid
justjanne May 25, 2022
66e693e
Keep sorting for non-room results stable
justjanne May 25, 2022
691caf3
Build generic new dropdown menu component
justjanne May 27, 2022
cc7342d
Build new network menu based on new network dropdown component
justjanne May 27, 2022
fd21e9e
Moved spotlight dialog into own subfolder
justjanne May 27, 2022
6bfdf58
Extract hooks and subcomponents from SpotlightDialog
justjanne May 27, 2022
315ce5a
Add wrapped hooks for public room, users and profile info results
justjanne May 27, 2022
531f5c0
Added component for public room result details
justjanne May 27, 2022
73c88da
Return public room results even without search query
justjanne May 27, 2022
567e4f6
Implement searching for public rooms and users in new search experience
justjanne May 27, 2022
1d8781c
Add copy/copied tooltip for invite link option in spotlight
justjanne May 30, 2022
d24efda
feat: clean up search hooks, remove unnecessary wrappers
justjanne May 31, 2022
9dacc50
feat: use variables for css where possible
justjanne May 31, 2022
fa6d722
comment: explain rationale for hiding threepid avatar from screenreaders
justjanne May 31, 2022
d5a5621
feat: use variables for css where possible
justjanne May 31, 2022
463217b
fix: correct bad automatic import
justjanne May 31, 2022
cbae360
fix: correct translation issue
justjanne May 31, 2022
d14bd3c
Merge remote-tracking branch 'origin/develop' into justjanne/feat/213…
justjanne May 31, 2022
8f4dd91
Merge remote-tracking branch 'origin/develop' into justjanne/feat/213…
justjanne Jun 1, 2022
5ef137c
fix: correct nullability issues
justjanne Jun 1, 2022
a99a4ab
feat: switch roomdirectory to use new network dropdown
justjanne Jun 1, 2022
975214b
feat: remove old network dropdown
justjanne Jun 1, 2022
2b2bb74
feat: replace old networkdropdown with new networkdropdown
justjanne Jun 1, 2022
c7a4242
feat: Rename generic dropdown menu
justjanne Jun 1, 2022
4d81f68
feat: improve styling of GenericDropdownMenu
justjanne Jun 1, 2022
4079af5
feat: improve styling of network dropdown
justjanne Jun 1, 2022
76728ca
feat: clamp length of topic for public room results
justjanne Jun 1, 2022
a3ab9d3
feat: update translations
justjanne Jun 1, 2022
e33d045
fix: correct lint issues
justjanne Jun 1, 2022
ea9bdfe
fix: implement changes requested by design
justjanne Jun 2, 2022
4d4d3f1
fix: update i18n
justjanne Jun 2, 2022
c68886e
Merge branch 'develop' into justjanne/feat/21354-search-directories
justjanne Jun 2, 2022
6c5c79b
Merge branch 'develop' into justjanne/feat/21354-search-directories
justjanne Jun 3, 2022
60dd35b
Merge branch 'develop' into justjanne/feat/21354-search-directories
justjanne Jun 3, 2022
5897a0a
test: add unit test for useDebouncedSearch
justjanne Jun 3, 2022
cc98b3f
test: add unit test for useProfileInfo
justjanne Jun 3, 2022
4558898
Merge branch 'develop' into justjanne/feat/21354-search-directories
justjanne Jun 7, 2022
cff9201
Merge branch 'develop' into justjanne/feat/21354-search-directories
justjanne Jun 7, 2022
9d38a1d
feat: allow setting initial filter
justjanne Jun 3, 2022
d481930
fix: avoid unnecessary lookup
justjanne Jun 3, 2022
3acde35
fix: solve potential bug
justjanne Jun 3, 2022
b6295f6
fix(test): correct typo in test name
justjanne Jun 7, 2022
1fba8fe
test: expand test cases
justjanne Jun 7, 2022
cfd091c
test: create test cases for spotlight dialog
justjanne Jun 7, 2022
eb2aff8
fix(test): correct issues found by tests
justjanne Jun 7, 2022
8db559a
fix: prevent the result of a slower request overriding the result of …
justjanne Jun 7, 2022
cb716a8
fix: implement spacing as requested by design
justjanne Jun 7, 2022
29fa8b2
fix: don't show space results with filter enabled
justjanne Jun 7, 2022
02a74c5
fix: clear people filter if query is empty
justjanne Jun 7, 2022
e7fa720
fix: avoid duplicate import
justjanne Jun 7, 2022
b2405b0
fix: correct eslint issue
justjanne Jun 7, 2022
6a79651
feat: show suggestions for people filter with empty query
justjanne Jun 8, 2022
e7fc1ba
feat: extract member sort algorithm from InviteDialog
justjanne Jun 8, 2022
33af6db
feat: sort people suggestions correctly
justjanne Jun 8, 2022
cf1e2c5
fix: improve comments
justjanne Jun 8, 2022
4a8bd53
Merge remote-tracking branch 'origin/develop' into justjanne/feat/213…
justjanne Jun 8, 2022
8ea4a46
feat: make useDebouncedCallback more generic
justjanne Jun 10, 2022
a7b1559
test: add test for useLatestResult to prevent out-of-order results
justjanne Jun 10, 2022
c1f6b6d
test: add utility helper to enable labs features
justjanne Jun 10, 2022
9374b6d
fix: prevent unnecessary duplicate requests
justjanne Jun 10, 2022
a177386
fix: correct overflow of result titles
justjanne Jun 10, 2022
2748e82
test: initial cypress test
justjanne Jun 10, 2022
5063a92
fix: make it easier for debounced callback to be used safely
justjanne Jun 10, 2022
ea85fd9
Merge remote-tracking branch 'origin/develop' into justjanne/feat/213…
justjanne Jun 10, 2022
e1979ba
fix(test): correct bad import
justjanne Jun 10, 2022
e0a16f6
fix(test): use bundle for import instead
justjanne Jun 10, 2022
6994470
Introduce test case for finding public rooms
justjanne Jun 13, 2022
fbb56f5
Fix issue where people filter could not be removed via keyboard
justjanne Jun 13, 2022
41f4100
Correctly import visibility
justjanne Jun 13, 2022
b54e6ad
Correctly test name
justjanne Jun 13, 2022
a202e3c
Fix cypress test imports
justjanne Jun 13, 2022
bc1963f
Test known and unknown rooms and users
justjanne Jun 13, 2022
2732442
Test navigating and activating results
justjanne Jun 13, 2022
cdd9507
Add Todo comments for tomorrow
justjanne Jun 13, 2022
7da28f0
Merge remote-tracking branch 'origin/develop' into justjanne/feat/213…
justjanne Jun 14, 2022
765e67c
Test search result destinations as well
justjanne Jun 14, 2022
e587cb3
Implement changes requested by design: "Other Searches" heading
justjanne Jun 14, 2022
2cb252b
Update i18n
justjanne Jun 14, 2022
8c3ed24
Add additional tests
justjanne Jun 14, 2022
4bdbd25
Make eslint happy
justjanne Jun 14, 2022
63629a6
Test selecting/removing filters via keyboard as well
justjanne Jun 14, 2022
f008bc0
Rename keyboard navigation test
justjanne Jun 14, 2022
5328bf1
Update spotlight test number
justjanne Jun 14, 2022
b9c69b7
Merge remote-tracking branch 'origin/develop' into justjanne/feat/213…
justjanne Jun 15, 2022
1ec0e04
Implement loading indicator, requested by design
justjanne Jun 15, 2022
54ea843
ci: empty commit to force CI to run again
justjanne Jun 15, 2022
646ab8a
Fix issue that was responsible for flaky tests
justjanne Jun 15, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions res/css/_components.scss
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@
@import "./views/context_menus/_DeviceContextMenu.scss";
@import "./views/context_menus/_IconizedContextMenu.scss";
@import "./views/context_menus/_MessageContextMenu.scss";
@import "./views/context_menus/_NewDropdownMenu.scss";
@import "./views/dialogs/_AddExistingToSpaceDialog.scss";
@import "./views/dialogs/_Analytics.scss";
@import "./views/dialogs/_AnalyticsLearnMoreDialog.scss";
Expand Down Expand Up @@ -142,6 +143,7 @@
@import "./views/dialogs/security/_KeyBackupFailedDialog.scss";
@import "./views/dialogs/security/_RestoreKeyBackupDialog.scss";
@import "./views/directory/_NetworkDropdown.scss";
@import "./views/directory/_NewNetworkDropdown.scss";
@import "./views/elements/_AccessibleButton.scss";
@import "./views/elements/_AddressSelector.scss";
@import "./views/elements/_AddressTile.scss";
Expand Down
144 changes: 144 additions & 0 deletions res/css/views/context_menus/_NewDropdownMenu.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
/*
Copyright 2022 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_NewDropdownMenu_button {
padding: 3px 4px 3px 8px;
border-radius: 4px;
line-height: 1.5;
user-select: none;
font-size: 12px;
justjanne marked this conversation as resolved.
Show resolved Hide resolved
color: #737D8C;
justjanne marked this conversation as resolved.
Show resolved Hide resolved
}

.mx_NewDropdownMenu_button:hover,
.mx_NewDropdownMenu_button[aria-expanded=true] {
background: $quinary-content;
}

.mx_NewDropdownMenu_button::before {
content: "";
width: 18px;
height: 18px;
background: currentColor;
mask-image: url("$(res)/img/feather-customised/chevron-down.svg");
mask-size: 100%;
mask-repeat: no-repeat;
float: right;
}

.mx_ContextualMenu_wrapper.mx_NewDropdownMenu_header {
.mx_ContextualMenu {
position: initial;

span:first-of-type {
font-weight: $font-semi-bold;
font-size: inherit;
color: $primary-content;
}

font-size: $font-12px;
color: $secondary-content;
padding-top: 10px;
padding-bottom: 10px;

border: 1px solid $quinary-content;
box-shadow: 0px 1px 3px rgba(23, 25, 28, 0.05);
}

.mx_ContextualMenu_chevron_top {
left: auto;
right: 22px;
border-bottom-color: $quinary-content;

&::after {
content: "";
border: inherit;
border-bottom-color: $menu-bg-color;
position: absolute;
top: 1px;
left: -8px;
}
}

.mx_NewDropdownMenu_divider {
display: block;
height: 0;
margin-left: 4px;
margin-right: 19px;
border-top: 1px solid #F4F6FA;
}

.mx_NewDropdownMenu_OptionHeader, .mx_NewDropdownMenu_OptionItem {
> span:not(:first-of-type):not(:last-of-type) {
flex-grow: 1;
}
}

.mx_NewDropdownMenu_OptionHeader {
display: flex;
flex-grow: 1;
flex-direction: row;
align-items: center;
padding: 10px 20px 10px 30px;
position: relative;

> span:not(:first-of-type) {
margin-left: 4px;
color: $secondary-content;
}

> span:first-of-type {
font-size: $font-15px;
color: $primary-content;
}
}

.mx_NewDropdownMenu_OptionItem {
display: flex;
flex-grow: 1;
justify-content: space-between;
flex-direction: column;
padding: 10px 20px 10px 30px;
position: relative;

&:hover {
background-color: $event-selected-color;
}

&[aria-checked="true"] {
:first-child {
margin-left: -20px;
}

:first-child::before {
content: "";
width: 12px;
height: 12px;
margin-right: 8px;
mask-image: url("$(res)/img/feather-customised/check.svg");
mask-size: 100%;
mask-repeat: no-repeat;
background-color: $primary-content;
display: inline-block;
vertical-align: middle;
}
}

:last-child {
color: $secondary-content;
}
}
}
6 changes: 3 additions & 3 deletions res/css/views/dialogs/_InviteDialog.scss
Original file line number Diff line number Diff line change
Expand Up @@ -242,22 +242,22 @@ limitations under the License.
padding-right: 8px;
color: #ffffff; // this is fine without a var because it's for both themes

.mx_InviteDialog_userTile_avatar {
.mx_SearchResultAvatar {
border-radius: 20px;
position: relative;
left: -5px;
top: 2px;
}

img.mx_InviteDialog_userTile_avatar {
img.mx_SearchResultAvatar {
vertical-align: top;
}

.mx_InviteDialog_userTile_name {
vertical-align: top;
}

.mx_InviteDialog_userTile_threepidAvatar {
.mx_SearchResultAvatar_threepidAvatar {
background-color: #ffffff; // this is fine without a var because it's for both themes
}
}
Expand Down
Loading