Skip to content

ApplicationCustomizer: context.application.navigatedEvent logic #4054

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

Closed
1 of 4 tasks
AJIXuMuK opened this issue May 28, 2019 · 17 comments
Closed
1 of 4 tasks

ApplicationCustomizer: context.application.navigatedEvent logic #4054

AJIXuMuK opened this issue May 28, 2019 · 17 comments
Labels
area:spfx Category: SharePoint Framework (not extensions related) area:spfx-extensions Category: SharePoint Framework Extensions status:working-on-it Known issue / feature being addressed. Will use other "status:*" labels & comments for more detail. type:bug-confirmed Confirmed bug, not working as designed / expected.

Comments

@AJIXuMuK
Copy link
Collaborator

AJIXuMuK commented May 28, 2019

Category

  • Question
  • Typo
  • Bug
  • Additional article idea

Could you please explain the logic, how context.application.navigatedEvent is called in ApplicationCustomizer?

From what I can see:

  1. it is called when navigating between pages. For example, from one list to another. That seems correct.
  2. If you navigate between two same pages (in my cases - two lists) it stops firing. List A -> List B - fired. List B -> List A - no fired
  3. it is called when navigating between views in the same list FOR THE FIRST TIME ONLY. It seems weird.
@msft-github-bot
Copy link
Collaborator

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

@msft-github-bot msft-github-bot added the Needs: Triage 🔍 Awaiting categorization and initial review. label May 28, 2019
@andrewconnell andrewconnell added area:spfx Category: SharePoint Framework (not extensions related) type:question Question... if answered, will be tagged as such. and removed Needs: Triage 🔍 Awaiting categorization and initial review. labels May 28, 2019
@andrewconnell andrewconnell added the area:spfx-extensions Category: SharePoint Framework Extensions label Jun 4, 2019
@OliverZeiser
Copy link

Seems to be the same old issue as this #3836

@ahackettms
Copy link

We are working on fixing this issue soon. Thank you for your patience.

@andrewconnell andrewconnell added status:working-on-it Known issue / feature being addressed. Will use other "status:*" labels & comments for more detail. type:bug-confirmed Confirmed bug, not working as designed / expected. and removed type:question Question... if answered, will be tagged as such. area:spfx Category: SharePoint Framework (not extensions related) labels Oct 9, 2019
@OliverZeiser
Copy link

@ahackettms please also make sure, that the pageContext of sharepoint framework is getting updated correctly. This is not the case right now when navigating between lists. Thank you!

@ctofts86
Copy link

ctofts86 commented Oct 24, 2019

Is there any update or idea as to when this fix may be deployed yet? Experiencing similar issues myself when navigating using quick links web part / Hub nav / sites web part to navigate to sites associated with a Hub. Many thanks.

@ahackettms
Copy link

The fix for this issue should have been deployed. Please try again. @andrewconnell
Note that the fix address the scenario of navigating between pages and lists, but doesn't address navigating into folders.

@OliverZeiser
Copy link

It took quite a long time, but I can confirm it is finally working! Thank you!

@ahackettms
Copy link

ahackettms commented Dec 10, 2019

Great! It was actually deployed a few weeks ago.
@patmill shall we close this issue and other duplicate issues?

@srinutamada
Copy link

srinutamada commented Dec 11, 2019

I didn't see it's working in my scenario. Do I need to rebuild the solution? Please provide steps to perform from my side to see the change.

Issue: Custom commands sets developed for different libraries. For the first time, these commands loading based on the library, but later it's not loading properly. The most recent library's commands are appearing for all other libraries which is not expected.

@ctofts86
Copy link

I can confirm it does not work in my scenario either. Scenario is I am on a hub site and navigate to another site via the sites webpart. Anything clickable in the footer that uses this.context still uses the context of the page I navigated away from.

As @srinutamada says, do we need to rebuild / redeploy the solution?

@AJIXuMuK
Copy link
Collaborator Author

Hi all,

It works better.
But...

  1. Sometimes the event is fired after navigation, and sometimes before. You can check it by adding console.log(window.location.href). Sometimes you'll see the final url there, sometimes transitional url like https://tenant.sharepoint.com/sites/site/Lists/List%201/AllItems.aspx?id=%2Fsites%2Fsite%2FLists%2FList%202&newTargetListUrl=%2Fsites%2Fsite%2FLists%2FList%202&viewpath=%2Fsites%2Fsite%2FLists%2FList%202%2FAllItems%2Easpx
  2. Point 3 from the initial description is still there - when navigating between views the even is fired for the first time only.

@andrewconnell
Copy link
Collaborator

@ahackettms people are still saying this issue is present... as such I don't think we can close this or others...

@clarktozer
Copy link

As per my ticket #5029 , the event does not fire when creating new pages from a Site Page, which means the context is not correct.

@a-sam-randall
Copy link

I am also able replicate #5029 , when creating a new page does not trigger the navigatedEvent.

@andrewconnell I believe #5029 is a different issue as it has never been mentioned in this issue previous to your mention of it. This issue (#4054) is very generic with specific issues being mentioned in it. This makes it really hard to tell what specific issues have been addressed by the SP team.

@clarktozer
Copy link

#5029 still remains an issue for me.

@VesaJuvonen VesaJuvonen added the area:spfx Category: SharePoint Framework (not extensions related) label Nov 1, 2021
@AJIXuMuK
Copy link
Collaborator Author

AJIXuMuK commented Nov 8, 2021

@clarktozer - sorry for the long delay. #5029 seems to be fixed.

For the initial one - it works fine now. The event is not firing when navigating between views, but technically we're not changing the page.

If there are any proposals on how application customizers should work - please comment in this discussion: #7406

@AJIXuMuK AJIXuMuK closed this as completed Nov 8, 2021
@ghost
Copy link

ghost commented Nov 16, 2021

Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues

@ghost ghost locked as resolved and limited conversation to collaborators Nov 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area:spfx Category: SharePoint Framework (not extensions related) area:spfx-extensions Category: SharePoint Framework Extensions status:working-on-it Known issue / feature being addressed. Will use other "status:*" labels & comments for more detail. type:bug-confirmed Confirmed bug, not working as designed / expected.
Projects
None yet
Development

No branches or pull requests

10 participants