Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Pwabuilder domain setting #7767

Merged
merged 5 commits into from
Mar 17, 2023
Merged

Pwabuilder domain setting #7767

merged 5 commits into from
Mar 17, 2023

Conversation

barankyle
Copy link
Member

@barankyle barankyle commented Mar 16, 2023

Summary

Added a clientSetting for the PWA serviceworker script path. This fixes a bug where
some browsers couldn't load it when it was served from the storage provider, since
they were still attempting to get it from the client server, and not accepting a 302
link.

Refactored a lot of the use of state, mainly removing accessState and
useState. In the process, converted a lot of useState's in .tsx files to
useHookstate. Almost all of the admin pages have been converted, plus some other
items like ProfileMenu - basically, any file that was using some sort of admin state
in the deprecated fashion, and which was updated to use
useHookstate(getMutableState(State)).

References

closes #insert number here

Checklist

  • If this PR is still a WIP, convert to a draft
  • When this PR is ready, mark it as "Ready for review"
  • ensure all checks pass
  • Changes have been manually QA'd
  • Changes reviewed by at least 2 approved reviewer

QA Steps

List any additional steps required to QA the changes of this PR, as well as any supplemental images or videos.

This was needed to make it configurable, so that if client files are
served from the storage provider, the service worker is fetched from there
and not the app subdomain, as it might go through a 304 on index.html and
not be seen as the proper file type.

Converted a lot of deprecated use of state. Removed access<Service>State
and use<Service>State usage for all admin services. All files that were
using these deprecated state usage now access is via useHookstate.
In all of these files, also convered all usage of React's useState to
useHookstate.

Most admin pages have been converted, though some that were not using
any service's state, just useState, were omitted. Non-admin pages
and components that were using admin service in the deprecated fashion
have been converted, though there are a number that have not.

Fixed some bugs with OAuth provider icon sizes.
@barankyle barankyle force-pushed the pwabuilder-domain-setting branch from 5b7f708 to 2a9d06b Compare March 16, 2023 00:45
@speigg speigg enabled auto-merge March 17, 2023 00:43
@barankyle barankyle linked an issue Mar 17, 2023 that may be closed by this pull request
@speigg speigg added this pull request to the merge queue Mar 17, 2023
@speigg speigg merged commit 56b6e67 into dev Mar 17, 2023
@speigg speigg deleted the pwabuilder-domain-setting branch March 17, 2023 23:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: pwabuilder-sw.js not served from storage provider
2 participants