Skip to content

Commit 6cf3306

Browse files
committed
Merge branch 'release/19.5.0'
2 parents 7933316 + 0e2735a commit 6cf3306

File tree

243 files changed

+10883
-4603
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

243 files changed

+10883
-4603
lines changed

.vscode/settings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,5 @@
1717
},
1818
"javascript.preferences.importModuleSpecifier": "non-relative",
1919
"typescript.preferences.importModuleSpecifier": "non-relative",
20+
"typescript.tsdk": "node_modules/typescript/lib",
2021
}

CHANGELOG.md

Lines changed: 179 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,148 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
55
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
66

7+
## [19.5.0] - 2019-06-07
8+
### Added
9+
- Models:
10+
- `meeting` - for OSF Meetings
11+
- `meeting-submission` - for OSF Meetings submissions
12+
- `external-identity` - for connected identities
13+
- Adapters:
14+
- `meeting` - in private namespace
15+
- `meeting-submission` - in private namespace, with custom urlforQuery and buildUrl methods.
16+
- `external-identity` - for connected identities
17+
- Serializers:
18+
- `meeting`
19+
- `meeting-submission`
20+
- `external-identity` - for connected identities
21+
- Routes:
22+
- `meetings` - parent route for meetings
23+
- `meetings.index` - meetings landing page
24+
- `meetings.detail` - meeting detail page
25+
- Components:
26+
- `get-started-button` - a button that takes you to the '/register' page.
27+
- `search-bar` - a search bar component that takes you to the search page.
28+
- `paginated-list/x-header` - a paginated list header closure component
29+
- `banners/view-only-link` - banner displayed when using a view-only link
30+
- `new-home`
31+
- `hero-banner` - a banner to be used on the logged-out homepage.
32+
- `support-section`
33+
- `support-item` - an item on the support-section component
34+
- `learn-more-button` - a button that goes to the cos.io learn more page
35+
- `meetings`
36+
- `index`
37+
- `meetings-hero-banner` - meetings landing page hero banner
38+
- `meetings-list` - meetings list for the meetings index page
39+
- `meetings-footer` - meetings landing page footer
40+
- `detail`
41+
- `meeting-detail-header` - meeting detail header
42+
- `meeting-submissions-list` - meeting submissions list
43+
- `settings`
44+
- `account`
45+
- `connected-identities` - connected identities component
46+
- Helpers:
47+
- `is-feature-enabled` - helper that checks if a feature flag is enabled
48+
- Utilities:
49+
- `leafVals` - get values of all leaves in an object tree
50+
- `clean-url`
51+
- `notFoundURL` - makes a URL suitable for a `not-found` route's `path` param
52+
- `map-keys`
53+
- `camelizeKeys`
54+
- `snakifyKeys`
55+
- `mapKeysAndValues`
56+
- `url-parts`
57+
- `splitUrl`
58+
- `joinUrl`
59+
- `addQueryParam` - adds a query param to a given URL
60+
- `addPathSegment` - adds a path segment to a given URL
61+
- Tests:
62+
- Acceptance:
63+
- `new-home`
64+
- `meetings/index`
65+
- `meetings/detail`
66+
- `view-only-link`
67+
- `registries/overview/view-only-link`
68+
- Integration:
69+
- `get-started-button`
70+
- `search-bar`
71+
- `hero-banner`
72+
- `view-only-link`
73+
- `meetings`
74+
- `index`
75+
- `meetings-hero-banner`
76+
- `meetings-list`
77+
- `meetings-footer`
78+
- `detail`
79+
- `meeting-detail-header`
80+
- `meeting-submissions-list`
81+
- `settings`
82+
- `account`
83+
- `connected-identities`
84+
- Unit:
85+
- utils:
86+
- `leafVals`
87+
- `notFoundURL` (in `clean-url`)
88+
- `camelizeKeys` (in `map-keys`)
89+
- `addPathSegment` (in `url-parts`)
90+
- Mirage:
91+
- `meeting` factory
92+
- `meeting-submission` factory
93+
- private `meetings` endpoint
94+
- meetings scenario
95+
- `external-identities` factory and endpoint
96+
- add `external-identities` to settings scenario
97+
- View-only link support:
98+
- Add `view_only` query param to `application` route
99+
- Store VOL info (token, anonymized) on `current-user` service
100+
- Include VOL token in all API requests, all links within OSF
101+
- Types:
102+
- `ember-a11y-testing` - `a11yAudit`
103+
- DX:
104+
- .vscode/settings.json
105+
- Add `typescript.tsdk` setting so that VS Code uses workspace's TypeScript version by default.
106+
107+
### Changed
108+
- Adapters:
109+
- `osf-adapter` - added support for view-only links
110+
- Controllers:
111+
- `applicaton` - added `viewOnlyToken` query param
112+
- Routes:
113+
- `applicaton` - added `viewOnlyToken` query param
114+
- Components:
115+
- `osf-navbar`
116+
- detect active OSF service for any non-engine service
117+
- `x-links/hyper-link/x-anchor` added support for view-only links
118+
- `paginated-list`
119+
- add ability to provide a header row
120+
- add splattributes to item
121+
- `contributor-list` - display something useful when using an anonymized VOL
122+
- `osf-link` - added support for view-only links
123+
- `osf-mode-footer` - add features tab for toggling feature flags
124+
- `app-components`
125+
- `license-text` - moved to `osf-components`
126+
- `license-picker` - moved to `osf-components`
127+
- Authenticators:
128+
- `osf-cookie`
129+
- initialize any disabled feature flags found in config
130+
- added support for view-only links
131+
- Decorators:
132+
- `checkAuth` - added support for view-only links
133+
- Transforms:
134+
- `node-license` - use `camelizeKeys` and `snakifyKeys` utils
135+
- Services:
136+
- `current-user` - added support for view-only links
137+
- Utilities:
138+
- `sparse-fieldsets` - use `camelizeKeys` and `snakifyKeys` utils
139+
- Tests:
140+
- Integration:
141+
- `contributor-list` - add tests for anonymized nodes
142+
- Mirage:
143+
- `node` factory - added support for view-only links
144+
- `root` factory - added support for view-only links
145+
- default scenario - added meetings scenario
146+
- Misc:
147+
- ugrade dependencies (see package.json diff)
148+
7149
## [19.4.0] - 2019-04-25
8150
### Added
9151
- Features:
@@ -759,39 +901,40 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
759901
### Added
760902
- Quick Files
761903

