Skip to content
This repository has been archived by the owner on Jun 10, 2021. It is now read-only.

Commit

Permalink
UAT feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
kyle-ssg committed Jun 10, 2018
1 parent b987497 commit 2a43f54
Show file tree
Hide file tree
Showing 14 changed files with 147 additions and 105 deletions.
2 changes: 2 additions & 0 deletions common/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ var Constants = {
"USERS": "Users Page"
},
strings: {
REMOTE_CONFIG_DESCRIPTION: "A feature that you can turn configure per environment or user. E.g. a font size for a banner or an environment variable for a server.",
FEATURE_FLAG_DESCRIPTION: "A feature that you can turn on or off per environment or user. E.g. instant messaging for a mobile app or an endpoint for an API.",
ORGANISATION_DESCRIPTION: "This is used to create a default organisation for team members to create and manage projects.",
ENVIRONMENT_DESCRIPTION: "Environments are versions of your projects, environments within a project all share the same features but can be individually turned on/off or have different values."
},
Expand Down
2 changes: 1 addition & 1 deletion env/project_prod.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module.exports = {
debug: false,
env: 'prod',
api:'https://bullet-train-api.dokku1.solidstategroup.com/api/v1/',
api:'https://api.bullet-train.io/api/v1/',
ga: 'UA-120237963-1',
demoAccount: {
email:"kyle+bullet-train@solidstategroup.com",
Expand Down
Binary file modified hero.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
39 changes: 27 additions & 12 deletions web/components/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default class App extends Component {
const {redirect} = this.props.location.query;


if (!AccountStore.getOrganisation() && document.location.href.indexOf('invite')==-1) { //If user has no organisation redirect to /create
if (!AccountStore.getOrganisation() && document.location.href.indexOf('invite') == -1) { //If user has no organisation redirect to /create
this.context.router.replace('/create');
return
}
Expand All @@ -39,25 +39,32 @@ export default class App extends Component {
};

render() {
const pageHasAside = this.props.params.environmentId;
const {projectId, environmentId} = this.props.params;
const pageHasAside = environmentId;
const redirect = this.props.location.query.redirect ? `?redirect=${this.props.location.query.redirect}` : "";

return (
<div>
<AccountProvider onNoUser={this.onNoUser} onLogout={this.onLogout} onLogin={this.onLogin}>
{({isLoading, user, organisation}) => (
{({isLoading, user, organisation}, {loginDemo}) => (
<div className={pageHasAside && "aside-body"}>
<nav className={"navbar navbar-fixed-top navbar-light " + (pageHasAside && "navbar-aside")}>
<div className="navbar-left">
<div className="navbar-nav">
<Link to={"/"} className="nav-item nav-item-brand nav-link">
<Row>
<img height={34} src={"/images/icon-light-2.png"}/>
Bullet Train
</Row>
</Link>
{!projectId && (
<Link to={user ? "/projects" : "/"}
className="nav-item nav-item-brand nav-link">
<Row>
<img title={"Bullet Train"} height={24}
src={"/images/bullet-train-black.svg"}/>
</Row>
</Link>
)}

</div>
</div>
<div className="navbar-right">
{user && (
{user ? (
<div className="flex-column org-nav">
<Popover className="popover-right"
renderTitle={(toggle) => organisation && (
Expand All @@ -80,17 +87,25 @@ export default class App extends Component {
}}/>
)}
<div>
<Link id="create-org-link" onClick={toggle} to="/create" >
<Link id="create-org-link" onClick={toggle} to="/create">
Create Organisation
</Link>
</div>

<a id="logout-link" href="#" onClick={() => AppActions.setUser(null)}
<a id="logout-link" href="#"
onClick={() => AppActions.setUser(null)}
to="exampleone">Logout</a>
</div>
)}
</Popover>
</div>
) : (
<ul className="nav-list dark list-unstyled">
<li><a onClick={loginDemo}>Demo</a></li>
<li><a target={"_blank"} href="https://docs.bullet-train.io/">Docs</a></li>
<li><Link to={`/login${redirect}`} className="bold-link login">Login <ion
className="ion-ios-arrow-dropright"/></Link></li>
</ul>
)}

</div>
Expand Down
24 changes: 24 additions & 0 deletions web/components/FeatureValue.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import React, {Component, PropTypes} from 'react';

const FeatureValue = class extends Component {
displayName: 'FeatureValue'

constructor(props, context) {
super(props, context);
this.state = {};
}

render() {
const type = typeof Utils.getTypedValue(this.props.value);
return (
<span className={"feature-value-container " + type} onClick={this.props.onClick}>
{type=="string"&&<span className={"quot"}>"</span>}<span
className={"feature-value"}>{this.props.value+""}</span>{type=="string"&&<span className={"quot"}>"</span>}
</span>
);
}
};

FeatureValue.propTypes = {};

module.exports = FeatureValue;
20 changes: 0 additions & 20 deletions web/components/Hero.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,26 +15,6 @@ const TheComponent = class extends React.Component {
const {onDemoClick} = this.props;
return (
<div>
<nav className={"navbar navbar-fixed-top navbar-light"}>
<div className="navbar-left">
<div className="navbar-nav">
<Link to={"/"} className="nav-item nav-item-brand nav-link">
<Row>
<img height={28} src={"/images/bullet-train-black.svg"}/>
</Row>
</Link>
</div>
</div>
<div className="navbar-right">
<div className="navbar-nav">
<ul className="nav-list dark list-unstyled">
<li><a onClick={this.props.onDemoClick}>Demo</a></li>
<li><a target={"_blank"} href="https://docs.bullet-train.io/">Docs</a></li>
<li><Link to={this.props.loginLink} className="bold-link login">Login <ion className="ion-ios-arrow-dropright"/></Link></li>
</ul>
</div>
</div>
</nav>
<div className={"hero"}>
<div className="col-md-6 col-xs-12">
<div className="col-md-8 push-md-4 text-left">
Expand Down
2 changes: 1 addition & 1 deletion web/components/Toolip.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const Tooltip = class extends React.Component {
render() {
return (
<span className="question-tooltip">
<span className="fa fa-question-circle" data-for={this.id} data-tip/>
{this.props.title ? <span data-for={this.id} data-tip>{this.props.title}</span> : <span className="ion ion-ios-help" data-for={this.id} data-tip/>}
<ReactTooltip id={this.id} place={this.props.place || "top"} type="dark" effect="solid">
{this.props.children}
</ReactTooltip>
Expand Down
14 changes: 10 additions & 4 deletions web/components/pages/FeaturesPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,14 @@ const TheComponent = class extends Component {
<div>
{projectFlags && projectFlags.length ? (
<div>
<h3>Features</h3>
<p>
View and manage <Tooltip title={<a href={"#"}>feature flags</a>}
place="right">{Constants.strings.FEATURE_FLAG_DESCRIPTION}</Tooltip> and {" "}
<Tooltip title={<a href={"#"}>remote config</a>}
place="right">{Constants.strings.REMOTE_CONFIG_DESCRIPTION}</Tooltip> for
your selected environment.
</p>
<FormGroup>
<PanelSearch
className={"no-pad"}
Expand Down Expand Up @@ -107,11 +115,9 @@ const TheComponent = class extends Component {
toggleFlag(i, environments)
})}/>
) : (
<span
<FeatureValue
onClick={() => this.editFlag(projectFlags[i], environmentFlags[id])}
className={"subtitle"}>
Value: <span className={"feature-value"}>{environmentFlags[id] && environmentFlags[id].feature_state_value + ""}</span>
</span>
value={environmentFlags[id] && environmentFlags[id].feature_state_value}/>
)}
</Column>
<Column>
Expand Down
5 changes: 2 additions & 3 deletions web/components/pages/HomePage.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ module.exports = class extends React.Component {
{({isLoading, isSaving, error}, {register, loginDemo}) => (
<div>
<Hero
onDemoClick={loginDemo}
loginLink={`/login${redirect}`}>
onDemoClick={loginDemo}>
{isLogin ? (
<div className="card signup-form container animated fadeIn col-md-8 col-xl-8">
<AccountProvider>
Expand Down Expand Up @@ -342,7 +341,7 @@ module.exports = class extends React.Component {
<footer className="homepage clearfix">
<div className="clearfix">
<div className="brand-footer float-left">
<img src="./images/bullet-train-1-mark.png" alt="Bullet Train" />
<img src="./images/icon-light-2.png" alt="Bullet Train" />
</div>
<ul className="float-right nav-list">
<li><a onClick={loginDemo}>Demo</a></li>
Expand Down
Loading

0 comments on commit 2a43f54

Please sign in to comment.