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

Add ability for teams test app to remember scroll position on reload #2276

Open
wants to merge 29 commits into
base: main
Choose a base branch
from

Conversation

alexneyman-MSFT
Copy link
Contributor

For more information about how to contribute to this repo, visit this page.

323340276-5cd05365-6e54-4eee-bba2-38208f7da82d.mp4

Description

Our test app is very large and sometimes we're using it to manually test a specific capability which requires scrolling or ctrl-F to the right spot every reload. This change optionally sets the scroll position of the window and stores it in session storage to enable returning to the same spot after a reload. I've also added a scroll-to-top button.

Main changes in the PR:

  1. Save last scroll position to session storage and return to that spot on reload (if toggled on)
  2. add scroll-to-top button for easily getting back to the top

Validation

Validation performed:

See attached video

@alexneyman-MSFT alexneyman-MSFT requested a review from a team as a code owner April 17, 2024 19:26
const handleScroll = throttle(() => {
const scrollPosition = window.scrollY;
sessionStorage.setItem('iframeScrollPosition', JSON.stringify(scrollPosition));
console.log('scrolling');
Copy link
Contributor

Choose a reason for hiding this comment

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

Same for here

apps/teams-test-app/src/components/ScrollToTop.tsx Outdated Show resolved Hide resolved
Copy link
Contributor

@TrevorJoelHarris TrevorJoelHarris left a comment

Choose a reason for hiding this comment

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

Left a few change requests for you!

alexneyman-MSFT and others added 23 commits May 6, 2024 12:04
* Split iOS E2E Testing pipeline to two

* update

* update

* update

* update

* update

* update

* update
* Removed beta tage on Pages.currentApp namespace and APIs

* Added changefile

* Update change/@microsoft-teams-js-51421b73-089f-43de-9076-75563e1f064c.json

---------

Co-authored-by: Trevor Harris <trharris@microsoft.com>
…yerPort (#2277)

Update Message Channel capability to support sub capabilities, add data layer capability with getDataLayerPort
---------

Co-authored-by: sumathin <sum_nat1@yahoo.com>
Co-authored-by: sumathin <sunatara@microsoft.com>
Co-authored-by: Trevor Harris <trharris@microsoft.com>
* backed out all exported const enums
* add sdf release yaml

---------

Co-authored-by: jadahiya-MSFT <95651173+jadahiya-MSFT@users.noreply.github.com>
Co-authored-by: Trevor Harris <trharris@microsoft.com>
* Update comment

* Update changefile
…onnector Plugins (#2272)

* Adding PPC auth

* Adding PPCauth UTs

* adding change file

* Resolving comments

* Resolving comments

* Modify hasScriptTags function to handle encoded Input

* Modify hasScriptTags function to handle encoded Input

* updating default input

* Modify hasScriptTags function to handle encoded Input

* adding telemetry tag for ppc auth

* Removing pluginId and adding unit tests

* Changing url to string before passign to psotmessage

* Removing regualr expression for html entities

* Removing regualr expression for html entities

* Modifying comments

* Modifying comments

* Resolving comments

* Resolving comments

---------

Co-authored-by: Lakhveer Kaur <lakhveerkaur@microsoft.com>
Co-authored-by: Erin <erinha@microsoft.com>
* Webstorage becomes capability

* Update webstorage in test app

* Update webstorage test json

* Add changefile

* Test updates

* Test updates

* Final test updates

* Helpful util

* Empty json test file
* Publish android artifacts

* Use 1ES publishing steps

* task names

* Use updated artifact location

* Add job attempt
* Added in new valid domains for Copilot Chat

* Added in changefile

---------

Co-authored-by: AE ( ͡ಠ ʖ̯ ͡ಠ) <36546967+AE-MS@users.noreply.github.com>
* Restrict authentication.authenticate to only accept https urls

* Create @microsoft-teams-js-40968a44-8220-4162-a289-038e99f5bee3.json

* Updated based on PR feedback

* Updated to use new validation functions and added(?) support for URL encoded strings

* abstract out the auth code's use of the a tag and then add tests to make sure URL encoded partial urls work correctly

* Re-order imports

* Updated based on PR feedback

---------

Co-authored-by: AE ( ͡ಠ ʖ̯ ͡ಠ) <36546967+AE-MS@users.noreply.github.com>
* Fix incorrect API telemetry label for Pages_NavigateToApp API

* update

* Update @microsoft-teams-js-d2040181-a9a1-42d2-9080-35acb3a380cd.json

---------

Co-authored-by: AE ( ͡ಠ ʖ̯ ͡ಠ) <36546967+AE-MS@users.noreply.github.com>
* Update sdf-release.yml for Azure Pipelines

* Update sdf-release.yml for Azure Pipelines
Co-authored-by: sthousto <sthousto@microsoft.com_odspmdb>
Co-authored-by: Trevor Harris <trharris@microsoft.com>
* Initial commit

* Update ci

* Update ci

* remove deprecated sub dependencies

* Specify exact version in ci
* Update .npmrc location

* Changefile

* Update @microsoft-teams-js-b63da2d9-3e02-4b83-9664-78aa8f49c713.json

* use new scripts for onebranch pipelines

---------

Co-authored-by: AE ( ͡ಠ ʖ̯ ͡ಠ) <36546967+AE-MS@users.noreply.github.com>
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