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

Adding Configurable "Entities" to DSpace 7 (Part 1: Search/Browse, Display) #372

Merged
merged 141 commits into from
May 13, 2019

Conversation

tdonohue
Copy link
Member

Overview

This PR is the first phase of work from the DSpace 7 Entities Working Group.

It creates the Angular UI features corresponding to the Entities REST API/Backend PR: DSpace/DSpace#2376

Additional details on the design, use cases and screenshots of these user interface screens are available in a Google Document.

This PR provides the following features to the Angular UI:

  • Search / Browse interfaces for Entities
  • View (Item View) interfaces for Entities

This PR does not provide the following (these will be provided in a future PR):

  • Creation of new Entities (via upcoming DSpace 7 submission & workflow functionality). (See "Testing" section below for recommendations for how to test this PR without being able to create content.)
  • Importing of Entities

Reviewing

As you can see in the commits, nearly all code written in this PR was written by Atmire. However, the DSpace 7 Entities Working Group used the same code review processes established by the DSpace 7 Working Group.

  • All code in this PR has been reviewed/approved by (at least) two other developers (at separate institutions)
  • Reviewers verified that all code has appropriate TypeDocs / inline comments
  • Reviewers verified that all code has required Specs/Tests
  • Reviewers tested all code

Obviously, other code reviews are always welcome. But, because of the large size of this PR, you are also welcome to provide a detailed review of the following (which together provide a deeper understanding of the feature this PR adds):

  • The Google Doc (detailed description)
  • By testing this PR (see "Testing" section below)

Additionally, if you would like to see/review all the past reviews, each of the smaller PRs that make up this larger PR are available in GitHub via this search: https://github.com/DSpace/dspace-angular/pulls?utf8=%E2%9C%93&q=is%3Apr+base%3Aconfigurable_entities+is%3Amerged

Testing

This PR can be built and tested locally. However, as you will be unable to create new Entities, there are a few options available for testing.

Option #1: By default, if you download & build this PR following the PR testing procedure in our README, then you will find your environment.default.js is updated to point at our Entities REST API Demo site (https://dspace7-entities.atmire.com/rest/#/rest/api). This demo site provides the backend (and test data) provided in the corresponding REST API PR DSpace/DSpace#2376

Option #2: If you would rather install the backend (and test data) yourself locally, follow the recommended Testing notes in the corresponding REST API PR DSpace/DSpace#2376 (In this PR, we've provided a test data set to use for local testing)

Acknowledgments

This PR was the collaboration of many individuals (over the span of several PRs to the configurable_entities branch), including @artlowel (developer), @Atmire-Kristof (developer), @LotteHofstede (developer), @benbosman (developer), @antoine-atmire (developer), @paulo-graca (reviewer), and @tdonohue (reviewer). Many others were also involved in the conception/design/discussion in various DSpace 7 Entities Working Group meetings.

A full list of the smaller PRs that make up this PR is available at: https://github.com/DSpace/dspace-angular/pulls?utf8=%E2%9C%93&q=is%3Apr+base%3Aconfigurable_entities+is%3Amerged

Art Lowel and others added 30 commits May 28, 2018 17:22
W2p 52212 item display relations

See merge request contributions/dspace-angular!1
…n' into 'entities-or2018'

52425: Publication - JournalIssue relation

See merge request contributions/dspace-angular!2
@artlowel
Copy link
Member

I tested it again. Everything looks fine

@atarix83 atarix83 self-requested a review April 19, 2019 07:45
Copy link
Contributor

@atarix83 atarix83 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've made a first review, I can't login using the entities REST demo server so I can't test entire application.

Generally I tested the UI and most of it works well, I didn't found any issue.

I've added a few inline comments in this review.

/**
* The view-mode we're currently on
*/
viewMode = VIEW_MODE_FULL;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be better to use an enum instead of a constant, to easily group all view mode available

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed

)
)
);

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there are a lot of exported functions, maybe I would move them to an utils file

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for creating utils file. there is a reason why relationsToRepresentations was not moved to item-relationships-utils.ts ?

Copy link
Member

@artlowel artlowel May 6, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Likely @Atmire-Kristof didn't move it because it wasn't used anywhere else.

I've moved it now, as part of #390

