Skip to content
This repository was archived by the owner on May 25, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
19512c0
Merge pull request #169 from inrupt/release/0.5.0
james-martin-jd May 22, 2019
ddf0461
Update index.css
james-martin-jd May 23, 2019
b1c63a3
Adding css overrides to the styleguide for the login provider dropdown
james-martin-jd May 23, 2019
eed44e5
Fixing margin and color on registration success page
james-martin-jd May 23, 2019
f01cf58
Merge pull request #172 from inrupt/bug/success-page
james-martin-jd May 23, 2019
bc74045
Merge pull request #171 from inrupt/bug/provider-list
james-martin-jd May 23, 2019
3326fc9
Updating text and fixing image predicate
james-martin-jd May 29, 2019
649348b
Merge pull request #173 from inrupt/bug/text-and-image
pablo-rodriguez-jd May 29, 2019
00ee607
Removing 'image' predicate for profile picture
pablo-rodriguez-jd May 29, 2019
7c5da74
Merge pull request #174 from inrupt/bug-fix/header-hasPhoto-predicate
james-martin-jd May 29, 2019
52352e2
multiple image upload while on welcome page
pablo-rodriguez-jd May 29, 2019
78758c1
Merge pull request #175 from inrupt/bug-fix/welcome-image-uploader
james-martin-jd May 29, 2019
4054825
Updating components version
james-martin-jd May 31, 2019
429a1fe
Updating package-lock
james-martin-jd May 31, 2019
b41c682
Adding autosave
james-martin-jd May 31, 2019
29fe569
Adding autosave again
james-martin-jd May 31, 2019
30bab46
added language on shexForm
jairo-campos-JD Jun 4, 2019
b832ed9
Updating components version
james-martin-jd Jun 4, 2019
85de16c
Merge pull request #179 from inrupt/feature/form-language
james-martin-jd Jun 4, 2019
7ab9dda
fixed liveupdate
jairo-campos-JD Jun 4, 2019
84eb455
auto save true
jairo-campos-JD Jun 4, 2019
33aadca
Merge pull request #181 from inrupt/fix/live-update
pablo-rodriguez-jd Jun 4, 2019
74b9f3a
Updating package version
james-martin-jd Jun 4, 2019
71d9c0a
Triggering a build
james-martin-jd Jun 4, 2019
0c47998
Updating changelog and version
james-martin-jd Jun 5, 2019
51be609
Updating components
james-martin-jd Jun 5, 2019
bec9644
Updating components
james-martin-jd Jun 5, 2019
cbb35aa
Updating version
james-martin-jd Jun 5, 2019
30913af
Merge branch 'master' into release/0.5.1
james-martin-jd Jun 5, 2019
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
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
# Solid React Application Generator

## 0.5.1 (June 5, 2019)

#### Solid React Application Base

##### Updated
* Profile form now autosaves
* Profile form now liveupdates when the form data changes from another source
* New error messages (and translations) added for the new profile form
* Latest version of solid-react-components

##### Fixed
* Login Provider list is now properly left-aligned instead of center-aligned
* Registration page title is now the proper color and is no longer underneath the top nav
* Profile image predicate now matches the Solid data browser profile image predicate
* Uploading multiple profile images from the welcome page now properly uses the latest uploaded file (previously was only using first uploaded file)


## 0.5.0 (May 22, 2019)

