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

Close not unlocking on page complete #51

Closed
KayConceicao opened this issue Oct 26, 2023 · 7 comments
Closed

Close not unlocking on page complete #51

KayConceicao opened this issue Oct 26, 2023 · 7 comments
Assignees
Labels
bug Something isn't working

Comments

@KayConceicao
Copy link

Subject of the issue/enhancement/features

Describe your issue here.
The close button is not unlocking when the page is complete although the next button locking is working fine.

Your environment

  • version (AT/Framework)
    AAT version: 0.10.5 | Framework version: 5.25.0
  • which browser and its version
    Chrome - latest version

Steps to reproduce

Tell us how to reproduce this issue.
Required page with PageNav at the bottom of the page (page is not added to plp). Close is set to unlock once page is complete. Click through components close button doesn't unlock unless you go to menu or previous page and return to page with close button.

Expected behaviour

Tell us what should happen
Close button should unlock after page complete as per next button.

Actual behaviour

Tell us what happens instead
Close button does not unlock even after the page is complete.

Screenshots (if you can)

@oliverfoster
Copy link
Member

oliverfoster commented Oct 26, 2023

It sounds very much like something else is happening which is causing an error to occur in the processing of the buttons.

It's the same bit of code which manages updating both buttons, at the same time.

'change:_isComplete change:_isLocked': this.onContentObjectComplete

locked: item._isLocked || (buttonConfig._lockUntilPageComplete && !currentPageComplete)

Any console logs?

@oliverfoster
Copy link
Member

oliverfoster commented Oct 26, 2023

As the close button doesn't have an _id attribute it fails on this line:

if (!id) return;

Which prevents the button from rerendering on page:_isComplete change.

I suggest just removing the line.

@oliverfoster oliverfoster added the bug Something isn't working label Oct 26, 2023
@oliverfoster
Copy link
Member

Bug is probably fixed in upcoming pr #49
But that pr is not 100% backward compatible.
So as not to impede the progress of that pr, I'm not going to do a bug fix release for this right now. The only solution for a running AAT is to upload a custom version of this plugin with that bug fixed.

@tomallpress
Copy link

tomallpress commented Feb 5, 2024

I'm still seeing this behaviour in a course I'm building in the AAT, using v2.4.0.

EDIT - interestingly, as a means of trying to get around this issue (needing to leave the page and re-enter in order to get the close button to activate), i added trickle to the last block of content on the page before the page nav. so you complete that block and then the page nav is revealed. when i do this, the close button does become active on page complete, without needing to leave and re-enter.

@oliverfoster
Copy link
Member

@StuartNicholls any progress?

@StuartNicholls
Copy link
Contributor

@oliverfoster sorry, not got to this yet

@oliverfoster
Copy link
Member

oliverfoster commented May 24, 2024

v2.4.0 was the last version before the aforementioned pr, I would expect it to have the bug.
pr which made v3.0.0 and should have fixed the issue: #49

Have tested with latest v3.1.3, cannot replicate.
pageNav close button

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants