Skip to content

Commit

Permalink
Initial mobile improvements, including chat/list switch
Browse files Browse the repository at this point in the history
  • Loading branch information
octospacc committed Dec 26, 2023
1 parent c0535a9 commit 492c344
Show file tree
Hide file tree
Showing 13 changed files with 79 additions and 11 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Build and Deploy

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

workflow_dispatch:

jobs:
page_build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Build
run: |
sudo apt update
sudo apt install -y node npm
sudo npm install -g yarn
cd matrix-js-sdk
yarn link
yarn install
cd ..
cd matrix-react-sdk
yarn link
yarn link matrix-js-sdk
yarn install
cd ..
cd element-web
yarn link matrix-js-sdk
yarn link matrix-react-sdk
yarn install
yarn build
- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: element-web/webapp
6 changes: 3 additions & 3 deletions element-web/src/components/views/auth/VectorAuthPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default class VectorAuthPage extends React.PureComponent {
private static welcomeBackgroundUrl?: string;

// cache the url as a static to prevent it changing without refreshing
private static getWelcomeBackgroundUrl(): string {
/*private static getWelcomeBackgroundUrl(): string {
if (VectorAuthPage.welcomeBackgroundUrl) return VectorAuthPage.welcomeBackgroundUrl;
const brandingConfig = SdkConfig.getObject("branding");
Expand All @@ -40,11 +40,11 @@ export default class VectorAuthPage extends React.PureComponent {
}
return VectorAuthPage.welcomeBackgroundUrl;
}
}*/

public render(): React.ReactElement {
const pageStyle = {
background: `center/cover fixed url(${VectorAuthPage.getWelcomeBackgroundUrl()})`,
//background: `center/cover fixed url(${VectorAuthPage.getWelcomeBackgroundUrl()})`,
};

const modalStyle: React.CSSProperties = {
Expand Down
6 changes: 5 additions & 1 deletion matrix-react-sdk/res/css/_common.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ legend {
font-size: $font-15px;
position: relative;
padding: 24px;
max-height: 80%;
//max-height: 80%;
box-shadow: 2px 15px 30px 0 $dialog-shadow-color;
border-radius: 8px;
overflow-y: auto;
Expand Down Expand Up @@ -417,6 +417,10 @@ legend {
max-width: 704px;
}

//.mx_LargeDialog {
// height: 100vh;
//}

.mx_Dialog_background {
position: fixed;
top: 0;
Expand Down
4 changes: 3 additions & 1 deletion matrix-react-sdk/res/css/structures/_LeftPanel.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ limitations under the License.
.mx_LeftPanel_outerWrapper {
display: flex;
flex-direction: column;
max-width: 50%;
//max-width: 50%;
width: 100vw;
position: relative;

/* Contain the amount of layers rendered by constraining what actually needs re-layering via css */
Expand All @@ -47,6 +48,7 @@ limitations under the License.
display: flex;
overflow: hidden;
position: relative;
width: 100% !important;

&[data-collapsed] {
max-width: var(--collapsedWidth);
Expand Down
4 changes: 4 additions & 0 deletions matrix-react-sdk/res/css/structures/_MatrixChat.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ limitations under the License.

flex: 1;
min-height: 0;

.mx_ResizeHandle {
display: none;
}
}

.mx_MatrixChat_syncError {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ limitations under the License.
*/

.mx_CompleteSecurityBody {
width: 600px;
//width: 600px;
color: $authpage-primary-color;
background-color: $background;
border-radius: 4px;
Expand Down
3 changes: 2 additions & 1 deletion matrix-react-sdk/res/css/views/dialogs/_SettingsDialog.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ limitations under the License.
width: 90vw;
max-width: 1000px;
/* set the height too since tabbed view scrolls itself. */
height: 80vh;
//height: 80vh;
height: 100vh;

.mx_TabbedView {
top: 65px;
Expand Down
4 changes: 2 additions & 2 deletions matrix-react-sdk/src/components/structures/HomePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ const HomePage: React.FC<IProps> = ({ justRegistered = false }) => {
);
}

return (
return (<div/>/*
<AutoHideScrollbar className="mx_HomePage mx_HomePage_default" element="main">
<div className="mx_HomePage_default_wrapper">
{introSection}
Expand All @@ -136,7 +136,7 @@ const HomePage: React.FC<IProps> = ({ justRegistered = false }) => {
</div>
</div>
</AutoHideScrollbar>
);
*/);
};

export default HomePage;
4 changes: 4 additions & 0 deletions matrix-react-sdk/src/components/structures/TabbedView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import * as React from "react";
import classNames from "classnames";
import { logger } from "matrix-js-sdk/src/logger";

import AccessibleButton from "../views/elements/AccessibleButton";
import { _t, TranslationKey } from "../../languageHandler";
import AutoHideScrollbar from "./AutoHideScrollbar";
import { PosthogScreenTracker, ScreenName } from "../../PosthogTrackers";
Expand Down Expand Up @@ -139,6 +140,9 @@ export default class TabbedView<T extends string> extends React.Component<IProps
const id = this.getTabId(tab);
return (
<div className="mx_TabbedView_tabPanel" key={id} id={id} aria-labelledby={`${id}_label`}>
<AccessibleButton
className="mx_BaseCard_back"
/>
<AutoHideScrollbar className="mx_TabbedView_tabPanelContent">{tab.body}</AutoHideScrollbar>
</div>
);
Expand Down
4 changes: 2 additions & 2 deletions matrix-react-sdk/src/components/views/auth/AuthHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ interface IProps {

export default class AuthHeader extends React.Component<IProps> {
public render(): React.ReactNode {
return (
return (<div/>) /*(
<div className="mx_AuthHeader">
<AuthHeaderLogo />
<LanguageSelector disabled={this.props.disableLanguageSelector} />
</div>
);
)*/;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import HelpUserSettingsTab from "../settings/tabs/user/HelpUserSettingsTab";
import MjolnirUserSettingsTab from "../settings/tabs/user/MjolnirUserSettingsTab";
import { UIFeature } from "../../../settings/UIFeature";
import BaseDialog from "./BaseDialog";
//import LargeDialog from "./LargeDialog";
import SidebarUserSettingsTab from "../settings/tabs/user/SidebarUserSettingsTab";
import KeyboardUserSettingsTab from "../settings/tabs/user/KeyboardUserSettingsTab";
import SessionManagerTab from "../settings/tabs/user/SessionManagerTab";
Expand Down
10 changes: 10 additions & 0 deletions matrix-react-sdk/src/components/views/rooms/LegacyRoomHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -841,6 +841,7 @@ export default class RoomHeader extends React.Component<IProps, IState> {
action: Action.ViewUserSettings,
initialTabId: UserTab.Labs,
});

const betaPill = isVideoRoom ? (
<BetaPill onClick={viewLabs} tooltipTitle={_t("labs|video_rooms_beta")} />
) : null;
Expand All @@ -851,6 +852,15 @@ export default class RoomHeader extends React.Component<IProps, IState> {
className="mx_LegacyRoomHeader_wrapper"
aria-owns={this.state.rightPanelOpen ? "mx_RightPanel" : undefined}
>
<AccessibleButton
className="mx_LegacyRoomHeader_button mx_BaseCard_back"
onClick={()=>{
document.getElementsByClassName('mx_LeftPanel_outerWrapper')[0].style.display="";
defaultDispatcher.dispatch<ViewRoomPayload>({
action: Action.ViewHomePage,
});
}}
/>
<div className="mx_LegacyRoomHeader_avatar">{roomAvatar}</div>
{icon}
{name}
Expand Down
1 change: 1 addition & 0 deletions matrix-react-sdk/src/components/views/rooms/RoomTile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ export class RoomTile extends React.PureComponent<ClassProps, State> {
metricsTrigger: "RoomList",
metricsViaKeyboard: ev.type !== "click",
});
document.getElementsByClassName('mx_LeftPanel_outerWrapper')[0].style.display="none";
};

private onActiveRoomUpdate = (isActive: boolean): void => {
Expand Down

0 comments on commit 492c344

Please sign in to comment.