#### Solid React Application Base
Expand Down
12 changes: 6 additions & 6 deletions generators/app/templates/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion generators/app/templates/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"@fortawesome/free-brands-svg-icons": "^5.8.0",
"@fortawesome/free-solid-svg-icons": "^5.6.3",
"@fortawesome/react-fontawesome": "^0.1.4",
"@inrupt/solid-react-components": "^0.4.0",
"@inrupt/solid-react-components": "^0.4.2",
"@inrupt/solid-style-guide": "^0.1.34",
"@rdfjs/data-model": "^1.1.1",
"@solid/query-ldflex": "^2.4.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@
"unsupported": "Unsupported media type",
"maximumFiles": "Sorry, you have exceeded the maximum number of files allowed per upload"
},
"deleteNotification": "Clicking ‘Remove’ will delete the associated element immediately. There is no undo."
"autosaveNotification": "Profile changes are saved immediately. There is no undo.",
"warningResolution": "Field value has been updated to:",
"minMxNumberInclusive": "Error: Min and max should be ",
"minMxNumberExclusive": "Error: Min and max value should be ",
"minMaxString": "Error: Min and max should be ",
"defaultError": "Error: Field value has wrong format"
}
}
7 changes: 6 additions & 1 deletion generators/app/templates/public/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@
"unsupported": "Unsupported media type",
"maximumFiles": "Sorry, you have exceeded the maximum number of files allowed per upload"
},
"deleteNotification": "Clicking ‘Remove’ will delete the associated element immediately. There is no undo."
"autosaveNotification": "Profile changes are saved immediately. There is no undo.",
"warningResolution": "Field value has been updated to:",
"minMxNumberInclusive": "Error: Min and max should be ",
"minMxNumberExclusive": "Error: Min and max value should be ",
"minMaxString": "Error: Min and max should be ",
"defaultError": "Error: Field value has wrong format"
}
}
7 changes: 6 additions & 1 deletion generators/app/templates/public/locales/es/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@
"unsupported": "Formato no soportado",
"maximumFiles": "Disculpe, has excedido la cantidad máxima de archivos permitidos por subida"
},
"deleteNotification": "Dar click a 'Eliminar' borraría el elemento asociado inmediatamente. No hay vuelta atrás."
"autosaveNotification": "Cambios realizados en el Perfil son guardados automáticamente. No se puede deshacer.",
"warningResolution": "El valor del campo se ha actualizado a ",
"minMxNumberInclusive": "Error: Mínimo y máximo debería ser ",
"minMxNumberExclusive": "Error: Mínimo y máximo debería ser ",
"minMaxString": "Error: Mínimo y máximo debería ser ",
"defaultError": "Error: Formato incorrecto"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ class AuthNavBarContainer extends Component {
* for more information please go to: https://github.com/digitalbazaar/jsonld.js
*/
const userName = await user.name;
let userImage = await user.image;
userImage = userImage ? userImage : await user.vcard_hasPhoto;
const userImage = await user.vcard_hasPhoto;
const name = userName ? userName.value : "";
const image = userImage ? userImage.value : "/img/icon/empty-profile.svg";
this.setState({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { useState, useEffect } from 'react';
import data from '@solid/query-ldflex';
import { Uploader, useLiveUpdate } from '@inrupt/solid-react-components';
import { useTranslation } from 'react-i18next';

import { namedNode } from "@rdfjs/data-model";
import { ImageProfile } from '@components';

type Props = {
Expand Down Expand Up @@ -35,7 +35,7 @@ export const Image = ({ webId, toastManager, defaultProfilePhoto }: Props) => {
* if you want to know more about context please go to:
* https://github.com/digitalbazaar/jsonld.js
*/
const image = (await user.image) || (await user.vcard_hasPhoto);
const image = await user.vcard_hasPhoto;

setImage(image && image.value);
}
Expand All @@ -55,7 +55,7 @@ export const Image = ({ webId, toastManager, defaultProfilePhoto }: Props) => {
try {
const { user } = data;

await user.image.set(uri);
await user.vcard_hasPhoto.set(namedNode(uri));

toastManager.add(['', t('profile.uploadSuccess')], {
appearance: 'success',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
ProfileContainer,
ProfileWrapper,
ShexForm,
DeleteNotification,
AutoSaveNotification,
WebId,
} from './profile.style';
import { Image } from './components';
Expand Down Expand Up @@ -59,12 +59,12 @@ const Profile = ({ toastManager }) => {
/>
</Header>

<DeleteNotification className="banner-wrap--warning banner">
<AutoSaveNotification className="banner-wrap--warning banner">
<div className="banner-wrap__content">
<i className="icon fa fa-exclamation-circle" />
{t('profile.deleteNotification')}
{t('profile.autosaveNotification')}
</div>
</DeleteNotification>
</AutoSaveNotification>

<ShexForm>
<WebId>
Expand Down Expand Up @@ -101,9 +101,17 @@ const Profile = ({ toastManager }) => {
dropdownDefaultText: t(
'profile.dropdownDefaultText'
),
warningResolution: t('profile.warningResolution'),
formValidate: {
minMxNumberInclusive: t('profile.minMxNumberInclusive'),
minMxNumberExclusive: t('profile.minMxNumberExclusive'),
minMaxString: t('profile.minMaxString'),
default: t('profile.defaultError')
}
},
successCallback,
errorCallback,
autoSaveMode : true
}}
/>
</ShexForm>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,6 @@ background: #f9f9f9;
}
`;

export const DeleteNotification = styled.section`
export const AutoSaveNotification = styled.section`
margin-bottom:0px !important;
`;
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ import { GradientBackground } from "@util-components";

export const RegistrationPage = styled(GradientBackground)`
text-align: center;
margin-top: 40px;

h1 {
color: #ffffff;
}

span {
color: #ffffff;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const WelcomePageContent = props => {
}
},
onComplete: uploadedFiles => {
updatePhoto(uploadedFiles[0].uri, t('welcome.uploadSuccess'));
updatePhoto(uploadedFiles[uploadedFiles.length - 1].uri, t('welcome.uploadSuccess'));
},
render: props => (
<ImageProfile
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import WelcomePageContent from './welcome.component';
import { withWebId } from '@inrupt/solid-react-components';
import data from '@solid/query-ldflex';
import { withToastManager } from 'react-toast-notifications';

import { namedNode } from "@rdfjs/data-model";
const defaultProfilePhoto = '/img/icon/empty-profile.svg';

/**
Expand Down Expand Up @@ -51,8 +51,7 @@ class WelcomeComponent extends Component<Props> {

const name = nameLd ? nameLd.value : '';

let imageLd = await user.image;
imageLd = imageLd ? imageLd : await user.vcard_hasPhoto;
let imageLd = await user.vcard_hasPhoto;

let image;
if (imageLd && imageLd.value) {
Expand Down Expand Up @@ -85,8 +84,8 @@ class WelcomeComponent extends Component<Props> {
try {
const { user } = data;
this.state.hasImage
? await user.image.set(uri)
: await user.image.add(uri);
? await user.vcard_hasPhoto.set(namedNode(uri))
: await user.vcard_hasPhoto.add(namedNode(uri));

this.props.toastManager.add(['', message], {
appearance: 'success'
Expand Down
9 changes: 9 additions & 0 deletions generators/app/templates/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,12 @@ form-group .select-role {
margin: 10px 0;
}

/* Overriding the center-align property from the styleguide */
.solid-provider-select {
text-align: left !important;
}

.solid-provider-select .option {
padding-left: 10px !important;
}

Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ const PrivateLayout = ({ routes, ...rest }) => {
{...rest}
component={matchProps => (
<Container>
<LiveUpdate>
{ rest.webId && <LiveUpdate subscribe={rest.webId}>
<AuthNavBar {...matchProps} />
</LiveUpdate>
<Content>
</LiveUpdate>}
<Content className={'contentApp'}>
<Switch>
{routes.map(route => (
<Route key={route.id} {...route} exact />
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@inrupt/generator-solid-react",
"version": "0.5.0",
"version": "0.5.1",
"description": "Solid React Application Generator",
"homepage": "https://solid.inrupt.com/docs",
"contributors": [
Expand All @@ -22,7 +22,7 @@
},
{
"name": "Arne Hassel",
"email": "arneh@inrupt.com"
"email": "arneh@inrupt.com"
}
],
"files": [
Expand Down