import { Observable } from 'rxjs';

@Injectable()

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add typedoc comments for this class

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added

* @param defaults Default search options
* @returns {Observable<SearchOptions>}
*/
getSearchOptions(defaults: any = {}): Observable<SearchOptions> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method seems it is not used. if is not necessary I'd remove it with all related methods

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed

* @param defaults Default paginated search options
* @returns {Observable<PaginatedSearchOptions>}
*/
getPaginatedSearchOptions(defaults: any = {}): Observable<PaginatedSearchOptions> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method seems it is not used. if is not necessary I'd remove it with all related methods

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed

@@ -30,11 +31,23 @@ export class SearchResultsComponent {
* The current configuration of the search
*/
@Input() searchConfig: SearchOptions;
@Input() sortConfig: SortOptions;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add typedoc comment

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added

@@ -30,11 +31,23 @@ export class SearchResultsComponent {
* The current configuration of the search
*/
@Input() searchConfig: SearchOptions;
@Input() sortConfig: SortOptions;
@Input() viewMode: SetViewMode;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add typedoc comment

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added

@@ -30,11 +31,23 @@ export class SearchResultsComponent {
* The current configuration of the search
*/
@Input() searchConfig: SearchOptions;
@Input() sortConfig: SortOptions;
@Input() viewMode: SetViewMode;
@Input() fixedFilter: string;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add typedoc comment

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added

@Input() sortConfig: SortOptions;
@Input() viewMode: SetViewMode;
@Input() fixedFilter: string;
@Input() disableHeader = false;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add typedoc comment

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added

@@ -75,6 +76,7 @@ export class SearchConfigurationService implements OnDestroy {
* @param {ActivatedRoute} route
*/
constructor(private routeService: RouteService,
private fixedFilterService: SearchFixedFilterService,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parameter fixedFilterService is not described in typedoc, please add it

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added

@artlowel
Copy link
Member

@atarix83 I agree with all of your feedback. It has been processed in a separate pr: #387

Once that is merged, it will show up here

61947: atarix83 feedback changes 19-04-2019
Copy link
Member Author

@tdonohue tdonohue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've re-reviewed and re-tested this (against the demo site) myself. It looks good to me.

I also verified that all of @atarix83's prior requests have been implemented (at least from what I saw). So, @atarix83, if you can give this one last look/test, I think it's looking ready to merge!

Copy link
Contributor

@atarix83 atarix83 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reviewed again this PR.
it's good to me, I only added an inline comment, after it's been resolved this PR can be merged for me

@tdonohue tdonohue mentioned this pull request May 10, 2019
@tdonohue
Copy link
Member Author

@artlowel : As was my worry, merging #384 created a number of merge conflicts in this PR :( Hopefully this is something someone one your team can get fixed on Monday.

tdonohue and others added 5 commits May 10, 2019 12:10
[Configurable Entities] new data tweaks
Conflicts:
	config/environment.default.js
	resources/i18n/en.json
	src/app/+search-page/paginated-search-options.model.ts
	src/app/+search-page/search-filters/search-filter/search-filter.service.spec.ts
	src/app/+search-page/search-options.model.ts
	src/app/+search-page/search-page.component.spec.ts
	src/app/+search-page/search-page.component.ts
	src/app/+search-page/search-page.module.ts
	src/app/+search-page/search-service/search-configuration.service.ts
	src/app/core/cache/response.models.ts
	src/app/shared/object-list/search-result-list-element/item-search-result/item-search-result-list-element.component.spec.ts
	src/app/shared/object-list/search-result-list-element/search-result-list-element.component.ts
	src/app/shared/object-list/wrapper-list-element/wrapper-list-element.component.ts
	src/app/shared/services/route.service.ts
[Configurable Entities] final master merge
@tdonohue
Copy link
Member Author

As this is already at +2, and merge conflicts (with MyDSpace PR) have now been resolved, I'm merging this immediately.

@tdonohue tdonohue merged commit 8865d6e into master May 13, 2019
@tdonohue tdonohue mentioned this pull request May 13, 2019
@tdonohue tdonohue deleted the configurable_entities branch May 14, 2019 13:49
@tdonohue tdonohue added this to the 7.0preview milestone Jan 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants