Skip to content

Commit 77b1022

Browse files
committed
Merge branch 'release/21.5.0'
2 parents c68590d + e30d287 commit 77b1022

File tree

25 files changed

+581
-33
lines changed

25 files changed

+581
-33
lines changed

CHANGELOG.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,19 @@ 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+
## [21.5.0] - 2021-05-27
8+
### Fixed
9+
- registration Detail Page: longer license types spill out of bounds
10+
- unencode special characters in Registries Moderator Comments and Registries Custom Metadata
11+
- (deprecations) use jQuery in lieu of Ember.$()
12+
- (deprecations) use ember-copy in lieu of copy method and Copyable mixin
13+
14+
### Changed
15+
- (project-based registration) ensure only templates associated with OSF Registries is shown
16+
17+
### Added
18+
- (my-registrations page) text explaining how submitted/draft registrations are sorted
19+
720
## [21.4.1] - 2021-05-26
821
### Changed
922
- hide registration state for anonymous VOLs
@@ -1728,7 +1741,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
17281741
### Added
17291742
- Quick Files
17301743

1731-
[Unreleased]: https://github.com/CenterForOpenScience/ember-osf-web/compare/21.4.1...develop
1744+
[Unreleased]: https://github.com/CenterForOpenScience/ember-osf-web/compare/21.5.0...develop
1745+
[21.5.0]: https://github.com/CenterForOpenScience/ember-osf-web/releases/tag/21.5.0
17321746
[21.4.1]: https://github.com/CenterForOpenScience/ember-osf-web/releases/tag/21.4.1
17331747
[21.4.0]: https://github.com/CenterForOpenScience/ember-osf-web/releases/tag/21.4.0
17341748
[21.3.0]: https://github.com/CenterForOpenScience/ember-osf-web/releases/tag/21.3.0

app/dashboard/controller.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ import User from 'ember-osf-web/models/user';
1515
import Analytics from 'ember-osf-web/services/analytics';
1616
import CurrentUser from 'ember-osf-web/services/current-user';
1717

18+
import $ from 'jquery';
19+
1820
// TODO pull these from the database
1921
const {
2022
dashboard: {
@@ -80,7 +82,6 @@ export default class Dashboard extends Controller {
8082

8183
const nodes: QueryHasManyResult<Node> = yield user.queryHasMany('sparseNodes', {
8284
embed: ['bibliographic_contributors', 'parent', 'root'],
83-
// eslint-disable-next-line ember/no-global-jquery
8485
filter: this.filter ? { title: $('<div>').text(this.filter).html() } : undefined,
8586
page: more ? this.incrementProperty('page') : this.set('page', 1),
8687
sort: this.sort || undefined,

app/guid-node/registrations/controller.ts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@ import { alias } from '@ember/object/computed';
55
import { inject as service } from '@ember/service';
66
import { task } from 'ember-concurrency-decorators';
77
import DS from 'ember-data';
8+
import config from 'ember-get-config';
89

910
import Node from 'ember-osf-web/models/node';
11+
import RegistrationProviderModel from 'ember-osf-web/models/registration-provider';
1012
import RegistrationSchema from 'ember-osf-web/models/registration-schema';
1113
import Analytics from 'ember-osf-web/services/analytics';
1214

@@ -37,11 +39,12 @@ export default class GuidNodeRegistrations extends Controller {
3739

3840
@task({ withTestWaiter: true })
3941
getRegistrationSchemas = task(function *(this: GuidNodeRegistrations) {
40-
let schemas = yield this.store.query('registration-schema',
41-
{
42-
'filter[active]': true,
43-
'page[size]': 100,
44-
});
42+
const { defaultProvider } = config;
43+
const provider: RegistrationProviderModel = yield this.store.findRecord(
44+
'registration-provider',
45+
defaultProvider,
46+
);
47+
let schemas: RegistrationSchema[] = yield provider.loadAll('schemas');
4548
schemas = schemas.toArray();
4649
schemas.sort((a: RegistrationSchema, b: RegistrationSchema) => a.name.length - b.name.length);
4750
this.set('defaultSchema', schemas.firstObject);

app/models/review-action.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export default class ReviewActionModel extends OsfModel {
3535
@service intl!: Intl;
3636

3737
@attr('string') actionTrigger!: ReviewActionTrigger;
38-
@attr('string') comment!: string;
38+
@attr('fixstring') comment!: string;
3939
@attr('string') fromState!: string;
4040
@attr('string') toState!: string;
4141
@attr('date') dateCreated!: Date;

app/services/current-user.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ import RSVP from 'rsvp';
1010
import User from 'ember-osf-web/models/user';
1111
import { addQueryParam } from 'ember-osf-web/utils/url-parts';
1212

13+
import $ from 'jquery';
14+
1315
const {
1416
OSF: {
1517
url: osfUrl,

config/optional-features.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
{
2+
"jquery-integration": true,
23
"template-only-glimmer-components": true
34
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import Helper from '@ember/component/helper';
2+
import fixSpecialChars from 'ember-osf-web/utils/fix-special-char';
3+
4+
export default class FixString extends Helper {
5+
compute([textToFix]: [string]): string {
6+
return fixSpecialChars(textToFix);
7+
}
8+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { default } from 'app-components/helpers/fix-string';

lib/osf-components/addon/components/file-share-button/component.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ import File from 'ember-osf-web/models/file';
99
import Analytics from 'ember-osf-web/services/analytics';
1010
import pathJoin from 'ember-osf-web/utils/path-join';
1111

12+
import $ from 'jquery';
13+
1214
import styles from './styles';
1315
import template from './template';
1416

@@ -130,7 +132,7 @@ export default class FileShareButton extends Component {
130132
function renderMfr() {
131133
var mfrRender = new mfr.Render("mfrIframe", "${this.mfrUrl}");
132134
}
133-
if (window.jQuery) {
135+
if (window.$) {
134136
renderMfr();
135137
} else {
136138
var jq = document.createElement('script');

lib/osf-components/addon/components/provider-metadata-display/template.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@
1212
data-test-registration-provider-metadata-field-value={{@field.field_name}}
1313
local-class='ProviderMetadataValue'
1414
>
15-
{{@field.field_value}}
15+
{{fix-string @field.field_value}}
1616
</span>
1717
</div>

0 commit comments

Comments
 (0)