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

Intro texts and small UX improvements #1338

Merged
merged 32 commits into from Jun 14, 2019
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
1b3921e
refactor: move jumbotron up
Macroz May 31, 2019
43ba4e2
feat: introductory text in login
Macroz May 31, 2019
84071a7
feat: catalogue page intro texts
Macroz May 31, 2019
c363821
style: more margin to the top of h2
Macroz May 31, 2019
6e3715e
style: login jumbo to match content size with margin
Macroz Jun 4, 2019
18debab
style: catalogue intro
Macroz Jun 4, 2019
2b9be01
style: margin for h1
Macroz Jun 4, 2019
0d7533c
feat: application intro
Macroz Jun 4, 2019
9cc6892
style: center login page content
Macroz Jun 6, 2019
2eaaf0f
refactor: application-state component
Macroz Jun 6, 2019
d646a2d
refactor: use info-fields for application state
Macroz Jun 6, 2019
6fb1cce
feat: simplify extra translations
Macroz Jun 6, 2019
d2ab59e
feat: improved login style and text
Macroz Jun 6, 2019
0563f37
feat: cart intro
Macroz Jun 6, 2019
e2c2401
style: improved existing application intro
Macroz Jun 6, 2019
9b1f018
tune: slightly improved texts
Macroz Jun 12, 2019
daf0ba3
fix: wrong fn
Macroz Jun 12, 2019
089c533
feat: show external id on application page
Macroz Jun 12, 2019
d514590
feat: administration intro
Macroz Jun 12, 2019
fb99ad5
fix: document title
Macroz Jun 12, 2019
eb27e2f
feat: change document title to shorten
Macroz Jun 12, 2019
cd86354
fix: browser test
Macroz Jun 12, 2019
cecfa94
Merge remote-tracking branch 'origin/master' into intro
Macroz Jun 14, 2019
7886361
fix: use configured value for id
Macroz Jun 14, 2019
7694ce8
tune: shorter text
Macroz Jun 14, 2019
3fff9ef
tune: Finnish text
Macroz Jun 14, 2019
0fd04e3
tune: improved shorter English
Macroz Jun 14, 2019
3e8356b
tune: shorten by removing extra term existing
Macroz Jun 14, 2019
6fb842c
tune: shorter better text
Macroz Jun 14, 2019
dc89383
tune: text
Macroz Jun 14, 2019
55d7cbb
fix: remove colon and %
Macroz Jun 14, 2019
408f546
tune: use colon
Macroz Jun 14, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion example-theme/extra-translations/fi.edn
Expand Up @@ -7,5 +7,6 @@
:header "%1 kielivaraa korissa"}
:catalogue {:catalogue "Kielivarat"
:header "Kielivarat"
:intro "Tällä sivulla on listattuna kaikki kielivarat joita voit tästä järjestelmästä hakea."
:apply-resources "Hae uusia kielivaroja"}
:navigation {:catalogue "Kielivarat"}}}
:navigation {:catalogue "Kielivarat"}}}
7 changes: 6 additions & 1 deletion resources/translations/en.edn
Expand Up @@ -124,6 +124,7 @@
:returned "Changes requested"
:submitted "Applied"
:unknown "Unknown"}
:intro [:div.intro [:p "By filling and sending in this application, all the applicants may be granted the applied resources. All the applicable licenses must also be accepted before or after applying."]]
:my-applications "My Applications"
:state "State"
:states {:approved "Approved"
Expand All @@ -133,7 +134,7 @@
:returned "Returned"
:submitted "Applied"
:unknown "Unknown"}
:latest-activity "Latest activity %1"
:latest-activity "Latest activity: %1"
Macroz marked this conversation as resolved.
Show resolved Hide resolved
:view "View"}
:autocomplete {:no-results "No results"
:placeholder "Choose or type"}
Expand All @@ -144,8 +145,10 @@
:remove "Remove"}
:catalogue {:catalogue "Catalogue"
:header "Resource"
:intro [:p "The catalogue contains all the resources that you can apply for in this system."]
:more-info "More info"
:continue-existing-application "Continue existing application"
:continue-existing-application-intro "You have existing unfinished applications that you can continue from here."
:apply-resources "Apply for resources"}
:collapse {:show-less "Show less"
:show-more "Show more"}
Expand Down Expand Up @@ -262,6 +265,8 @@
:link {:download-file "Download file"
:opens-in-new-window "Opens in new window"}
:login {:alternative "Other sign in options"
:intro [:div [:h1 "Welcome to REMS"] [:p "This is a demo environment for testing the REMS software."]
[:p "Please, login first to access REMS."]]
:text "Login by using your Haka credentials"
:title "Login"}
:missing "Missing translation %1"
Expand Down
7 changes: 6 additions & 1 deletion resources/translations/fi.edn
Expand Up @@ -124,6 +124,7 @@
:returned "Palautettu muokattavaksi"
:submitted "Haettu"
:unknown "Tuntematon"}
:intro [:div.intro [:p "Täyttämällä ja lähettämällä tämän hakemuksen, kaikki hakijat voivat saada oikeuden haettuihin resursseihin. Kaikkien on sen lisäksi hyväksyttävä kaikki käyttöehdot viimeistään hakemuksen käsittelyn jälkeen saadakseen käyttöoikeudet."]]
:my-applications "Omat hakemukset"
:state "Tila"
:states {:approved "Hyväksytty"
Expand All @@ -133,7 +134,7 @@
:returned "Palautettu"
:submitted "Haettu"
:unknown "Tuntematon"}
:latest-activity "Viimeisin toimenpide %1"
:latest-activity "Viimeisin toimenpide: %1"
Macroz marked this conversation as resolved.
Show resolved Hide resolved
:view "Näytä"}
:autocomplete {:no-results "Ei tuloksia"
:placeholder "Valitse tai kirjoita"}
Expand All @@ -144,8 +145,10 @@
:remove "Poista"}
:catalogue {:catalogue "Aineistoluettelo"
:header "Aineistoluettelo"
:intro [:p "Aineistoluettelossa on listattuna kaikki resurssit joita voit tästä järjestelmästä hakea."]
:more-info "Lisätietoja"
:continue-existing-application "Jatka hakemusta"
:continue-existing-application-intro "Sinulla on keskeneräisiä hakemuksia, joita voit jatkaa tästä."
:apply-resources "Hae uusia resursseja"}
:collapse {:show-less "Näytä vähemmän"
:show-more "Näytä lisää"}
Expand Down Expand Up @@ -262,6 +265,8 @@
:link {:download-file "Lataa tiedosto"
:opens-in-new-window "Aukeaa uuteen ikkunaan"}
:login {:alternative "Muut kirjautumisvaihtoehdot"
:intro [:div [:h1 "Tervetuloa REMSiin"] [:p "Tämä on demo-ympäristö, joka on tarkoitettu REMS-ohjelmiston kokeilemiseen."]
[:p "Ole hyvä ja kirjaudu sisään ensin."]]
:text "Kirjaudu sisään Haka-tunnuksillasi"
:title "Kirjaudu sisään"}
:missing "Käännös puuttuu %1"
Expand Down
8 changes: 5 additions & 3 deletions src/clj/rems/css/styles.clj
Expand Up @@ -281,6 +281,7 @@
[:h1 :h2 {:font-weight 400}]
[:h1 :h2 :h3 {:letter-spacing (u/rem 0.17)}]
[:h4 :h5 :h6 {:letter-spacing (u/rem 0.12)}]
[:h1 {:margin-bottom (u/rem 2)}]
[:#app {:min-height (u/percent 100)
:flex 1
:display :flex}]
Expand Down Expand Up @@ -463,16 +464,16 @@
[:.jumbotron
{:background-color "#fff"
:text-align "center"
:max-width (u/px 420)
:margin "30px auto"
:color "#000"
:margin-top (u/rem 2)
:border-style "solid"
:border-width (u/px 1)
:box-shadow (util/get-theme-attribute :collapse-shadow :table-shadow)}
[:h1 {:margin-bottom (u/px 20)}]]
[:.login-btn {:max-height (u/px 70)
:margin-bottom (u/px 20)}
[:&:hover {:filter "brightness(80%)"}]]
[:.login-component {:max-width (u/px 420)}]
(generate-rems-table-styles)
[:.btn.disabled {:opacity 0.25}]
[:.catalogue-item-link {:color "#fff"
Expand Down Expand Up @@ -577,6 +578,7 @@
[:.new-form-field-option {:text-align "center"}]

[:.full {:width "100%"}]
[:.intro {:margin-bottom (u/rem 2)}]
[:.rectangle {:width (u/px 50)
:height (u/px 50)}]
[:.color-1 {:background-color (util/get-theme-attribute :color1)}]
Expand Down Expand Up @@ -634,7 +636,7 @@
(-> (util/get-theme-attribute :color1)
(c/saturate -50)
(c/lighten 33)))}]
[:h2 {:margin [[(u/rem 1) 0]]}]
[:h2 {:margin [[(u/rem 3) 0 (u/rem 1) 0]]}]

