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

Autofocus: Adds autofocus to learner dashboard, contributor dashboard and story editor. #12114

Merged
merged 30 commits into from
Mar 29, 2021

Conversation

Rijuta-s
Copy link
Contributor

@Rijuta-s Rijuta-s commented Mar 6, 2021

Overview

  1. This PR fixes or fixes part of nothing
  2. This PR does the following: Adds autofocus to learner dashboard,preference page, contributor dashboard and story editor

Essential 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 linter/Karma presubmit checks have passed locally on your machine.
  • "Allow edits from maintainers" is checked. (See here for instructions on how to enable it.)
    • This lets reviewers restart your CircleCI tests for you.
  • The PR is made from a branch that's not called "develop".

Proof that changes are correct:

Screencast.from.17-03-21.11_34_38.AM.IST.mp4

PR Pointers

  • Make sure to follow the instructions for making a code change.
  • Oppiabot will notify you when you don't add a PR_CHANGELOG label. If you are unable to do so, please @-mention a code owner (who will be in the Reviewers list), or ask on Gitter.
  • For what code owners will expect, see the Code Owner's wiki page.
  • Make sure your PR follows conventions in the style guide, otherwise this will lead to review delays.
  • Never force push. If you do, your PR will be closed.
  • Oppiabot can assign anyone for review/help if you leave a comment like the following: "{{Question/comment}} @{{reviewer_username}} PTAL"
  • Some of the e2e tests are flaky, and can fail for reasons unrelated to your PR. We are working on fixing this, but in the meantime, if you need to restart the tests, please check the "If your build fails" wiki page.

@oppiabot
Copy link

oppiabot bot commented Mar 6, 2021

Hi, @Rijuta-s, this pull request does not have a "CHANGELOG: ..." label as mentioned in the PR checkbox list. Assigning @ Rijuta-s to add the required label. PRs without this label will not be merged. If you are unsure of which label to add, please ask the reviewers for guidance. Thanks!

Copy link
Member

@vojtechjelinek vojtechjelinek left a comment

Choose a reason for hiding this comment

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

LGTM!

@vojtechjelinek vojtechjelinek removed their assignment Mar 7, 2021
@oppiabot
Copy link

oppiabot bot commented Mar 7, 2021

Assigning @nithusha21 for code owner reviews. Thanks!

Copy link
Member

@kevintab95 kevintab95 left a comment

Choose a reason for hiding this comment

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

Thanks @Rijuta-s! Just 2 questions, PTAL!

() => _init()
() =>{
_init();
setTimeout(() => {
Copy link
Member

Choose a reason for hiding this comment

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

Why is a timeout required?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

To ensure that this code runs only after the script is compiled and the component is visible in the page and is not going any changes due to the loading script..this was the only reason making sense to me, at these place without set time the code was not puling up focus, so.....I'm not completely sure of the reason.

@@ -432,6 +434,9 @@ angular.module('oppia').directive('storyNodeEditor', [
)
);
_init();
setTimeout(() => {
Copy link
Member

Choose a reason for hiding this comment

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

Ditto: Why setTimeout?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

same as above.

Copy link
Member

Choose a reason for hiding this comment

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

Thanks, please add a comment in the code.

Also, does this work all the time?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It works everytime I have tested at this place.I have added the comment

@oppiabot
Copy link

oppiabot bot commented Mar 8, 2021

Unassigning @kevintab95 since the review is done.

Copy link
Contributor

@nithusha21 nithusha21 left a comment

Choose a reason for hiding this comment

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

LGTM for codeowner files!

@oppiabot
Copy link

oppiabot bot commented Mar 8, 2021

Unassigning @nithusha21 since they have already approved the PR.

@oppiabot oppiabot bot added the PR: don't merge - STALE BUILD The build on this PR is stale and should be restarted. label Mar 9, 2021
@oppiabot
Copy link

oppiabot bot commented Mar 9, 2021

Hi @Rijuta-s, the build of this PR is stale and this could result in tests failing in develop. Please update this pull request with the latest changes from develop. Thanks!

@Rijuta-s Rijuta-s requested a review from kevintab95 March 9, 2021 14:48
Copy link
Member

@srijanreddy98 srijanreddy98 left a comment

Choose a reason for hiding this comment

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

LGTM!

@Rijuta-s Rijuta-s assigned U8NWXD and unassigned aks681 and Rijuta-s Mar 18, 2021
@@ -144,11 +144,13 @@ describe('Preferences', function() {
await users.createUser('lorem@preferences.com', 'loremPreferences');
await users.login('lorem@preferences.com');
await preferencesPage.get();
await waitFor.pageToFullyLoad();
Copy link
Member

Choose a reason for hiding this comment

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

Could you add this to the end of the preferencesPage.get() function instead? I think that will make the code cleaner. Also, note that waitFor.pageToFullyLoad(); really waits for a loading indicator to disappear, so please make sure that such an indicator is actually displayed when loading the preferences page

Copy link
Member

@U8NWXD U8NWXD Mar 18, 2021

Choose a reason for hiding this comment

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

Actually, I don't think this does anything. We already have a waitFor.pageToFullyLoad() at the end of the preferencesPage.get() function:

this.get = async function() {
await browser.get(USER_PREFERENCES_URL);
await waitFor.pageToFullyLoad();
};

I think the failures you're seeing must be due to something else

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. I have removed autofocus from preference page currently. It will be done later in another PR.Thank you

@U8NWXD U8NWXD assigned Rijuta-s and unassigned U8NWXD Mar 18, 2021
@U8NWXD U8NWXD removed the PR: LGTM label Mar 18, 2021
@oppiabot oppiabot bot added the PR: don't merge - STALE BUILD The build on this PR is stale and should be restarted. label Mar 21, 2021
@oppiabot
Copy link

oppiabot bot commented Mar 21, 2021

Hi @Rijuta-s, the build of this PR is stale and this could result in tests failing in develop. Please update this pull request with the latest changes from develop. Thanks!

@oppiabot
Copy link

oppiabot bot commented Mar 23, 2021

Hi @Rijuta-s, there is a new change in develop which needs to be in your PR. Please update your branch with the latest changes in develop. For instructions, refer to this link. Thanks!

@oppiabot oppiabot bot removed the PR: don't merge - STALE BUILD The build on this PR is stale and should be restarted. label Mar 23, 2021
@Rijuta-s Rijuta-s changed the title Autofocus: Adds autofocus to preference, contributor dashboard and story editor. Autofocus: Adds autofocus to learner dashboard, contributor dashboard and story editor. Mar 24, 2021
@Rijuta-s Rijuta-s requested a review from U8NWXD March 24, 2021 19:21
@Rijuta-s Rijuta-s assigned U8NWXD and unassigned Rijuta-s Mar 24, 2021
@Rijuta-s
Copy link
Contributor Author

@U8NWXD PTAL! thank you

@oppiabot
Copy link

oppiabot bot commented Mar 27, 2021

Hi @Rijuta-s, there is a new change in develop which needs to be in your PR. Please update your branch with the latest changes in develop. For instructions, refer to this link. Thanks!

@Rijuta-s Rijuta-s removed their assignment Mar 29, 2021
@U8NWXD U8NWXD merged commit ed8c395 into oppia:develop Mar 29, 2021
@Rijuta-s Rijuta-s deleted the dashboards branch April 15, 2021 06:37
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

10 participants