Skip to content

Fix PageContext #11751

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

Merged
merged 1 commit into from
Mar 17, 2023
Merged

Fix PageContext #11751

merged 1 commit into from
Mar 17, 2023

Conversation

cinqmilleans
Copy link
Contributor

Resolved / Related Issues
When you activate a tab to the left of the current tab, the left tab becomes IsCurrentInstance = true before the right tab becomes IsCurrentInstance = false. As a result, there are 2 "current" instances at the same time. This case was mishandled by PageContext. This pr modifies PageContext so that this case is no longer an issue.

The consequence was that when switching tabs to the left, the actions no longer used the correct IShellPage and therefore everything was wrong.

I also removed the reaction to changing ActivePane, as it always involves changing ActivePaneOrColumn. This avoids triggering the change event twice.

Validation
How did you test these changes?

  • Did you build the app and test your changes?
  • Did you check for accessibility? You can use Accessibility Insights for this.
  • Did you remove any strings from the en-us resource file?
    • Did you search the solution to see if the string is still being used?
  • Did you implement any design changes to an existing feature?
    • Was this change approved?
  • Are there any other steps that were used to validate these changes?
  1. Open a second tab.
  2. Reactive the first tab.
  3. The icons in the toolbar react to selection.

Copy link
Member

@yaira2 yaira2 left a comment

Choose a reason for hiding this comment

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

LGTM

@yaira2 yaira2 added the ready to merge Pull requests that are approved and ready to merge label Mar 17, 2023
@yaira2 yaira2 merged commit 0f3fc5b into files-community:main Mar 17, 2023
hishitetsu added a commit to hishitetsu/Files that referenced this pull request Mar 18, 2023
* Fixed: Selection isn't cleared when switching between panes (files-community#11745)

* New Crowdin updates (files-community#11747)

* Feature: Improved commands for Pin/Unpin (files-community#11729)

* Feature: RichCommands Cut/Copy (files-community#11752)

* Fix PageContext (files-community#11751)

* Feature: Auto update feature of FilesLauncher (files-community#11750)

* Fix: Fixed issue with resolving paths containing dots

---------

Co-authored-by: Filippo Ferrario <102259289+ferrariofilippo@users.noreply.github.com>
Co-authored-by: Yair <39923744+yaira2@users.noreply.github.com>
Co-authored-by: cinqmilleans <46631671+cinqmilleans@users.noreply.github.com>
Co-authored-by: Filippo Ferrario <f.filippo49@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready to merge Pull requests that are approved and ready to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

File action are disabled for first tab when multiple tabs are open
2 participants