Skip to content
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

Fix issues with the Create new room button in Spotlight #8851

Merged
merged 4 commits into from
Jun 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 3 additions & 3 deletions src/components/views/dialogs/spotlight/SpotlightDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ limitations under the License.
*/

import classNames from "classnames";
import { sum } from "lodash";
import { capitalize, sum } from "lodash";
import { WebSearch as WebSearchEvent } from "@matrix-org/analytics-events/types/typescript/WebSearch";
import { IHierarchyRoom } from "matrix-js-sdk/src/@types/spaces";
import { IPublicRoomsChunkRoom, MatrixClient, RoomMember } from "matrix-js-sdk/src/matrix";
Expand Down Expand Up @@ -741,11 +741,11 @@ const SpotlightDialog: React.FC<IProps> = ({ initialText = "", initialFilter = n
onClick={() => defaultDispatcher.dispatch({
action: 'view_create_room',
public: true,
defaultName: trimmedQuery,
defaultName: capitalize(trimmedQuery),
})}
>
<span className="mx_AccessibleButton mx_AccessibleButton_hasKind mx_AccessibleButton_kind_primary_outline">
{ _t("Create new Room") }
{ _t("Create new room") }
</span>
</Option>
</div>
Expand Down
3 changes: 1 addition & 2 deletions src/i18n/strings/en_EN.json
Original file line number Diff line number Diff line change
Expand Up @@ -2810,7 +2810,7 @@
"Copy invite link": "Copy invite link",
"Some results may be hidden": "Some results may be hidden",
"If you can't find the room you're looking for, ask for an invite or create a new room.": "If you can't find the room you're looking for, ask for an invite or create a new room.",
"Create new Room": "Create new Room",
"Create new room": "Create new room",
"Other options": "Other options",
"Start a group chat": "Start a group chat",
"Other searches": "Other searches",
Expand Down Expand Up @@ -3082,7 +3082,6 @@
"remove %(name)s from the directory.": "remove %(name)s from the directory.",
"delete the address.": "delete the address.",
"The server may be unavailable or overloaded": "The server may be unavailable or overloaded",
"Create new room": "Create new room",
"No results for \"%(query)s\"": "No results for \"%(query)s\"",
"Try different words or check for typos. Some results may not be visible as they're private and you need an invite to join them.": "Try different words or check for typos. Some results may not be visible as they're private and you need an invite to join them.",
"Find a room…": "Find a room…",
Expand Down