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

human-readable file size frontend support #233

Merged
merged 12 commits into from
Nov 5, 2020

Conversation

KWMORALE
Copy link
Member

@KWMORALE KWMORALE commented Nov 3, 2020

Your checklist for this pull request

  • I've read the contributing guideline.
  • I've tested my changes by building and running the project, and testing changed functionality (if applicable)
  • I've added automated tests for my change (if applicable, optional)
  • I've updated documentation to reflect my change (if applicable)

What is the current behaviour?

File sizes are only shown as bytes.

What is the new behaviour?

File sizes are only shown in human-readable form.

Test plan

Check if human-readable file size form match with the original in bytes.

Closing issues

closes #229

@KWMORALE KWMORALE requested a review from psrok1 November 4, 2020 14:08
@KWMORALE KWMORALE marked this pull request as ready for review November 4, 2020 14:08
Copy link
Member

@psrok1 psrok1 left a comment

Choose a reason for hiding this comment

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

Frontend part looks ok , but search/fields.py needs to be simplified

mwdb/core/search/fields.py Outdated Show resolved Hide resolved
mwdb/core/search/fields.py Outdated Show resolved Hide resolved
mwdb/core/search/fields.py Show resolved Hide resolved
mwdb/core/search/fields.py Outdated Show resolved Hide resolved
mwdb/core/search/fields.py Outdated Show resolved Hide resolved
docs/user-guide/7-Lucene-search.rst Outdated Show resolved Hide resolved
@KWMORALE KWMORALE requested a review from psrok1 November 5, 2020 12:13
Copy link
Member

@psrok1 psrok1 left a comment

Choose a reason for hiding this comment

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

Looks ok 👍

@psrok1 psrok1 merged commit b9b011b into master Nov 5, 2020
@psrok1 psrok1 deleted the feature/human-readable-file-size branch November 5, 2020 15:13
@ITAYC0HEN
Copy link
Contributor

Guys please attach screenshots to the PRs, it will be very helpful to easily see the new feature without reading the code :)

@KWMORALE
Copy link
Member Author

KWMORALE commented Nov 6, 2020

For some reason I have missed your comment.
Here you have some screenshots of the new feature.
Mwdb shows size in human-readable form now, but all actions like copy to clipboard or make search from object view is still being executed with original size in bytes. It's prevent conficts with converting size from human-readable form to bytes version.
What is more, the original size in bytes is shown as tooltip when you hover on the size in recent view.

Screenshot from 2020-11-06 14-11-11
Screenshot from 2020-11-06 14-09-30

@ITAYC0HEN
Copy link
Contributor

you rock! ♥

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.

Support human-readable file size
3 participants