-
Notifications
You must be signed in to change notification settings - Fork 82
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
frontend: make styling consistent and remove dead code #394
Conversation
{`Pending items: ${share.statistics.pendingItems}`} | ||
</Typography> | ||
</Box> | ||
<Box |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code is identical to frontend/src/views/Shares/ShareInboxListItem.js. Let's extract it into dedicated form
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Refactoring and moving parts around will come in the subsequent PRs, I want this PR to be free from any logic so that it's easy to review and can be merged quickly. But I noted the comment and will apply it when working on the refactoring.
### Feature or Bug-fix - Refactoring ### Detail My recent PR #394 has a lot of changes but all of these changes are to styles only and not the code itself, this way the blame history for all the changed files is lost (it will always blame me). This PR adds the file`.git-blame-ignore-revs` which contains the id of the styling commit and the command that you need to run once to fix the blame history for you. Also Github understands that file and will show the history correctly. This PR is based on [this article](https://www.stefanjudis.com/today-i-learned/how-to-exclude-commits-from-git-blame/) and is suggested by Raul. This file works for the whole repository, and in the future one only needs to add ids of styling commits and the history will be preserved correctly. --- By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
) ### Feature or Bug-fix - Refactoring ### Details This PR does 2 things: - Makes the styling consistent across the project - Removes dead code (unused variables, functions, and imports) --- By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
### Feature or Bug-fix - Refactoring ### Detail My recent PR data-dot-all#394 has a lot of changes but all of these changes are to styles only and not the code itself, this way the blame history for all the changed files is lost (it will always blame me). This PR adds the file`.git-blame-ignore-revs` which contains the id of the styling commit and the command that you need to run once to fix the blame history for you. Also Github understands that file and will show the history correctly. This PR is based on [this article](https://www.stefanjudis.com/today-i-learned/how-to-exclude-commits-from-git-blame/) and is suggested by Raul. This file works for the whole repository, and in the future one only needs to add ids of styling commits and the history will be preserved correctly. --- By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Feature or Bug-fix
Details
This PR does 2 things:
This is done through eslint rules, I noticed that the project has prettier rules and uses prettier, but the rules were not in sync with eslint and were not enforced, so the styling was in consistent. So for this matter I configured eslint to enforce prettier rules so that the styling is consistent. And that's what the first commit does, there are no code changes what so ever in it, just styling updates.
For the second commit, I removed all unused variables, functions, and imports, there is also no logic changes, only removing the unused parts.
The third commit removes
==
in favour of===
as this may cause some unintentional bugs (see this stackoverflow question).The last commit is the actual configuration enforcing all the rules -- this commit is at the end not the beginning because the configuration kept changing until I reached the final state, and I didn't want to pollute the PR with a lot of configuration commits.
As stated, the PR's commits are meaningful and I recommend reviewing the PR by going through each commit individually
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.