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

Include spaces in the list info #7926

Merged
merged 2 commits into from
Nov 15, 2022
Merged

Include spaces in the list info #7926

merged 2 commits into from
Nov 15, 2022

Conversation

JammingBen
Copy link
Contributor

Description

Spaces have been included in the list info below file lists that support displaying spaces.

Related Issue

Screenshot:

image

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests

@JammingBen JammingBen self-assigned this Nov 4, 2022
@JammingBen JammingBen changed the base branch from master to stable-6.0 November 8, 2022 08:56
Copy link
Contributor

@kulmann kulmann left a comment

Choose a reason for hiding this comment

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

As discussed, this PR can't go into the stable branch because of changes in or additional translation strings. Up to you if you want to make two different PRs for stable and master, or only point this PR to master.

@JammingBen JammingBen changed the base branch from stable-6.0 to master November 14, 2022 16:30
Copy link
Contributor

@kulmann kulmann left a comment

Choose a reason for hiding this comment

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

Rebase please :-) Found some small issues, please see comments.

@@ -37,7 +48,8 @@ export default {
},
computed: {
items() {
return this.files + this.folders
const filesAndFolderCount = this.files + this.folders
return this.showSpaces ? filesAndFolderCount + this.spaces : filesAndFolderCount
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not single line as follows?

return this.files + this.folders + (this.showSpaces ? this.spaces : 0)

Copy link
Contributor

Choose a reason for hiding this comment

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

And more radical: isn't this.spaces always 0 if this.showSpaces evaluates to false? In that case you could just do

return this.files + this.folders + this.spaces

Copy link
Contributor Author

@JammingBen JammingBen Nov 15, 2022

Choose a reason for hiding this comment

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

isn't this.spaces always 0 if this.showSpaces evaluates to false?

Technically, this.spaces could be >0 while showSpaces is still false. I don't like those 2 props to be "linked" together like this... The first suggestion is nice though.

packages/web-app-files/src/store/getters.ts Outdated Show resolved Hide resolved
@JammingBen JammingBen force-pushed the list-info-spaces-count branch from b600815 to 071e81b Compare November 15, 2022 14:58
@JammingBen JammingBen requested a review from kulmann November 15, 2022 14:58
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

11.1% 11.1% Coverage
2.1% 2.1% Duplication

@JammingBen JammingBen merged commit 50e5de5 into master Nov 15, 2022
@delete-merged-branch delete-merged-branch bot deleted the list-info-spaces-count branch November 15, 2022 15:30
@micbar micbar mentioned this pull request May 3, 2023
89 tasks
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.

Spaces not being counted in files lists
2 participants