762-
[Unreleased]: https://github.com/CenterForOpenScience/ember-osf-web/compare/19.4.0...HEAD
763-
[19.4.0]: https://github.com/CenterForOpenScience/ember-osf-web/compare/19.3.0...19.4.0
764-
[19.3.0]: https://github.com/CenterForOpenScience/ember-osf-web/compare/19.2.0...19.3.0
765-
[19.2.0]: https://github.com/CenterForOpenScience/ember-osf-web/compare/19.1.2...19.2.0
766-
[19.1.2]: https://github.com/CenterForOpenScience/ember-osf-web/compare/19.1.1...19.1.2
767-
[19.1.1]: https://github.com/CenterForOpenScience/ember-osf-web/compare/19.1.0...19.1.1
768-
[19.1.0]: https://github.com/CenterForOpenScience/ember-osf-web/compare/19.0.2...19.1.0
769-
[19.0.2]: https://github.com/CenterForOpenScience/ember-osf-web/compare/19.0.1...19.0.2
770-
[19.0.1]: https://github.com/CenterForOpenScience/ember-osf-web/compare/19.0.0...19.0.1
771-
[19.0.0]: https://github.com/CenterForOpenScience/ember-osf-web/compare/18.2.2...19.0.0
772-
[18.2.2]: https://github.com/CenterForOpenScience/ember-osf-web/compare/18.2.1...18.2.2
773-
[18.2.1]: https://github.com/CenterForOpenScience/ember-osf-web/compare/18.2.0...18.2.1
774-
[18.2.0]: https://github.com/CenterForOpenScience/ember-osf-web/compare/18.1.2...18.2.0
775-
[18.1.2]: https://github.com/CenterForOpenScience/ember-osf-web/compare/18.1.1...18.1.2
776-
[18.1.1]: https://github.com/CenterForOpenScience/ember-osf-web/compare/18.1.0...18.1.1
777-
[18.1.0]: https://github.com/CenterForOpenScience/ember-osf-web/compare/18.0.0...18.1.0
778-
[18.0.0]: https://github.com/CenterForOpenScience/ember-osf-web/compare/0.7.0...18.0.0
779-
[0.7.0]: https://github.com/CenterForOpenScience/ember-osf-web/compare/0.6.1...0.7.0
780-
[0.6.1]: https://github.com/CenterForOpenScience/ember-osf-web/compare/0.6.0...0.6.1
781-
[0.6.0]: https://github.com/CenterForOpenScience/ember-osf-web/compare/0.5.2...0.6.1
782-
[0.5.2]: https://github.com/CenterForOpenScience/ember-osf-web/compare/0.5.1...0.5.2
783-
[0.5.1]: https://github.com/CenterForOpenScience/ember-osf-web/compare/0.5.0...0.5.1
784-
[0.5.0]: https://github.com/CenterForOpenScience/ember-osf-web/compare/0.4.1...0.5.0
785-
[0.4.1]: https://github.com/CenterForOpenScience/ember-osf-web/compare/0.4.0...0.4.1
786-
[0.4.0]: https://github.com/CenterForOpenScience/ember-osf-web/compare/0.3.7...0.4.0
787-
[0.3.7]: https://github.com/CenterForOpenScience/ember-osf-web/compare/0.3.6...0.3.7
788-
[0.3.6]: https://github.com/CenterForOpenScience/ember-osf-web/compare/0.3.5...0.3.6
789-
[0.3.5]: https://github.com/CenterForOpenScience/ember-osf-web/compare/0.3.4...0.3.5
790-
[0.3.4]: https://github.com/CenterForOpenScience/ember-osf-web/compare/0.3.3...0.3.4
791-
[0.3.3]: https://github.com/CenterForOpenScience/ember-osf-web/compare/0.3.2...0.3.3
792-
[0.3.2]: https://github.com/CenterForOpenScience/ember-osf-web/compare/0.3.1...0.3.2
793-
[0.3.1]: https://github.com/CenterForOpenScience/ember-osf-web/compare/0.3.0...0.3.1
794-
[0.3.0]: https://github.com/CenterForOpenScience/ember-osf-web/compare/0.2.0...0.3.0
795-
[0.2.0]: https://github.com/CenterForOpenScience/ember-osf-web/compare/0.1.1...0.2.0
796-
[0.1.1]: https://github.com/CenterForOpenScience/ember-osf-web/compare/0.1.0...0.1.1
797-
[0.1.0]: https://github.com/CenterForOpenScience/ember-osf-web/compare/7dad0d13c0253de88720dd058e96e11905d56911...0.1.0
904+
[Unreleased]: https://github.com/CenterForOpenScience/ember-osf-web/compare/19.5.0...HEAD
905+
[19.5.0]: https://github.com/CenterForOpenScience/ember-osf-web/releases/tag/19.5.0
906+
[19.4.0]: https://github.com/CenterForOpenScience/ember-osf-web/releases/tag/19.4.0
907+
[19.3.0]: https://github.com/CenterForOpenScience/ember-osf-web/releases/tag/19.3.0
908+
[19.2.0]: https://github.com/CenterForOpenScience/ember-osf-web/releases/tag/19.2.0
909+
[19.1.2]: https://github.com/CenterForOpenScience/ember-osf-web/releases/tag/19.1.2
910+
[19.1.1]: https://github.com/CenterForOpenScience/ember-osf-web/releases/tag/19.1.1
911+
[19.1.0]: https://github.com/CenterForOpenScience/ember-osf-web/releases/tag/19.1.0
912+
[19.0.2]: https://github.com/CenterForOpenScience/ember-osf-web/releases/tag/19.0.2
913+
[19.0.1]: https://github.com/CenterForOpenScience/ember-osf-web/releases/tag/19.0.1
914+
[19.0.0]: https://github.com/CenterForOpenScience/ember-osf-web/releases/tag/19.0.0
915+
[18.2.2]: https://github.com/CenterForOpenScience/ember-osf-web/releases/tag/18.2.2
916+
[18.2.1]: https://github.com/CenterForOpenScience/ember-osf-web/releases/tag/18.2.1
917+
[18.2.0]: https://github.com/CenterForOpenScience/ember-osf-web/releases/tag/18.2.0
918+
[18.1.2]: https://github.com/CenterForOpenScience/ember-osf-web/releases/tag/18.1.2
919+
[18.1.1]: https://github.com/CenterForOpenScience/ember-osf-web/releases/tag/18.1.1
920+
[18.1.0]: https://github.com/CenterForOpenScience/ember-osf-web/releases/tag/18.1.0
921+
[18.0.0]: https://github.com/CenterForOpenScience/ember-osf-web/releases/tag/18.0.0
922+
[0.7.0]: https://github.com/CenterForOpenScience/ember-osf-web/releases/tag/0.7.0
923+
[0.6.1]: https://github.com/CenterForOpenScience/ember-osf-web/releases/tag/0.6.1
924+
[0.6.0]: https://github.com/CenterForOpenScience/ember-osf-web/releases/tag/0.6.1
925+
[0.5.2]: https://github.com/CenterForOpenScience/ember-osf-web/releases/tag/0.5.2
926+
[0.5.1]: https://github.com/CenterForOpenScience/ember-osf-web/releases/tag/0.5.1
927+
[0.5.0]: https://github.com/CenterForOpenScience/ember-osf-web/releases/tag/0.5.0
928+
[0.4.1]: https://github.com/CenterForOpenScience/ember-osf-web/releases/tag/0.4.1
929+
[0.4.0]: https://github.com/CenterForOpenScience/ember-osf-web/releases/tag/0.4.0
930+
[0.3.7]: https://github.com/CenterForOpenScience/ember-osf-web/releases/tag/0.3.7
931+
[0.3.6]: https://github.com/CenterForOpenScience/ember-osf-web/releases/tag/0.3.6
932+
[0.3.5]: https://github.com/CenterForOpenScience/ember-osf-web/releases/tag/0.3.5
933+
[0.3.4]: https://github.com/CenterForOpenScience/ember-osf-web/releases/tag/0.3.4
934+
[0.3.3]: https://github.com/CenterForOpenScience/ember-osf-web/releases/tag/0.3.3
935+
[0.3.2]: https://github.com/CenterForOpenScience/ember-osf-web/releases/tag/0.3.2
936+
[0.3.1]: https://github.com/CenterForOpenScience/ember-osf-web/releases/tag/0.3.1
937+
[0.3.0]: https://github.com/CenterForOpenScience/ember-osf-web/releases/tag/0.3.0
938+
[0.2.0]: https://github.com/CenterForOpenScience/ember-osf-web/releases/tag/0.2.0
939+
[0.1.1]: https://github.com/CenterForOpenScience/ember-osf-web/releases/tag/0.1.1
940+
[0.1.0]: https://github.com/CenterForOpenScience/ember-osf-web/releases/tag/0.1.0

