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

Apply folders by features to part of components/ folder #6863

Merged
merged 17 commits into from
Jun 8, 2019
Merged

Apply folders by features to part of components/ folder #6863

merged 17 commits into from
Jun 8, 2019

Conversation

YashJipkate
Copy link
Contributor

@YashJipkate YashJipkate commented Jun 7, 2019

Explanation

This PR applies folders by feature structure to a part of the components folder. More specifically it applies the concept to the following:

  • button-directives
  • ck-editor-helpers
  • common-layout-directives
  • entity-creation-services
  • forms

Checklist

  • The PR title starts with "Fix #bugnum: ", followed by a short, clear summary of the changes. (If this PR fixes part of an issue, prefix the title with "Fix part of #bugnum: ...".)
  • The PR explanation includes the words "Fixes #bugnum: ..." (or "Fixes part of #bugnum" if the PR only partially fixes an issue).
  • The linter/Karma presubmit checks have passed.
    • These should run automatically, but if not, you can manually trigger them locally using python scripts/pre_commit_linter.py and bash scripts/run_frontend_tests.sh.
  • The PR is made from a branch that's not called "develop".
  • The PR has an appropriate "CHANGELOG: ..." label (If you are unsure of which label to add, ask the reviewers for guidance).
  • The PR follows the style guide.
  • The PR addresses the points mentioned in the codeowner checks for the files/folders changed. (See the codeowner's wiki page.)
  • The PR is assigned to an appropriate reviewer.
    • If you're a new contributor, please ask on Gitter for someone to assign a reviewer and don't tick this checkbox.
    • If you're not sure who the appropriate reviewer is, please assign to the issue's "owner" -- see the "talk-to" label on the issue. Do not only request the review but also add the reviewer as an assignee.

@YashJipkate YashJipkate reopened this Jun 7, 2019
@YashJipkate YashJipkate changed the title Components fbf Apply folders by features to part of components/ folder Jun 7, 2019
Copy link
Member

@seanlip seanlip left a comment

Choose a reason for hiding this comment

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

Looks good, thanks @YashJipkate, just a few comments.

I think now is a good time to email oppia-dev@ to let them know what's going on. This is going to cause a bunch of merge conflicts.

Also, feel free to make other PRs of this form in parallel (on different branches) -- it's fine to have more than one open at a time.

/core/templates/dev/head/components/background/ @ankita240796
/core/templates/dev/head/components/embed_modal/ @ankita240796
/core/templates/dev/head/components/loading/ @ankita240796
/core/templates/dev/head/components/common-layout-directives/common-elements/alert-message.directive.ts @ankita240796
Copy link
Member

Choose a reason for hiding this comment

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

You don't need to do this file by file -- it's hard to maintain. Instead, it's fine to assign someone to a directory, and in fact, hopefully what you're doing with the frontend refactoring helps to streamline this. So, please try to use directories where possible.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But there are many files in a directory that do not have the same CODEOWNER. For example in button-directives/ the create-activity button, embed, and hint-and-solution belong to different CODEOWNERS.

Copy link
Member

Choose a reason for hiding this comment

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

Yep, in that case, you can use individual filepaths. I'm only talking about cases where every file in a directory has the same codeowner.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes I have included the directories where all the CODEOWNERS match (e.g. common-layout-directives/navigation-bars). Only those with mismatching CODEOWNERS are named by filepaths

@@ -0,0 +1,57 @@
// Copyright 2014 The Oppia Authors. All Rights Reserved.
Copy link
Member

Choose a reason for hiding this comment

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

I see an addition here but no deletion?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Deleted the file. It somehow didn't move but copied.
Done!

@@ -1397,12 +1397,12 @@ def _check_js_and_ts_component_name_and_count(self):
not filepath.endswith('App.ts'))]
failed = False
summary_messages = []
component_name = ''
# component_name = ''.
Copy link
Member

Choose a reason for hiding this comment

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

Don't comment out code; delete it if it's not being used.

You can always get it back from the source history.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done!

Copy link
Member

@seanlip seanlip left a comment

Choose a reason for hiding this comment

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

Thanks, LGTM -- happy to merge when checks pass!

@codecov
Copy link

codecov bot commented Jun 8, 2019

Codecov Report

Merging #6863 into develop will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #6863   +/-   ##
========================================
  Coverage    94.99%   94.99%           
========================================
  Files          371      371           
  Lines        50628    50628           
========================================
  Hits         48094    48094           
  Misses        2534     2534
Impacted Files Coverage Δ
core/domain/rte_component_registry_test.py 100% <ø> (ø) ⬆️
scripts/build.py 74.88% <ø> (ø) ⬆️

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 d5af34b...e11f185. Read the comment docs.

1 similar comment
@codecov
Copy link

codecov bot commented Jun 8, 2019

Codecov Report

Merging #6863 into develop will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #6863   +/-   ##
========================================
  Coverage    94.99%   94.99%           
========================================
  Files          371      371           
  Lines        50628    50628           
========================================
  Hits         48094    48094           
  Misses        2534     2534
Impacted Files Coverage Δ
core/domain/rte_component_registry_test.py 100% <ø> (ø) ⬆️
scripts/build.py 74.88% <ø> (ø) ⬆️

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 d5af34b...e11f185. Read the comment docs.

@YashJipkate
Copy link
Contributor Author

@seanlip The checks now pass. PTAL!

@seanlip seanlip merged commit 0644835 into oppia:develop Jun 8, 2019
@YashJipkate YashJipkate deleted the components-fbf branch June 8, 2019 08:31
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.

3 participants