Skip to content

Commit

Permalink
Merge branch 'develop' into fix-accessing-components-registration
Browse files Browse the repository at this point in the history
  • Loading branch information
chth0n1x authored Oct 5, 2023
2 parents 7defae4 + 4fdf304 commit 7814715
Show file tree
Hide file tree
Showing 426 changed files with 5,896 additions and 3,637 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
# misc
/coverage/
!.*
.*/
.eslintcache

# ember-try
Expand Down
42 changes: 25 additions & 17 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -282,52 +282,60 @@ module.exports = {
},
},
{
files: ['app/locales/*/translations.ts'],
files: ['./app/locales/*/translations.ts'],
rules: {
'max-len': 'off',
},
},
{
files: ['tests/**/*'],
files: ['./tests/**/*'],
rules: {
'no-await-in-loop': 'off',
'ember/avoid-leaking-state-in-components': 'off',
'ember/avoid-leaking-state-in-ember-objects': 'off',
},
},
{
files: ['mirage/**/*'],
// Test files:
files: ['tests/**/*-test.{js,ts}'],
extends: ['plugin:qunit/recommended'],
rules: {
'qunit/require-expect': 'off',
},
},
{
files: ['./mirage/**/*'],
rules: {
'ember/avoid-leaking-state-in-ember-objects': 'off',
},
},
{
files: ['lib/*/index.js'],
files: ['./lib/*/index.js'],
rules: {
'ember/avoid-leaking-state-in-ember-objects': 'off',
'@typescript-eslint/no-var-requires': 'off',
},
},
{
files: ['lib/*/addon/engine.js'],
files: ['./lib/*/addon/engine.js'],
rules: {
'ember/avoid-leaking-state-in-ember-objects': 'off',
},
},
{
files: [
'.eslintrc.js',
'.prettierrc.js',
'.template-lintrc.js',
'ember-cli-build.js',
'testem.js',
'run-node-test.js',
'lib/**/environment.js',
'lib/**/index.js',
'blueprints/*/index.js',
'blueprints/**/*.js',
'node-tests/**/*.js',
'config/**/*.js',
'./.eslintrc.js',
'./.prettierrc.js',
'./.template-lintrc.js',
'./ember-cli-build.js',
'./testem.js',
'./run-node-test.js',
'./lib/**/environment.js',
'./lib/**/index.js',
'./blueprints/*/index.js',
'./blueprints/**/*.js',
'./node-tests/**/*.js',
'./config/**/*.js',
],
parserOptions: {
sourceType: 'script',
Expand Down
2 changes: 1 addition & 1 deletion .template-lintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
'use strict';

module.exports = {
extends: 'octane',
extends: 'recommended',

rules: {
'block-indentation': 4,
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [23.11.0] - 2023-09-27
### Changed
- Upgrade to Ember 3.28


## [23.10.0] - 2023-08-28
### Added
- Added search improvement routes and related components
Expand Down Expand Up @@ -1940,6 +1945,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Added
- Quick Files

[23.11.0]: https://github.com/CenterForOpenScience/ember-osf-web/releases/tag/23.11.0
[23.10.2]: https://github.com/CenterForOpenScience/ember-osf-web/releases/tag/23.10.2
[23.10.1]: https://github.com/CenterForOpenScience/ember-osf-web/releases/tag/23.10.1
[23.10.0]: https://github.com/CenterForOpenScience/ember-osf-web/releases/tag/23.10.0
Expand Down
2 changes: 1 addition & 1 deletion app/adapters/crossref-adapter.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import JSONAPIAdapter from '@ember-data/adapter/json-api';
import DS from 'ember-data';
import ModelRegistry from 'ember-data/types/registries/model';
import config from 'ember-get-config';
import config from 'ember-osf-web/config/environment';

const { support: { supportEmail } } = config;

Expand Down
2 changes: 1 addition & 1 deletion app/adapters/node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import OsfAdapter from './osf-adapter';
export default class NodeAdapter extends OsfAdapter {
buildURL(modelName?: string | number, id?: string, snapshot?: DS.Snapshot | null, requestType?: string): string {
if (snapshot && requestType === 'createRecord') {
const parent: any = snapshot.record.belongsTo('parent').belongsToRelationship.members.list[0];
const parent: any = snapshot.record.belongsTo('parent').belongsToRelationship.members?.list[0];

if (parent) {
return this.buildRelationshipURL(parent.createSnapshot(), 'children');
Expand Down
2 changes: 1 addition & 1 deletion app/adapters/osf-adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { inject as service } from '@ember/service';
import { underscore } from '@ember/string';
import DS from 'ember-data';
import ModelRegistry from 'ember-data/types/registries/model';
import config from 'ember-get-config';
import config from 'ember-osf-web/config/environment';
import { pluralize } from 'ember-inflector';
import Session from 'ember-simple-auth/services/session';

Expand Down
2 changes: 1 addition & 1 deletion app/adapters/user-password.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import config from 'ember-get-config';
import config from 'ember-osf-web/config/environment';

import OsfAdapter from './osf-adapter';

Expand Down
2 changes: 1 addition & 1 deletion app/adapters/user-registration.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import RESTAdapter from '@ember-data/adapter/rest';
import ModelRegistry from 'ember-data/types/registries/model';
import config from 'ember-get-config';
import config from 'ember-osf-web/config/environment';

export default class UserRegistrationAdapter extends RESTAdapter {
host = config.OSF.url.replace(/\/$/, '');
Expand Down
2 changes: 1 addition & 1 deletion app/app.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Application from '@ember/application';
import config from 'ember-get-config';
import config from 'ember-osf-web/config/environment';
import loadInitializers from 'ember-load-initializers';
import Resolver from './resolver';

Expand Down
2 changes: 1 addition & 1 deletion app/application/controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import RouterService from '@ember/routing/router-service';
import { inject as service } from '@ember/service';
import { camelize } from '@ember/string';
import Features from 'ember-feature-flags/services/features';
import config from 'ember-get-config';
import config from 'ember-osf-web/config/environment';

import Theme from 'ember-osf-web/services/theme';
import OsfModalState from 'osf-components/services/osf-modal-state';
Expand Down
2 changes: 1 addition & 1 deletion app/authenticators/osf-cookie.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { warn } from '@ember/debug';
import { inject as service } from '@ember/service';
import { camelize } from '@ember/string';
import Features from 'ember-feature-flags/services/features';
import config from 'ember-get-config';
import config from 'ember-osf-web/config/environment';
import Base from 'ember-simple-auth/authenticators/base';
import Session from 'ember-simple-auth/services/session';

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion app/const/service-links.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import config from 'ember-get-config';
import config from 'ember-osf-web/config/environment';

const osfUrl = config.OSF.url;
const serviceLinks = {
Expand Down
2 changes: 1 addition & 1 deletion app/dashboard/controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { inject as service } from '@ember/service';
import { waitFor } from '@ember/test-waiters';
import { all, restartableTask, task, timeout } from 'ember-concurrency';
import { taskFor } from 'ember-concurrency-ts';
import config from 'ember-get-config';
import config from 'ember-osf-web/config/environment';
import $ from 'jquery';
import Media from 'ember-responsive';

Expand Down
2 changes: 1 addition & 1 deletion app/decorators/check-auth.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Route from '@ember/routing/route';
import { inject as service, Registry as ServiceRegistry } from '@ember/service';
import config from 'ember-get-config';
import config from 'ember-osf-web/config/environment';

import { NotLoggedIn } from 'ember-osf-web/errors';
import CurrentUser from 'ember-osf-web/services/current-user';
Expand Down
2 changes: 1 addition & 1 deletion app/error-no-api/controller.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Controller from '@ember/controller';
import config from 'ember-get-config';
import config from 'ember-osf-web/config/environment';

export default class NoAPI extends Controller {
supportEmail = config.support.supportEmail;
Expand Down
4 changes: 3 additions & 1 deletion app/guid-file/route.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import Route from '@ember/routing/route';
import { inject as service } from '@ember/service';
import { waitFor } from '@ember/test-waiters';
import Store from '@ember-data/store';
import HeadTagsService from 'ember-cli-meta-tags/services/head-tags';
import { task } from 'ember-concurrency';
import { taskFor } from 'ember-concurrency-ts';
import Intl from 'ember-intl/services/intl';
import moment from 'moment';
import moment from 'moment-timezone';

import Institution from 'ember-osf-web/models/institution';
import MetaTags, { HeadTagDef } from 'ember-osf-web/services/meta-tags';
Expand All @@ -32,6 +33,7 @@ export default class GuidFile extends Route {
@service metaTags!: MetaTags;
@service ready!: Ready;
@service currentUser!: CurrentUserService;
@service store!: Store;

headTags?: HeadTagDef[];
metadata!: CustomFileMetadataRecordModel;
Expand Down
2 changes: 1 addition & 1 deletion app/guid-node/registrations/controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { alias } from '@ember/object/computed';
import { inject as service } from '@ember/service';
import { waitFor } from '@ember/test-waiters';
import { task } from 'ember-concurrency';
import config from 'ember-get-config';
import config from 'ember-osf-web/config/environment';
import Media from 'ember-responsive';

import Node from 'ember-osf-web/models/node';
Expand Down
2 changes: 1 addition & 1 deletion app/home/-components/hero-banner/component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import RouterService from '@ember/routing/router-service';
import { inject as service } from '@ember/service';
import { camelize } from '@ember/string';
import Features from 'ember-feature-flags/services/features';
import config from 'ember-get-config';
import config from 'ember-osf-web/config/environment';

import { layout } from 'ember-osf-web/decorators/component';

Expand Down
2 changes: 1 addition & 1 deletion app/home/-components/integrations-section/component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { alias } from '@ember/object/computed';
import { inject as service } from '@ember/service';
import { camelize } from '@ember/string';
import Features from 'ember-feature-flags/services/features';
import config from 'ember-get-config';
import config from 'ember-osf-web/config/environment';

const { featureFlagNames: { ABTesting } } = config;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Component from '@ember/component';

import config from 'ember-get-config';
import config from 'ember-osf-web/config/environment';

const {
OSF: {
Expand Down
2 changes: 1 addition & 1 deletion app/home/controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { alias } from '@ember/object/computed';
import { inject as service } from '@ember/service';
import { camelize } from '@ember/string';
import Features from 'ember-feature-flags/services/features';
import config from 'ember-get-config';
import config from 'ember-osf-web/config/environment';

const { featureFlagNames: { ABTesting } } = config;

Expand Down
1 change: 0 additions & 1 deletion app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
<script src="{{content-for "assetsPrefix"}}assets/ember-osf-web.js"></script>

{{content-for "raven"}}
{{content-for "zxcvbn"}}
{{content-for "body-footer"}}
</body>
</html>
2 changes: 1 addition & 1 deletion app/instance-initializers/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import Features from 'ember-feature-flags/services/features';
import { Blocker } from 'ember-osf-web/services/ready';
import transitionTargetURL from 'ember-osf-web/utils/transition-target-url';

import config from 'ember-get-config';
import config from 'ember-osf-web/config/environment';

const {
featureFlagNames: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default class InstitutionalUsersList extends Component {

// Private properties
modelTaskInstance!: TaskInstance<InstitutionsDashboardModel>;
department?: string;
department = this.intl.t('institutions.dashboard.select_default');
sort = 'user_name';

reloadUserList?: () => void;
Expand All @@ -41,12 +41,6 @@ export default class InstitutionalUsersList extends Component {
const institutionDepartments = this.departmentMetrics.map((x: InstitutionDepartmentsModel) => x.name);
departments = departments.concat(institutionDepartments);
}

if (!this.department) {
// eslint-disable-next-line ember/no-side-effects
this.set('department', departments[0]);
}

return departments;
}

Expand Down
2 changes: 2 additions & 0 deletions app/institutions/dashboard/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import Route from '@ember/routing/route';
import RouterService from '@ember/routing/router-service';
import { inject as service } from '@ember/service';
import { waitFor } from '@ember/test-waiters';
import Store from '@ember-data/store';
import { task } from 'ember-concurrency';
import { taskFor } from 'ember-concurrency-ts';

Expand All @@ -18,6 +19,7 @@ export interface InstitutionsDashboardModel {
}
export default class InstitutionsDashboardRoute extends Route {
@service router!: RouterService;
@service store!: Store;

@task
@waitFor
Expand Down
6 changes: 3 additions & 3 deletions app/institutions/index/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@
<Input
data-test-institutions-filter='filter'
aria-label={{t 'institutions.search_placeholder'}}
placeholder={{t 'institutions.search_placeholder'}}
class='form-control'
@value={{this.textValue}}
@type='text'
@class='form-control'
@placeholder={{t 'institutions.search_placeholder'}}
@keyPress={{perform this.trackFilter}}
{{on 'keypress' (perform this.trackFilter)}}
/>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<div data-test-submissions-list-search local-class='search-container'>
<Input
local-class='search {{if this.isMobile 'mobile'}}'
@type='text'
@placeholder={{t 'meetings.index.meetings-list.search'}}
@key-up={{perform this.searchSubmissions}}
placeholder={{t 'meetings.index.meetings-list.search'}}
aria-label={{t 'meetings.index.meetings-list.search'}}
@type='text'
{{on 'keyup' (perform this.searchSubmissions value='target.value')}}
/>
</div>

Expand Down
2 changes: 2 additions & 0 deletions app/meetings/detail/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@ import Route from '@ember/routing/route';
import RouterService from '@ember/routing/router-service';
import { inject as service } from '@ember/service';
import { waitFor } from '@ember/test-waiters';
import Store from '@ember-data/store';
import { task } from 'ember-concurrency';
import { taskFor } from 'ember-concurrency-ts';

export default class MeetingsDetail extends Route {
@service router!: RouterService;
@service store!: Store;

@task
@waitFor
Expand Down
4 changes: 2 additions & 2 deletions app/meetings/index/-components/meetings-list/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
<Input
local-class='search-input'
aria-label={{t 'meetings.index.meetings-list.search'}}
placeholder={{t 'meetings.index.meetings-list.search'}}
@type='text'
@placeholder={{t 'meetings.index.meetings-list.search'}}
@key-up={{perform this.searchMeetings}}
{{on 'keyup' (perform this.searchMeetings value='target.value')}}
/>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/models/abstract-node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import FileProviderModel from 'ember-osf-web/models/file-provider';
import { Permission } from './osf-model';

export default class AbstractNodeModel extends BaseFileItem {
@hasMany('file-provider', { inverse: 'target' })
@hasMany('file-provider', { inverse: 'target', polymorphic: true })
files!: AsyncHasMany<FileProviderModel> & FileProviderModel[];

@hasMany('draft-registration', { inverse: 'branchedFrom' })
Expand Down
Loading

0 comments on commit 7814715

Please sign in to comment.