NOTICE

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
The OSF uses some third-party code.
2+
3+
Font-awesome SVG's on logged-out homepage
4+
=======================================
5+
6+
License: https://fontawesome.com/license
7+
Changes: Fill color

app/adapters/external-identity.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import OsfAdapter from './osf-adapter';
2+
3+
export default class ExternalIdentityAdapter extends OsfAdapter {
4+
pathForType(_: string) {
5+
return 'users/me/settings/identities';
6+
}
7+
}
8+
9+
declare module 'ember-data/types/registries/adapter' {
10+
export default interface AdapterRegistry {
11+
'external-identity': ExternalIdentityAdapter;
12+
} // eslint-disable-line semi
13+
}

app/adapters/meeting-submission.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// import DS from 'ember-data';
2+
import OsfAdapter from './osf-adapter';
3+
4+
export default class MeetingSubmissionAdapter extends OsfAdapter {
5+
parentRelationship = 'meetings';
6+
}
7+
8+
declare module 'ember-data/types/registries/adapter' {
9+
export default interface AdapterRegistry {
10+
'meeting-submission': MeetingSubmissionAdapter;
11+
} // eslint-disable-line semi
12+
}

app/adapters/meeting.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import OsfAdapter from './osf-adapter';
2+
3+
export default class MeetingAdapter extends OsfAdapter {
4+
namespace = '_';
5+
}
6+
7+
declare module 'ember-data/types/registries/adapter' {
8+
export default interface AdapterRegistry {
9+
meeting: MeetingAdapter;
10+
} // eslint-disable-line semi
11+
}

