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

Release/1.0.0 rc.3 #93

Merged
merged 105 commits into from
Jun 4, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
105 commits
Select commit Hold shift + click to select a range
465a25d
Accessibility components added.
tuovinensanttu May 19, 2020
b41d991
OM-821 | Change translation sheet ID to point to the XO sheet
May 19, 2020
631df7e
Merge pull request #68 from City-of-Helsinki/change_translation_sheet_id
klempine May 19, 2020
3dc352a
Align close icon with title
Jokinen May 19, 2020
8f89d43
Display primary button first on mobile
Jokinen May 19, 2020
413168c
Label confirmation modal close button
Jokinen May 19, 2020
3ac2e25
Add more margin between buttons and content
Jokinen May 19, 2020
9d805ab
Activated accessibility footer link.
May 20, 2020
82c3429
Merge develop
May 20, 2020
9b42483
Resized titles.
May 20, 2020
09fa3e4
User session is saved in LocalStorage.
May 20, 2020
f108e5e
Hide logged in user functionality if user is not logged in
May 20, 2020
14b3b20
Change margins to hds spacing
May 20, 2020
32cec95
Phone number is now a link
May 20, 2020
f37eb95
Phone number is now a link
May 20, 2020
92c42a1
Merge pull request #69 from City-of-Helsinki/fix/om-807
Jokinen May 20, 2020
0d94480
Make buttons full width on mobile
Jokinen May 19, 2020
ad659a2
Fix whitespace of expanding boxes
Jokinen May 20, 2020
eca56de
Restyle profile information edit button
Jokinen May 20, 2020
596047c
Set language as last field
Jokinen May 20, 2020
1654b82
Render address on a single row
Jokinen May 20, 2020
36424fa
Use same styles for information and edit views
Jokinen May 20, 2020
6e654c7
Downloading data will happen with third party package.
May 20, 2020
d9329e8
Download button for testing.
May 20, 2020
e6ed723
Merge pull request #72 from City-of-Helsinki/fix/om-806-mobile-naviga…
May 20, 2020
bb191ec
Merge pull request #70 from City-of-Helsinki/feature/om-786-add-acces…
May 20, 2020
90497a0
Merge pull request #71 from City-of-Helsinki/fix/om-810-session-is-pr…
May 20, 2020
5df8cbb
Merge pull request #73 from City-of-Helsinki/fix/om-807
Jokinen May 20, 2020
772fe0f
Revert "OM-807 | Fix last style details on profile view page"
Jokinen May 20, 2020
fffc4b1
Merge pull request #75 from City-of-Helsinki/revert-73-fix/om-807
Jokinen May 20, 2020
5318a6c
Make buttons full width on mobile
Jokinen May 19, 2020
fbc3ab8
Fix whitespace of expanding boxes
Jokinen May 20, 2020
ae0d5d6
Restyle profile information edit button
Jokinen May 20, 2020
2190faa
Set language as last field
Jokinen May 20, 2020
30cd982
Render address on a single row
Jokinen May 20, 2020
9f24a43
Use same styles for information and edit views
Jokinen May 20, 2020
9f1ac45
Ignore undefined date parts
Jokinen May 20, 2020
ef7a35e
Fix alignment of confirmation modal close
Jokinen May 20, 2020
648182b
Use react flavoured attributes
Jokinen May 20, 2020
1106018
Add margin to terms
Jokinen May 20, 2020
85c75c2
Use ProfileSection for create form for consistency
Jokinen May 20, 2020
75990dd
Merge pull request #76 from City-of-Helsinki/fix/om-807
Jokinen May 22, 2020
9dcb55c
Align description better
Jokinen May 22, 2020
ca80204
Use blue colour for expand controls
Jokinen May 22, 2020
410c8ec
Use bigger title for main headings
Jokinen May 22, 2020
6a1f8ad
Add whitespace before title
Jokinen May 22, 2020
1082fa6
Fix language dropdown when locale data present
Jokinen May 22, 2020
3ccc0b9
Merge pull request #77 from City-of-Helsinki/fix/om-809
Jokinen May 22, 2020
2020f5f
Merge pull request #78 from City-of-Helsinki/fix/om-830
Jokinen May 22, 2020
f27a2d5
Remove testing button.
May 25, 2020
adf03ab
Merge pull request #74 from City-of-Helsinki/fix/om-808-mobile-downlo…
May 25, 2020
239ef2e
Fix sentry environment always pointing to production.
May 25, 2020
241b24e
Remove default value from sentry initialization.
May 25, 2020
97b6c48
Merge pull request #79 from City-of-Helsinki/fix/om-831-fix-sentry-co…
May 25, 2020
c07fed6
OM-783 | Update the text content
May 25, 2020
003bce0
Remove obsolete link
Jokinen May 25, 2020
2a893b4
Merge pull request #80 from City-of-Helsinki/change_translation_sheet_id
klempine May 25, 2020
b90ea01
Fix type error that resurfaces from time to time
Jokinen May 25, 2020
b6f4bd8
Stop in page content from overlapping with modals
Jokinen May 25, 2020
5017164
Merge pull request #81 from City-of-Helsinki/fix/om-843
Jokinen May 25, 2020
cd6c3e1
Fix silent renew
Jokinen May 27, 2020
d82e88d
Merge pull request #82 from City-of-Helsinki/fix/om-335
Jokinen May 28, 2020
3696a5c
Add support for multiple emails.
May 28, 2020
9e9a3da
Add translations.
May 28, 2020
d837560
Removed email field.
May 28, 2020
612145e
Added translations for additionalInfo.
May 28, 2020
c8db523
Added few tests for updateMutationVariables
May 28, 2020
933533f
Fixed button scaling & margi between additional emails.
May 28, 2020
5c1ee0b
Hide remove button if email is saved (support coming later)
May 28, 2020
936c1d6
Reformat function.
May 29, 2020
4634461
Values from HDS.
May 29, 2020
49340cb
Error handling & final fixes.
May 29, 2020
7694e54
Cleaned up error handling.
May 29, 2020
305eee2
Fix save and cancel buttons on iOS
May 29, 2020
91d8116
Merge pull request #84 from City-of-Helsinki/feature/om-723-multiple-…
May 29, 2020
e3c6149
Show all user emails in "Own information" view.
Jun 1, 2020
3456d45
OM-822 | Change the prod API URL to point to api.hel.fi/profiili
Jun 1, 2020
2d0e50b
Merge pull request #85 from City-of-Helsinki/feature/om-723-see-all-e…
Jun 1, 2020
8cc0a09
Merge pull request #86 from City-of-Helsinki/change_prod_api_url
klempine Jun 1, 2020
9eb40af
Removing emails is possible.
Jun 2, 2020
eb784cc
New PlusIcong svg.
Jun 2, 2020
118b978
Updated tests for email deletion.
Jun 2, 2020
af4dd50
Make emails readOnly.
Jun 2, 2020
576149e
Fetch services again after language is changed.
Jun 2, 2020
fa3879c
Added more margin between notification title and message.
Jun 2, 2020
005ec6f
Added links to dataProtection and fileDescription.
Jun 2, 2020
0281cb5
Merge pull request #88 from City-of-Helsinki/fix/om-829-confimation-d…
Jun 3, 2020
db0950e
Merge pull request #89 from City-of-Helsinki/fix/om-823-error-text-is…
Jun 3, 2020
7a42b62
Merge pull request #90 from City-of-Helsinki/chore/ym-631-update-term…
Jun 3, 2020
997631e
Minify svg
Jun 3, 2020
4a05032
Merge pull request #87 from City-of-Helsinki/feature/om-789-remove-em…
Jun 3, 2020
65390d0
User can change their primary email.
Jun 3, 2020
b7424f0
Update tests to match changes.
Jun 3, 2020
936e048
Improve email validation.
Jun 3, 2020
44804fa
Updated translations.
Jun 4, 2020
48f567c
Updated HDS. Renamed icons across project.
Jun 4, 2020
124178e
Hide additionalInformation if there is no multiple emails.
Jun 4, 2020
1c35478
Add Validator for email validation.
Jun 4, 2020
3610270
Merge pull request #91 from City-of-Helsinki/feature/om-795-user-can-…
Jun 4, 2020
83063a1
Application checks loginsso parameter and authenticates user
Jun 4, 2020
143bbbb
Fix test.
Jun 4, 2020
cafb44d
Fix import order
Jun 4, 2020
a109d43
Merge pull request #92 from City-of-Helsinki/fix/ym-223-redirect-stra…
Jun 4, 2020
dac610d
Merge branch 'develop' into release/1.0.0-rc.3
Jun 4, 2020
538083e
Change the version number to 1.0.0-rc.3
Jun 4, 2020
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
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ REACT_APP_OIDC_SCOPE="openid profile $REACT_APP_PROFILE_AUDIENCE"
REACT_APP_SENTRY_DSN="https://8b5b23e2171b42cd8617e2b1ad7353b6@sentry.hel.ninja/63"
REACT_APP_VERSION=$npm_package_version
TRANSLATION_LANGUAGES=en,fi,sv
TRANSLATIONS_SHEET_ID=1Q5LfG2wC_vxsoK0Ko-J1npWzY-96QQCERqMpvA0s9hg
TRANSLATIONS_SHEET_ID=1Ky-E1nJ_pRUYMoORobahOJ_IWucfL7kirBBLiA6r8zs
TRANSLATION_PROJECT_NAME=open-city-profile
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ build-production:
DOCKER_IMAGE_NAME: "$CI_PROJECT_NAME-production"
DOCKER_BUILD_ARG_REACT_APP_ENVIRONMENT: 'production'
DOCKER_BUILD_ARG_REACT_APP_OIDC_AUTHORITY: "https://api.hel.fi/sso/"
DOCKER_BUILD_ARG_REACT_APP_PROFILE_GRAPHQL: "https://profiili-api.prod.kuva.hel.ninja/graphql/"
DOCKER_BUILD_ARG_REACT_APP_PROFILE_GRAPHQL: "https://api.hel.fi/profiili/graphql/"
only:
refs:
- master
Expand Down
14 changes: 10 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "open-city-profile-ui",
"version": "1.0.0-rc.2",
"version": "1.0.0-rc.3",
"license": "MIT",
"private": true,
"dependencies": {
Expand All @@ -11,30 +11,35 @@
"@types/classnames": "^2.2.9",
"@types/enzyme": "^3.10.5",
"@types/enzyme-adapter-react-16": "^1.0.6",
"@types/file-saver": "^2.0.1",
"@types/jest": "24.0.19",
"@types/lodash": "^4.14.153",
"@types/node": "12.11.5",
"@types/react": "16.9.9",
"@types/react-dom": "16.9.2",
"@types/react-helmet": "^6.0.0",
"@types/react-modal": "^3.10.1",
"@types/react-redux": "^7.1.5",
"@types/react-router-dom": "^5.1.0",
"@types/validator": "^13.0.0",
"@types/yup": "^0.26.24",
"apollo-boost": "^0.4.4",
"classnames": "^2.2.6",
"date-fns": "^2.9.0",
"enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1.15.2",
"enzyme-to-json": "^3.4.4",
"file-saver": "^2.0.2",
"formik": "^2.0.4",
"graphql": "^14.5.8",
"graphql.macro": "^1.4.2",
"hds-core": "0.6.3",
"hds-design-tokens": "0.2.0",
"hds-react": "0.7.2",
"hds-core": "0.11.1",
"hds-design-tokens": "0.11.1",
"hds-react": "0.11.1",
"i18n-iso-countries": "^5.3.0",
"i18next": "^17.3.0",
"i18next-browser-languagedetector": "^4.0.1",
"lodash": "^4.17.15",
"oidc-client": "^1.9.1",
"react": "^16.11.0",
"react-dom": "^16.11.0",
Expand All @@ -48,6 +53,7 @@
"redux-oidc": "^3.1.5",
"redux-starter-kit": "^1.0.0",
"typescript": "^3.7.3",
"validator": "^13.0.0",
"yup": "^0.27.0"
},
"scripts": {
Expand Down
13 changes: 13 additions & 0 deletions public/silent_renew.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<script src="https://cdnjs.cloudflare.com/ajax/libs/oidc-client/1.10.1/oidc-client.min.js"></script>
<script>
var mgr = new Oidc.UserManager();
mgr.signinSilentCallback().catch(error => {
console.error('silent_renew.html error', error);
});
</script></body>
</html>
7 changes: 6 additions & 1 deletion src/App.test.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
import React from 'react';
import { shallow } from 'enzyme';
import { MemoryRouter } from 'react-router';

import App from './App';

it('renders without crashing', () => {
shallow(<App />);
shallow(
<MemoryRouter>
<App />
</MemoryRouter>
);
});
20 changes: 13 additions & 7 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from 'react';
import { useLocation } from 'react-router-dom';
import { Switch, Route } from 'react-router';
import { ApolloProvider } from '@apollo/react-hooks';
import { Provider as ReduxProvider } from 'react-redux';
Expand All @@ -18,9 +19,11 @@ import OidcCallback from './auth/components/oidcCallback/OidcCallback';
import Profile from './profile/components/profile/Profile';
import { fetchApiTokenThunk } from './auth/redux';
import ProfileDeleted from './profile/components/profileDeleted/ProfileDeleted';
import AccessibilityStatement from './accessibilityStatement/AccessibilityStatement';
import { MAIN_CONTENT_ID } from './common/constants';
import AccessibilityShortcuts from './common/accessibilityShortcuts/AccessibilityShortcuts';
import AppMeta from './AppMeta';
import authenticate from './auth/authenticate';

countries.registerLocale(fi);
countries.registerLocale(en);
Expand Down Expand Up @@ -51,6 +54,12 @@ if (process.env.REACT_APP_ENVIRONMENT !== 'production') {
type Props = {};

function App(props: Props) {
const location = useLocation();

if (location.pathname === '/loginsso') {
authenticate();
}

return (
<ReduxProvider store={store}>
<OidcProvider store={store} userManager={userManager}>
Expand All @@ -60,13 +69,6 @@ function App(props: Props) {
{/* This should be the first focusable element */}
<AccessibilityShortcuts mainContentId={MAIN_CONTENT_ID} />
<Switch>
<Route
path="/silent_renew"
render={() => {
userManager.signinSilentCallback();
return null;
}}
/>
<Route path="/callback">
<OidcCallback />
</Route>
Expand All @@ -79,9 +81,13 @@ function App(props: Props) {
>
<Profile />
</Route>
<Route path="/accessibility">
<AccessibilityStatement />
</Route>
<Route path="/profile-deleted" exact>
<ProfileDeleted />
</Route>
<Route path="/loginsso" exact />
<Route path="*">404 - not found</Route>
</Switch>
</MatomoProvider>
Expand Down
53 changes: 53 additions & 0 deletions src/accessibilityStatement/AccessibilityStatement.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
.pageWrapper {
min-height: 100vh;
height: 100%;
display: flex;
flex-direction: column;
}

.container {
margin: var(--spacing-layout-xs) var(--spacing-layout-2-xs) 0;
width: auto;
flex: 1 0 auto;
}

.innerWrapper {
width: auto;
margin-left: var(--spacing-xs);
margin-bottom: var(--spacing-layout-m);
}


.innerWrapper p {
margin: var(--spacing-layout-2-xs) 0;
}

.innerWrapper h1 {
font-size: var(--fontsize-h-3);
}

.innerWrapper h2 {
margin-top: var(--spacing-layout-xs);
font-size: var(--fontsize-h-4);
}

@media (min-width: 768px) {
.innerWrapper {
width: 768px;
}

.innerWrapper h1 {
font-size: var(--fontsize-h-2);
}

.innerWrapper h2 {
font-size: var(--fontsize-h-3);
}
}

@media (min-width: 1200px) {
.container {
margin: var(--spacing-layout-xs) auto 0;
width: 1130px;
}
}
42 changes: 42 additions & 0 deletions src/accessibilityStatement/AccessibilityStatement.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import React from 'react';
import { useTranslation } from 'react-i18next';

import styles from './AccessibilityStatement.module.css';
import Header from '../common/header/Header';
import Footer from '../common/footer/Footer';
import AccessibilityStatementFi from './AccessibilityStatementFi';
import AccessibilityStatementSv from './AccessibilityStatementSv';
import AccessibilityStatementEn from './AccessibilityStatementEn';

function AccessibilityStatement() {
const { i18n } = useTranslation();
const selectStatement = () => {
const lang =
i18n.languages[0].length > 2
? i18n.languages[0].substr(0, 2)
: i18n.languages[0];

switch (lang) {
case 'fi':
return <AccessibilityStatementFi />;
case 'sv':
return <AccessibilityStatementSv />;
case 'en':
return <AccessibilityStatementEn />;
default:
return <div>Invalid language.</div>;
}
};

return (
<div className={styles.pageWrapper}>
<Header />
<div className={styles.container}>
<div className={styles.innerWrapper}>{selectStatement()}</div>
</div>
<Footer />
</div>
);
}

export default AccessibilityStatement;
89 changes: 89 additions & 0 deletions src/accessibilityStatement/AccessibilityStatementEn.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
import React, { Fragment } from 'react';

function AccessibilityStatementEn() {
return (
<Fragment>
<h1>Accessibility Statement</h1>
<p>
This accessibility statement applies to the website Youth membership
registration. The site address is https://hel.fi/profiili
</p>
<h2>Statutory provisions applicable to the website</h2>
<p>
This website was published after 23 September 2018. The website must
fulfil statutory accessibility requirements.
</p>
<h2>The objective of the city</h2>
<p>
As regards the accessibility of digital services, Helsinki aims to reach
at least Level AA or above as set forth in the WCAG guidelines in so far
as is reasonably practical.
</p>
<h2>Compliance status</h2>
<p>
The accessibility compliance of this website has not yet been evaluated.
</p>
<h2>Preparing an accessibility statement</h2>
<p>This statement was prepared on 6.4.2020</p>
<h2>Updating the accessibility statement</h2>
<p>
The accessibility statement will be updated so that it corresponds with
the observations related to accessibility compliance made during an
audit.
</p>

<h2>Requesting information in an accessible format</h2>
<p>
If a user feels that content on a website is not available in an
accessible format, they can request for this information by e-mail at{' '}
<a href="mailto:helsinki.palaute@hel.fi">helsinki.palaute@hel.fi</a> or
through the feedback form at{' '}
<a href="https://www.hel.fi/feedback">www.hel.fi/feedback</a>. The aim
is to reply to the enquiry within a reasonable time frame.{' '}
</p>

<h2>Feedback and contact information</h2>
<p>
City Executive Office, Helsinki
<br />
<a href="tel:+35893101641">+358 9 310 1641</a>
</p>

<h2>The City of Helsinki and accessibility</h2>
<p>
The objective of the city of Helsinki is to be an accessible city to
all. Helsinki aims to ensure that all residents are able to move about
and act as effortlessly as possible and that all content and services
are accessible to all.
</p>

<p>
The city promotes accessibility of digital services by streamlining
publishing work and organising accessibility-related training for its
staff.
</p>
<p>
The accessibility level of websites is monitored constantly during their
maintenance. Immediate action will be taken if deficiencies are found.
The aim is to carry out the necessary amendments as quickly as possible.
</p>

<h2>The disabled and users of assistive technologies</h2>
<p>
The city provides counselling and support for the disabled and users of
assistive technologies. Support is available on guidance sites announced
on the city’s website and through telephone counselling.
</p>

<h2>Approval of the accessibility statement</h2>
<p>This statement was approved on 17.4.2020</p>
<p>
City Executive Office
<br />
City of Helsinki
</p>
</Fragment>
);
}

export default AccessibilityStatementEn;
Loading