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

Drop some comments and logging #8073

Merged
merged 13 commits into from
Mar 29, 2024
Merged

Drop some comments and logging #8073

merged 13 commits into from
Mar 29, 2024

Conversation

fregante
Copy link
Contributor

@fregante fregante commented Mar 27, 2024

What does this PR do?

Checklist

@@ -18,8 +18,6 @@
import React, { Suspense } from "react";
import { type DocumentViewProps } from "./DocumentViewProps";

// Dynamic import because documentView has a transitive dependency of react-shadow-root which assumed a proper
// `window` variable is present on module load. This isn't available on header generation
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Comment related to "headers" generation. We don't have such restrictions anymore

@@ -130,7 +130,6 @@ let modActivationPanelEntry: ModActivationPanelEntry | null = null;
* Attach the sidebar to the page if it's not already attached. Then re-renders all panels.
*/
export async function showSidebar(): Promise<void> {
console.debug("sidebarController:showSidebar");
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These logs are super old, we should try to remove old logs on parts of the extension that are stable and are no longer monitoring.

Copy link

codecov bot commented Mar 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.20%. Comparing base (bd8f4c3) to head (3d2b2cd).

❗ Current head 3d2b2cd differs from pull request most recent head e11d6ed. Consider uploading reports for the commit e11d6ed to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8073   +/-   ##
=======================================
  Coverage   73.19%   73.20%           
=======================================
  Files        1310     1310           
  Lines       40737    40729    -8     
  Branches     7567     7567           
=======================================
- Hits        29818    29816    -2     
+ Misses      10919    10913    -6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

const data = (await runPipeline(body, {
key: "body",
counter: 0,
})) as JsonObject;
Copy link
Contributor Author

@fregante fregante Mar 27, 2024

Choose a reason for hiding this comment

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

Async-await code is easier to follow, and shorter if we account for the eslint-disable comments.

Here for example it makes the unknown as JsonObject assertion visible.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we consider making runPipeline accept a generic instead of casting?

Copy link
Contributor

@twschiller twschiller Mar 27, 2024

Choose a reason for hiding this comment

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

That would be OK for now (e.g., TReturn). This type is actually wrong, I think the correct type is JsonValue. It just doesn't matter in practice because we pass it around as-is

The future change toRunPipeline would be to make the type TReturn extends JsonValue

@twschiller
Copy link
Contributor

Adding @fungairino as reviewer/FYI because he's working on Playwright test infrastructure for the sidebar

@@ -82,7 +82,7 @@ const PanelContent: React.FC = () => {
return () => {
navigationEvent.remove(onNavigation);
};
}, [navigationEvent, onNavigation]);
}, [onNavigation]);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The exhaustive-deps rule was warning on this line. navigationEvent never changes because it's "global"

Copy link

No loom links were found in the first post. Please add one there if you'd like to it to appear on Slack.

Do not edit this comment manually.

@grahamlangford
Copy link
Collaborator

cc @fungairino -- Playwright failure

@fregante fregante enabled auto-merge (squash) March 27, 2024 14:36
@fungairino
Copy link
Collaborator

fungairino commented Mar 28, 2024

Looks like e2e tests caught a regression in this PR. The admin console does not open automatically after the extension is done installing (we expect it to open in a new tab to automatically link the extension).

I'm going to open a separate PR to add a timeout to the await page call that we make in the e2e setup code so it's more clear what it fails on.

@fregante
Copy link
Contributor Author

Got it, sidebarDomControllerLite was imported by the MV3 background, which lacks a document. Context in #7185 (comment)

@fregante fregante enabled auto-merge (squash) March 29, 2024 07:31
@fregante fregante merged commit 1625923 into main Mar 29, 2024
19 checks passed
@fregante fregante deleted the F/clean/comments branch March 29, 2024 07:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

4 participants