;; application list
[:.rems-table
Expand Down
13 changes: 7 additions & 6 deletions src/cljs/rems/application.cljs
Expand Up @@ -389,7 +389,7 @@
{:phase :approve :text :t.phases/approve}
{:phase :result :text :t.phases/approved}]))

(defn- application-header [application]
(defn- application-state [application]
(let [state (:application/state application)
last-activity (:application/last-activity application)
event-groups (->> (:application/events application)
Expand All @@ -402,13 +402,13 @@
(map #(map format-event %)))]
[collapsible/component
{:id "header"
:title [:span#application-state
(str
(text :t.applications/state)
(str ": " (localize-state state)))]
:title (text :t.applications/state)
:always (into [:div
[:div.mb-3 {:class (str "state-" (name state))}
(phases (get-application-phases state))]
[:h3#application-state
(str (text :t.applications/state) ": ")
(localize-state state)]
[:h3 (text-format :t.applications/latest-activity (localize-time last-activity))]]
(when-let [g (first event-groups)]
(into [[:h3 (text :t.form/events)]]
Expand Down Expand Up @@ -581,8 +581,9 @@
[:div
[:div {:class "float-right"} [pdf-button (:application/id application)]]
[document-title (text :t.applications/application)]
(text :t.applications/intro)
(into [:div] messages)
[application-header application]
[application-state application]
[:div.mt-3 [applicants-info application]]
[:div.mt-3 [applied-resources application userid]]
[:div.my-3 [application-fields application edit-application]]
Expand Down
15 changes: 9 additions & 6 deletions src/cljs/rems/auth/auth.cljs
Expand Up @@ -6,12 +6,15 @@

(defn login-component []
(let [config @(rf/subscribe [:rems.config/config])
alternative-endpoint (:alternative-login-url config)]
(case (:authentication config)
:shibboleth (shibboleth/login-component alternative-endpoint)
:fake-shibboleth (shibboleth/login-component alternative-endpoint)
:ldap (ldap/login-component)
nil)))
alternative-endpoint (:alternative-login-url config)
login-component (case (:authentication config)
:shibboleth (shibboleth/login-component alternative-endpoint)
:fake-shibboleth (shibboleth/login-component alternative-endpoint)
:ldap (ldap/login-component)
nil)]
(when login-component
[:div.jumbotron.login-component
login-component])))

(defn guide []
[:div
Expand Down
2 changes: 1 addition & 1 deletion src/cljs/rems/auth/ldap.cljs
Expand Up @@ -3,7 +3,7 @@
[rems.text :refer [text]]))

(defn login-component []
[:div.jumbotron
[:div
[document-title (text :t.ldap/title)]
[:form
{:action "/ldap/login" :method "post"}
Expand Down
2 changes: 1 addition & 1 deletion src/cljs/rems/auth/shibboleth.cljs
Expand Up @@ -5,7 +5,7 @@
[rems.text :refer [text]]))

(defn login-component [alternative-endpoint]
[:div.jumbotron
[:div
[document-title (text :t.login/title)]
[:p (text :t.login/text)]
[:div.col-md6
Expand Down
2 changes: 2 additions & 0 deletions src/cljs/rems/catalogue.cljs
Expand Up @@ -100,6 +100,7 @@
(when (seq @(rf/subscribe [applications]))
[:div
[:h2 (text :t.catalogue/continue-existing-application)]
(text :t.catalogue/continue-existing-application-intro)
[application-list/component
{:id applications
:applications applications
Expand All @@ -126,6 +127,7 @@
loading-drafts? @(rf/subscribe [::loading-drafts?])]
[:div
[document-title (text :t.catalogue/catalogue)]
(text :t.catalogue/intro)
(if (or loading-catalogue? loading-drafts?)
[spinner/big]
[:div
Expand Down
8 changes: 7 additions & 1 deletion src/cljs/rems/spa.cljs
Expand Up @@ -191,7 +191,13 @@
(do
(rf/dispatch [:rems.catalogue/enter-page])
[catalogue-page])
[auth/login-component]))
[:div
[:div.row.justify-content-center
[:div.col-md-6.row.justify-content-center
(text :t.login/intro)]]
[:div.row.justify-content-center
[:div.col-md-6.row.justify-content-center
[auth/login-component]]]]))

(defn unauthorized-page []
[:div
Expand Down