-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Conversation
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! |
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.
LGTM!
Assigning @nithusha21 for code owner reviews. Thanks! |
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.
Thanks @Rijuta-s! Just 2 questions, PTAL!
() => _init() | ||
() =>{ | ||
_init(); | ||
setTimeout(() => { |
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.
Why is a timeout required?
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.
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(() => { |
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.
Ditto: Why setTimeout?
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.
same as above.
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.
Thanks, please add a comment in the code.
Also, does this work all the time?
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.
It works everytime I have tested at this place.I have added the comment
Unassigning @kevintab95 since the review is done. |
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.
LGTM for codeowner files!
Unassigning @nithusha21 since they have already approved the PR. |
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! |
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.
LGTM!
@@ -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(); |
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.
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
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.
Actually, I don't think this does anything. We already have a waitFor.pageToFullyLoad()
at the end of the preferencesPage.get()
function:
oppia/core/tests/protractor_utils/PreferencesPage.js
Lines 69 to 72 in 010af88
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
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.
Done. I have removed autofocus from preference page currently. It will be done later in another PR.Thank you
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! |
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! |
@U8NWXD PTAL! thank you |
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! |
Overview
Essential Checklist
Proof that changes are correct:
Screencast.from.17-03-21.11_34_38.AM.IST.mp4
PR Pointers