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

Status.im theme #5578

Merged
merged 57 commits into from
Nov 13, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
6fa2d35
support concept of default theme
ara4n Oct 20, 2017
cd31e65
initial wip theme
ara4n Oct 20, 2017
b28192c
fix (C)
ara4n Oct 22, 2017
01b3d61
move status theme into a dedicated dir, and make fonts work
ara4n Oct 22, 2017
190811a
WIP
ara4n Oct 22, 2017
b053f08
switch to a LoginPage wrapper component
ara4n Oct 24, 2017
73e7fe2
finishish login page
ara4n Oct 25, 2017
29cfbba
tweak error layout
ara4n Oct 25, 2017
eedcda1
add dotty background
ara4n Oct 25, 2017
9d86716
remove non-overridden stuff, and add dot svg
ara4n Oct 25, 2017
79a9f21
get rid of hardcoded font
ara4n Oct 25, 2017
953398b
statusify main chat
ara4n Oct 25, 2017
a152eba
fix panel-divider-color
ara4n Oct 25, 2017
ea19096
skin all the buttons
ara4n Oct 25, 2017
f86b616
status homepage
ara4n Oct 26, 2017
225c7ee
Merge branch 'develop' into matthew/status
ara4n Oct 26, 2017
6212e80
spell out fonts
ara4n Oct 26, 2017
13c1829
fix droptarget
ara4n Oct 26, 2017
ebbb677
Update telegram link
dbkr Oct 26, 2017
8f0f34e
fix buttons in other skins
ara4n Oct 26, 2017
a8f2980
coc
ara4n Oct 26, 2017
e5b1ded
fix default colour of loginbox text
ara4n Oct 26, 2017
ad9d786
tweak emptySubListTip visuals
ara4n Oct 26, 2017
b9cf2c6
remove 'return to app' test
ara4n Oct 26, 2017
ca74b09
fix fugly noperm error
ara4n Oct 26, 2017
50b348c
try for slightly prettier redaction
ara4n Oct 26, 2017
468f8cc
dirty hack to make FF work
ara4n Oct 26, 2017
26d142f
fix snafu on login submit button
ara4n Oct 26, 2017
1798bff
cosmetic fixes & hoverovers
ara4n Oct 27, 2017
b65ee5f
tg hoverover
ara4n Oct 27, 2017
3ffebfb
fix spacing of login aux buttons
ara4n Oct 27, 2017
ca00924
tweak spacing for login
ara4n Oct 27, 2017
c26aaa8
revert previous & fix font size
ara4n Oct 27, 2017
ce2d40b
more tweaks from Denis
ara4n Oct 27, 2017
7e9b638
fix visited state of links
ara4n Oct 27, 2017
d469634
fix more visited state of links
ara4n Oct 27, 2017
8ad9728
css for HS userid warnings
ara4n Oct 27, 2017
b9e2b59
Merge remote-tracking branch 'origin/develop' into matthew/status
dbkr Oct 27, 2017
5063fef
Redirect to instructions page if user on mobile
dbkr Oct 27, 2017
b87fad9
get rid of hardcoded colour >:(
ara4n Oct 27, 2017
5d3caf8
tweak badges
ara4n Oct 27, 2017
1b7e42f
add og:image
ara4n Oct 31, 2017
df58bdd
use absolute url for og:image
ara4n Oct 31, 2017
8f28951
fix chevron cosmetics
ara4n Nov 1, 2017
8ef3811
Merge branch 'develop' into matthew/status
ara4n Nov 1, 2017
9232959
Merge branch 'develop' into matthew/status
ara4n Nov 3, 2017
adedf23
remove unnamespaced CSS fail
ara4n Nov 4, 2017
9a0bbfb
tint the colours in the theme rather than hardcode vector green
ara4n Nov 4, 2017
816042d
Merge branch 'develop' into matthew/status
ara4n Nov 4, 2017
555847e
make default theme actually work
ara4n Nov 5, 2017
d14285e
fix secondary accent color tinting
ara4n Nov 5, 2017
d4128af
Merge remote-tracking branch 'origin/develop' into matthew/status
ara4n Nov 8, 2017
2fa1f16
use new theme-aware tinter api
ara4n Nov 8, 2017
47d9e7f
Merge remote-tracking branch 'origin/develop' into matthew/status
ara4n Nov 10, 2017
5abee4f
replace some of the status.im theme with general config options
ara4n Nov 11, 2017
0a80774
unstatusify redirects
ara4n Nov 13, 2017
809dd08
add more fixmes
ara4n Nov 13, 2017
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: 6 additions & 0 deletions config.sample.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{
"default_hs_url": "https://matrix.org",
"default_is_url": "https://vector.im",
"disable_custom_urls": false,
"disable_guests": false,
"disable_login_language_selector": false,
"disable_3pid_login": false,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note to self: These should be pulled into GranularSettings when it lands

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

decided to not make these granular - they are app-level anyways and affect people who aren't logged in, so granularity isn't feasible.

"brand": "Riot",
"integrations_ui_url": "https://scalar.vector.im/",
"integrations_rest_url": "https://scalar.vector.im/api",
Expand All @@ -10,6 +14,8 @@
"feature_pinning": "labs"
},
"default_federate": true,
"welcomePageUrl": "home.html",
"default_theme": "light",
"roomDirectory": {
"servers": [
"matrix.org"
Expand Down
68 changes: 68 additions & 0 deletions docs/skinning thoughts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
== Skinning refactor ==

matrix-react-sdk
- base images
- base CSS
- all the components needed to build a workable app (including the top layer)

riot-web: the riot skin
- riot-specific classes (e.g. login header/footer)
- riot-specific themes
- light
- dark

i.e. the only things which should go into riot-web are bits which apply vector-specific skinning
specifically "Stuff that any other brand would not want to use. (e.g. riot logos, links, T&Cs)"
- Questions:
- Electron app? (should probably be a separate repo in its own right? but might as well go here for now)
- index.html & index.js? (should be in matrix-react-sdk, given the SDK is useless without them?)

ideally matrix-react-sdk itself should ship with a default skin which actually works built in.

status skin (can go in the same app for now)
- has status theme
- which inherits from riot light theme
- how do we share graphics between skins?
- shove them into react-sdk, or...
- guess we do ../../vector/img
- this means keeping the skin name in the images (unless /img is a shortcut to the right skin's images)

out of scope:
- making the components more independent, so they can be used in isolation.
- that said, the bits which should probably be used by being embeded into a different app:
- login/reg
- RoomView + RoomSettings
- MessageComposer
- RoomList
- MemberList
- MemberInfo
- Voip UI
- UserSettings
- sharing different js-sdks between the different isolated modules

other changes:
- how do we handle i18n?
- each skin should really be its own i18n project. As long as all the commonality stuff is in matrix-react-sdk this shouldn't be too bad.
- ability to associate components with a given skin
- skins/vector/src <-- components
- skins/vector/css
- skins/vector/img
- skins/vector/fonts
- gather together themes (per skin) into a single place too
- skins/vector/themes/foo/css
- skins/vector/themes/foo/img
- skins/vector/themes/foo/fonts
- ideally riot-web would contain almost nothing but skins/vector directory.
- ability to entirely replace CSS rather than override it for a given theme
- e.g. if we replace `Login.js` with `StatusLogin.js`, then we should similarly be able to replace `_Login.scss` with `_StatusLogin.scss`.

random thoughts;
- should we be able to change the entire skin at runtime (more like wordpress) - to the extent of replacing entire components?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about color pickers for now? Not like just tint but changing different parts of the Design without needing to change the code

- might pose security issues if a theme can be swapped out to replace MatrixChat or other fundamental functionality at runtime
- if so, perhaps skins & themes should converge...

-----------------

Immediate plan for Status:
* Implement it as a theme for the riot skin
* Ideally move skins to a sensible level (possibly even including src?)
192 changes: 192 additions & 0 deletions res/home-status.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,192 @@
<style type="text/css">

/* we deliberately inline style here to avoid flash-of-CSS problems, and to avoid
* voodoo where we have to set display: none by default
*/

.mx_HomePage_container {
text-align: center;
display: block ! important;
width: 690px;
margin: 20px;
}

.mx_HomePage_header {
margin-top: 37px;
margin-left: 10px;
width: 670px;
box-sizing: border-box;
font-size: 18px;
background-color: #fff;
box-shadow: 0px 2px 10px 0px rgba(48,55,81,0.05);
border-radius: 5px;
padding: 20px 80px 20px 80px;
align-items: center;
}

.mx_HomePage_header h1 {
font-size: 29px;
margin-bottom: 10px;
}

.mx_HomePage_intro h2 {
margin-top: 32px;
font-size: 25px;
color: #49555F;
}

.mx_HomePage_intro {
margin: auto;
width: 600px;
margin-top: 40px;
margin-bottom: 40px;
font-size: 18px;
}

.mx_HomePage_coc {
font-size: 16px;
}

.mx_HomePage_coc a {
color: #4360DF;
}

.mx_HomePage_room, .mx_HomePage_telegram {
float: left;
background-color: #fff;
box-shadow: 0px 2px 10px 0px rgba(48,55,81,0.05);
border-radius: 5px;
margin: 10px;
width: 210px;
height: 250px;
display: flex;
flex-direction: column;
align-items: center;
}

.mx_HomePage_telegram {
background-color: transparent;
border: 1px solid rgba(113, 129, 142, 0.2);
box-shadow: none;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
font-size: 16px;
line-height: 25px;
box-sizing: border-box;
}

.mx_HomePage_telegram a {
text-transform: uppercase;
color: #4360DF;
font-size: 13px;
font-family: PostGrotesk-Medium, Arial, Helvetica, Sans-Serif;
font-weight: 600;
opacity: 1.0;
transition: opacity .2s ease;
}

.mx_HomePage_telegram a:hover {
opacity: 0.5;
}

.mx_HomePage_room .mx_HomePage_icon {
margin-top: 24px;
margin-bottom: 16px;
width: 50px;
height: 50px;
}

.mx_HomePage_room .mx_HomePage_name {
display: block;
font-family: PostGrotesk-Medium, Arial, Helvetica, Sans-Serif;
font-weight: 600;
font-size: 15px;
color: #49555F;
line-height: 25px;
margin: 0px 12px 0px 12px;
}

.mx_HomePage_room .mx_HomePage_desc {
flex: 1;
display: block;
margin: 0px 12px 0px 12px;
font-size: 14px;
line-height: 20px;
}

.mx_HomePage_button {
align-self: normal;
margin: 12px;
border-radius: 8px;
border: 1px solid rgba(199, 206, 209, 0.12);
background-color: #6CC1F6;
font-size: 13px;
font-family: PostGrotesk-Medium, Arial, Helvetica, Sans-Serif;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 1px;
color: #fff ! important;
cursor: pointer;
outline: none;
padding: 14px;
box-sizing: border-box;
padding-left: 1.5em;
padding-right: 1.5em;
}

</style>

<div class="mx_HomePage_container">
<div class="mx_HomePage_header">
<div>
<h1>Welcome to Status Community Chat, powered by Riot.</h1>
<p>For contributors, developers and Ethereum-enthusiasts who care about the movement for decentralization.</p>
</div>
</div>

<div class="mx_HomePage_intro">
<h2>Our rooms</h2>
<p>Please abide by the channels discussion categories and remain on topic to the specific category details listed.</p>
<p class="mx_HomePage_coc">Before posting please refer to our <a href="https://wiki.status.im/Code_of_conduct">Code of Conduct</a></p>
</div>


<div class="mx_HomePage_room">
<img class="mx_HomePage_icon" src="themes/status/img/a.png">
<span class="mx_HomePage_name">#announcements</span>
<span class="mx_HomePage_desc">Company wide announcements.</span>
<a class="mx_HomePage_button" href="#/room/#announcements:status.im">Join</a>
</div>
<div class="mx_HomePage_room">
<img class="mx_HomePage_icon" src="themes/status/img/i.png">
<span class="mx_HomePage_name">#introductions</span>
<span class="mx_HomePage_desc">Newcomer introductions.</span>
<a class="mx_HomePage_button" href="#/room/#introductions:status.im">Join</a>
</div>
<div class="mx_HomePage_room">
<img class="mx_HomePage_icon" src="themes/status/img/g.png">
<span class="mx_HomePage_name">#general</span>
<span class="mx_HomePage_desc">General discussions of Status.</span>
<a class="mx_HomePage_button" href="#/room/#general:status.im">Join</a>
</div>
<div class="mx_HomePage_room">
<img class="mx_HomePage_icon" src="themes/status/img/d.png">
<span class="mx_HomePage_name">#dev-status</span>
<span class="mx_HomePage_desc">Contributing to our codebase? Building a DApp or a chatbot? We're here to help.</span>
<a class="mx_HomePage_button" href="#/room/#dev-status:status.im">Join</a>
</div>
<div class="mx_HomePage_room">
<img class="mx_HomePage_icon" src="themes/status/img/n.png">
<span class="mx_HomePage_name">#news-articles</span>
<span class="mx_HomePage_desc">Share news, articles related to Ethereum or projects you're excited about</span>
<a class="mx_HomePage_button" href="#/room/#news-articles:status.im">Join</a>
</div>
<div class="mx_HomePage_telegram">
<p>
Interested in market and cryptocurrency type discussions?
</p>
<a href="https://t.me/StatusNetworkChat">Join Telegram</a>
</div>
</div>
3 changes: 2 additions & 1 deletion scripts/copy-res.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,11 @@ const INCLUDE_LANGS = [
const COPY_LIST = [
["res/manifest.json", "webapp"],
["res/home.html", "webapp"],
["res/home-status.html", "webapp"],
["res/home/**", "webapp/home"],
["res/{media,vector-icons}/**", "webapp"],
["res/flags/*", "webapp/flags/"],
["src/skins/vector/{fonts,img}/**", "webapp"],
["src/skins/vector/{fonts,img,themes}/**", "webapp"],
["node_modules/emojione/assets/svg/*", "webapp/emojione/svg/"],
["node_modules/emojione/assets/png/*", "webapp/emojione/png/"],
["./config.json", "webapp", { directwatch: 1 }],
Expand Down
2 changes: 1 addition & 1 deletion src/components/views/globals/NewVersionBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export default React.createClass({
const QuestionDialog = sdk.getComponent('dialogs.QuestionDialog');
Modal.createTrackedDialog('Display release notes', '', QuestionDialog, {
title: _t("What's New"),
description: <pre className="changelog_text">{releaseNotes}</pre>,
description: <div className="mx_MatrixToolbar_changelog">{releaseNotes}</div>,
button: _t("Update"),
onFinished: (update) => {
if(update && PlatformPeg.get()) {
Expand Down
4 changes: 4 additions & 0 deletions src/components/views/login/VectorLoginFooter.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ limitations under the License.

var React = require('react');
import { _t } from 'matrix-react-sdk/lib/languageHandler';
import UserSettingsStore from 'matrix-react-sdk/lib/UserSettingsStore';

module.exports = React.createClass({
displayName: 'VectorLoginFooter',
Expand All @@ -26,6 +27,9 @@ module.exports = React.createClass({
},

render: function() {
// FIXME: replace this with a proper Status skin
if (UserSettingsStore.getTheme() === 'status') return <div/>;

return (
<div className="mx_Login_links">
<a href="https://medium.com/@RiotChat">blog</a>&nbsp;&nbsp;&middot;&nbsp;&nbsp;
Expand Down
6 changes: 4 additions & 2 deletions src/components/views/login/VectorLoginHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,10 @@ module.exports = React.createClass({

render: function() {
return (
<div className="mx_Login_logo">
<img src={this.props.icon || DEFAULT_LOGO_URI} alt="Riot"/>
<div className="mx_Login_header">
<div className="mx_Login_logo">
<img src={this.props.icon || DEFAULT_LOGO_URI} alt="Riot"/>
</div>
</div>
);
}
Expand Down
2 changes: 1 addition & 1 deletion src/header
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2015, 2016 OpenMarket Ltd
Copyright 2017 New Vector Ltd

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
Loading