app/adapters/osf-adapter.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,12 @@ export default class OsfAdapter extends JSONAPIAdapter {
7575
buildQuery(snapshot: DS.Snapshot): object {
7676
const { query: adapterOptionsQuery = {} } = (snapshot.adapterOptions || {}) as AdapterOptions;
7777

78-
const query: { include?: any, embed?: any } = {
78+
const { viewOnlyToken } = this.currentUser;
79+
80+
const query: Partial<Record<'include' | 'embed' | 'view_only', string>> = {
7981
...super.buildQuery(snapshot),
8082
...adapterOptionsQuery,
83+
...(viewOnlyToken ? { view_only: viewOnlyToken } : {}),
8184
};
8285

8386
return {

app/application/controller.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,15 @@ export default class Application extends Controller {
1919
@service theme!: Theme;
2020
@service features!: Features;
2121

22+
queryParams = [{
23+
viewOnlyToken: {
24+
as: 'view_only',
25+
// scope needs the literal type `'controller'`, not just `string`
26+
scope: 'controller' as 'controller',
27+
},
28+
}];
29+
viewOnlyToken = '';
30+
2231
@alias(`features.${camelize(verifyEmailModals)}`)
2332
shouldShowVerifyEmailModals!: boolean;
2433

app/application/route.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import config from 'ember-get-config';
44
import I18N from 'ember-i18n/services/i18n';
55

66
import checkAuth from 'ember-osf-web/decorators/check-auth';
7+
import CurrentUser from 'ember-osf-web/services/current-user';
78

89
const {
910
i18n: {
@@ -23,6 +24,13 @@ export default class ApplicationRoute extends Route.extend(
2324
*/
2425
) {
2526
@service i18n!: I18N;
27+
@service currentUser!: CurrentUser;
28+
29+
queryParams = {
30+
viewOnlyToken: {
31+
refreshModel: true,
32+
},
33+
};
2634

2735
afterModel(this: ApplicationRoute) {
2836
const i18n = this.get('i18n');

app/application/template.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<HeadLayout />
22
{{title (t 'general.OSF')}}
3-
<div local-class='Application'>
3+
<div data-test-application local-class='Application'>
44
{{#unless this.disableHeader}}
55
{{#if this.theme.isProvider}}
66
<style>

0 commit comments

Comments
 (0)