Open platform to collect and prioritize feedback
enhancement: minor UI changes (#390)
Guilherme Oenningd7c589f8a120
diff --git a/app/actions/idea.go b/app/actions/idea.goindex d847c1362..45d808bdc 100644--- a/app/actions/idea.go+++ b/app/actions/idea.go@@ -33,16 +33,14 @@ func (input *CreateNewIdea) Validate(user *models.User, services *app.Services)if input.Model.Title == "" {result.AddFieldFailure("title", "Title is required.")+ } else if len(input.Model.Title) < 10 || len(strings.Split(input.Model.Title, " ")) < 3 {+ result.AddFieldFailure("title", "Title needs to be more descriptive.")}if len(input.Model.Title) > 100 {result.AddFieldFailure("title", "Title must be less than 100 characters.")}- if len(input.Model.Title) < 10 || len(strings.Split(input.Model.Title, " ")) < 3 {- result.AddFieldFailure("title", "Title needs to be more descriptive.")- }-idea, err := services.Ideas.GetBySlug(slug.Make(input.Model.Title))if err != nil && errors.Cause(err) != app.ErrNotFound {return validate.Error(err)@@ -81,9 +79,7 @@ func (input *UpdateIdea) Validate(user *models.User, services *app.Services) *vaif input.Model.Title == "" {result.AddFieldFailure("title", "Title is required.")- }-- if len(input.Model.Title) < 10 || len(strings.Split(input.Model.Title, " ")) < 3 {+ } else if len(input.Model.Title) < 10 || len(strings.Split(input.Model.Title, " ")) < 3 {result.AddFieldFailure("title", "Title needs to be more descriptive.")}diff --git a/app/pkg/web/renderer.go b/app/pkg/web/renderer.goindex 101f1d03e..10f4c097e 100644--- a/app/pkg/web/renderer.go+++ b/app/pkg/web/renderer.go@@ -71,12 +71,12 @@ func (r *Renderer) getBundle(folder string) string {return files[0].Name()}- //During Test run, don't panic if bundle is not available- if env.IsTest() {- return ""+ // Panic if bundle is not available in production mode+ if env.IsProduction() {+ panic(fmt.Sprintf("Bundle not found: %s.", folder))}- panic(fmt.Sprintf("Bundle not found: %s.", folder))+ return ""}//Render a template based on parametersdiff --git a/public/assets/styles/main.scss b/public/assets/styles/main.scssindex e84f9a8c3..e194d0454 100644--- a/public/assets/styles/main.scss+++ b/public/assets/styles/main.scss@@ -10,9 +10,7 @@ html,body {height: 100%;}-html {- font-size: 14px;-}+body {margin: 0px;padding: 0px;@@ -72,7 +70,7 @@ h5:last-child {p {margin: 0 0 14px;- line-height: 18px;+ line-height: 130%;}p:first-child {margin-top: 0;@@ -139,6 +137,12 @@ a:hover {Others*******************************/+#root {+ height: 100%;+ display: flex;+ flex-direction: column;+}+.center {text-align: center;}@@ -153,6 +157,7 @@ a:hover {}.page {+ flex: 1 0 auto;margin-top: 30px;}@@ -199,7 +204,7 @@ h1, h2, h3, h4, h5 {.subtitle {font-size: $font-size-mini;- margin-bottom: 5px;+ margin: 10px 0 5px 0;font-weight: 600;letter-spacing: .3px;text-transform: uppercase;@@ -208,14 +213,20 @@ h1, h2, h3, h4, h5 {&.active {cursor: pointer;&:hover {- i {- color: $main-color;- }+ color: $main-color;}i {float: right;}}++ &:first-child {+ margin-top: 0;+ }++ &:last-child {+ margin-bottom: 0;+ }}.markdown-body {diff --git a/public/assets/styles/variables.scss b/public/assets/styles/variables.scssindex 726ff440c..c53d3c7d4 100644--- a/public/assets/styles/variables.scss+++ b/public/assets/styles/variables.scss@@ -24,6 +24,7 @@ $gray-lightest: rgba(0,0,0,.03);$gray-lighter: #eee;$gray-light: #d5d5d5;$gray: #d5d5d5;+$gray-dark: rgba(0, 0, 0, 0.3);$gray-darker: rgba(0, 0, 0, 0.4);$gray-darkest: rgba(0, 0, 0, 0.5);$green: #15CD72;diff --git a/public/components/common/Button.scss b/public/components/common/Button.scssindex 998e484d3..1a51365a6 100644--- a/public/components/common/Button.scss+++ b/public/components/common/Button.scss@@ -1,6 +1,8 @@@import '~@fider/assets/styles/variables.scss';.c-button {+ -webkit-appearance: none;+ appearance: none;line-height: 1.15;display: inline-block;cursor: pointer;diff --git a/public/components/common/Footer.scss b/public/components/common/Footer.scssindex 953491ebe..11158d61d 100644--- a/public/components/common/Footer.scss+++ b/public/components/common/Footer.scss@@ -1,14 +1,17 @@@import '~@fider/assets/styles/variables.scss';#c-footer {+ flex-shrink: 0;+ height: 70px;+ margin-top: 20px;+div {text-align: center;font-size: 11px;border-top: 1px solid $gray-lighter;- padding: 20px;- margin: 20px;a {+ margin-top: 10px;color: rgba($text-color, 0.5);display: inline-block;span {diff --git a/public/components/common/Header.scss b/public/components/common/Header.scssindex 89b8f9b80..f5b778a0e 100644--- a/public/components/common/Header.scss+++ b/public/components/common/Header.scss@@ -75,10 +75,19 @@margin-left: auto !important;margin-bottom: 0;+ > span {+ font-weight: 600;+ text-transform: uppercase;+ color: #999;+ }+&:hover {- color: $text-color;+ > span {+ color: $text-color;+ }}+.c-menu-user {display: none;position: absolute;diff --git a/public/components/common/Header.tsx b/public/components/common/Header.tsxindex e3eafca98..7da481dad 100644--- a/public/components/common/Header.tsx+++ b/public/components/common/Header.tsx@@ -73,11 +73,6 @@ export class Header extends React.Component<HeaderProps, HeaderState> {);const showRightMenu = this.props.user || !this.props.tenant.isPrivate;- const profileMenuClassName = classSet({- "c-menu-item-signin": true,- subtitle: !this.props.user- });-return (<div id="c-header"><EnvironmentInfo system={this.props.system} />@@ -89,10 +84,10 @@ export class Header extends React.Component<HeaderProps, HeaderState> {<span>{this.props.tenant.name}</span></a>{showRightMenu && (- <div onClick={this.showModal} className={profileMenuClassName}>+ <div onClick={this.showModal} className="c-menu-item-signin">{this.props.user && <Gravatar user={this.props.user} />}{this.state.unreadNotifications > 0 && <div className="c-unread-dot" />}- {!this.props.user && "Sign in"} {this.props.user && <i className="dropdown icon" />}+ {!this.props.user && <span>Sign in</span>} {this.props.user && <i className="dropdown icon" />}{items}</div>)}diff --git a/public/components/common/SignInControl.scss b/public/components/common/SignInControl.scssindex 3bc910a6e..a1570e379 100644--- a/public/components/common/SignInControl.scss+++ b/public/components/common/SignInControl.scss@@ -1,4 +1,5 @@.c-signin-control {+ text-align: center;.l-social-col {padding: 10px 5px;}diff --git a/public/components/common/form/Form.scss b/public/components/common/form/Form.scssindex 1f7e02f9f..a8868776d 100644--- a/public/components/common/form/Form.scss+++ b/public/components/common/form/Form.scss@@ -38,6 +38,8 @@input[type=text],textarea,select {+ -webkit-appearance: none;+ appearance: none;width: 100%;padding: 10px;outline: 0;@@ -149,14 +151,14 @@}::placeholder {- color: $gray;+ color: $gray-dark;opacity: 1;}:-ms-input-placeholder {- color: $gray;+ color: $gray-dark;}::-ms-input-placeholder {- color: $gray;+ color: $gray-dark;}\ No newline at end of filediff --git a/public/pages/Home/Home.page.tsx b/public/pages/Home/Home.page.tsxindex 0bc6662e9..2d25b64a8 100644--- a/public/pages/Home/Home.page.tsx+++ b/public/pages/Home/Home.page.tsx@@ -53,7 +53,7 @@ export class HomePage extends React.Component<HomePageProps, HomePageState> {/><IdeaInputuser={this.props.user}- placeholder={this.props.tenant.invitation || "I suggest you..."}+ placeholder={this.props.tenant.invitation || "Enter your idea here..."}onTitleChanged={title => this.setState({ title })}/></div>diff --git a/public/pages/Home/components/IdeaInput.tsx b/public/pages/Home/components/IdeaInput.tsxindex 6b00a2951..e5a55f956 100644--- a/public/pages/Home/components/IdeaInput.tsx+++ b/public/pages/Home/components/IdeaInput.tsx@@ -83,7 +83,7 @@ export class IdeaInput extends React.Component<IdeaInputProps, IdeaInputState> {onChange={description => this.onDescriptionChanged(description)}value={this.state.description}minRows={5}- placeholder="Describe your idea"+ placeholder="Describe your idea (optional)"/><Button color="positive" onClick={e => this.submit(e)}>Submitdiff --git a/public/pages/ShowIdea/ShowIdea.page.scss b/public/pages/ShowIdea/ShowIdea.page.scssindex 9ee047d10..ffd881624 100644--- a/public/pages/ShowIdea/ShowIdea.page.scss+++ b/public/pages/ShowIdea/ShowIdea.page.scss@@ -1,10 +1,6 @@@import '~@fider/assets/styles/variables.scss';#p-show-idea {-- .subtitle {- margin-top: 1em;- }.idea-header {width: 100%;@@ -34,13 +30,14 @@}.header-col {- margin-bottom: 5px;+ margin-bottom: 20px;.c-list-item {display: flex;}}.action-col {+ margin-bottom: 20px;@include media(">=md") {width: 200px;}diff --git a/public/pages/ShowIdea/ShowIdea.page.tsx b/public/pages/ShowIdea/ShowIdea.page.tsxindex 58ea51fd7..3196796f7 100644--- a/public/pages/ShowIdea/ShowIdea.page.tsx+++ b/public/pages/ShowIdea/ShowIdea.page.tsx@@ -104,10 +104,12 @@ export class ShowIdeaPage extends React.Component<ShowIdeaPageProps, ShowIdeaPagonChange={newDescription => this.setState({ newDescription })}/></Form>- ) : this.props.idea.description ? (- <MultiLineText className="description" text={this.props.idea.description} style="simple" />) : (- <p className="description">This idea doesn't have a description.</p>+ <MultiLineText+ className="description"+ text={this.props.idea.description || "No description provided."}+ style="simple"+ />)}<ShowIdeaResponse status={this.props.idea.status} response={this.props.idea.response} />diff --git a/views/base.html b/views/base.htmlindex 65cbf2069..a73231295 100644--- a/views/base.html+++ b/views/base.html@@ -13,7 +13,9 @@<meta property="og:url" content="{{ .currentURL }}" /><meta property="og:image" content="{{ .__logo }}">{{ if .tenant }}- <link rel="stylesheet" href="/custom/{{ .tenant.CustomCSS | md5 }}.css" />+ {{ if .tenant.CustomCSS }}+ <link rel="stylesheet" href="/custom/{{ .tenant.CustomCSS | md5 }}.css" />+ {{ end }}{{ end }}</head><body>