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

[AAE-4427] Embed upload progress dialog inside the upload from your d… #6575

Merged
merged 10 commits into from Feb 4, 2021

Conversation

arditdomi
Copy link
Contributor

@arditdomi arditdomi commented Jan 25, 2021

…evice tab in attach file widget

Please check if the PR fulfills these requirements

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

What kind of change does this PR introduce? (check one with "x")

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation
  • Other... Please describe:

What is the current behaviour? (You can also link to an open issue here)
https://alfresco.atlassian.net/browse/AAE-4427

What is the new behaviour?
Screenshot 2021-01-25 at 3 01 31 pm

Does this PR introduce a breaking change? (check one with "x")

  • Yes
  • No

If this PR contains a breaking change, please describe the impact and migration path for existing applications: ...

Other information:

@codecov-io
Copy link

codecov-io commented Jan 25, 2021

Codecov Report

Merging #6575 (ee121e9) into develop (5600ef1) will increase coverage by 1.59%.
The diff coverage is 67.56%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #6575      +/-   ##
===========================================
+ Coverage    76.27%   77.86%   +1.59%     
===========================================
  Files          871      356     -515     
  Lines        19654     9773    -9881     
  Branches      3917     1977    -1940     
===========================================
- Hits         14991     7610    -7381     
+ Misses        3468     1552    -1916     
+ Partials      1195      611     -584     
Impacted Files Coverage Δ
.../lib/document-list/data/share-datatable-adapter.ts 69.92% <40.00%> (-2.05%) ⬇️
...-selector/content-node-selector-panel.component.ts 85.35% <71.42%> (-0.37%) ⬇️
...load/components/file-uploading-dialog.component.ts 89.33% <80.00%> (-0.67%) ⬇️
...ocument-list/components/document-list.component.ts 81.90% <87.50%> (-0.31%) ⬇️
...src/lib/document-list/data/share-data-row.model.ts 73.68% <0.00%> (-2.64%) ⬇️
lib/core/test.ts
...components/raphael/raphael-flow-arrow.component.ts
...atable/directives/no-content-template.directive.ts
lib/core/events/base.event.ts
...m/components/widgets/typeahead/typeahead.widget.ts
... and 510 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5600ef1...46679d1. Read the comment docs.

Copy link
Contributor

@mauriziovitale mauriziovitale left a comment

Choose a reason for hiding this comment

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

please do not change the input property

}

onPreselectNodes() {
if (this.hasPreselectNodes()) {
const preselectedNodes = [...this.isSingleSelectionMode() ? [this.data.getPreselectRows()[0]] : this.data.getPreselectRows()];
if (this.data.hasPreselectedRows()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

this is changing the behaviour...compared to the previous code, are we sure ?

Copy link
Contributor Author

@arditdomi arditdomi Feb 2, 2021

Choose a reason for hiding this comment

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

To be honest I believe this is the right thing to do because in the next lines we access the this.data.getPreselectedRows()[0] or this.data.getPreselectedRows() based on if the selection is single or multiple as you can see in this code https://github.com/Alfresco/alfresco-ng2-components/blob/develop/lib/content-services/src/lib/document-list/components/document-list.component.ts#L928.
So to me seems correct we should check the if(this.data.hasPreselectedRows) as this is the one we are trying to access in the next line. I don't know what the author of the code wanted to achieve with this but I believe this is the correct thing.

If we keep the if (this.hasPreselectedRows()) instead of the if(this.data.hasPreselectedRows()) we could end up with an error when accessing the elements of the this.data.getPreselectedRows() as it can be that there are no elements there.

@mauriziovitale mauriziovitale merged commit d362153 into develop Feb 4, 2021
@mauriziovitale mauriziovitale deleted the dev-adomi-AAE-4427 branch February 4, 2021 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants