-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
core(fr): add supportedModes
filter to categories
#13161
Conversation
import {flowResult} from '../sample-flow'; | ||
import {I18nProvider} from '../../src/i18n/i18n'; | ||
import {FlowResultContext} from '../../src/util'; | ||
|
||
let wrapper: FunctionComponent; | ||
|
||
beforeEach(() => { | ||
// Include sample flowResult for locale in I18nProvider. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Drive by change to this test so the expectations don't change every time the sample is updated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
quite a few lines for a drive by ;)
@@ -13,7 +13,10 @@ import {LH_ROOT} from '../../root.js'; | |||
import UserFlow from '../fraggle-rock/user-flow.js'; | |||
|
|||
(async () => { | |||
const browser = await puppeteer.launch({headless: false}); | |||
const browser = await puppeteer.launch({ | |||
executablePath: process.env.CHROME_PATH, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was noticing the FPS was rendered incorrectly on the default puppeteer chrome. We could also update the puppeteer version in this PR. Not sure it started showing up now though.
@@ -134,6 +134,7 @@ declare module Config { | |||
auditRefs: AuditRefJson[]; | |||
description?: string | IcuMessage; | |||
manualDescription?: string | IcuMessage; | |||
supportedModes?: Gatherer.GatherMode[]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Required in v9?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
meh, leaving as the default to always run seems fine even in v9, but I'll leave it up to you
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
import {flowResult} from '../sample-flow'; | ||
import {I18nProvider} from '../../src/i18n/i18n'; | ||
import {FlowResultContext} from '../../src/util'; | ||
|
||
let wrapper: FunctionComponent; | ||
|
||
beforeEach(() => { | ||
// Include sample flowResult for locale in I18nProvider. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
quite a few lines for a drive by ;)
@@ -134,6 +134,7 @@ declare module Config { | |||
auditRefs: AuditRefJson[]; | |||
description?: string | IcuMessage; | |||
manualDescription?: string | IcuMessage; | |||
supportedModes?: Gatherer.GatherMode[]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
meh, leaving as the default to always run seems fine even in v9, but I'll leave it up to you
sample JSON needs an update |
Thinking out loud but not sure if there's something worthwhile here: Something about the fact that this is largely about filling in the filtering gaps created because an audit can be in more than one category, and that there's redundancy with I understand sharing the default config between the classic and new navigation modes, but is there a reason we haven't made a |
This would mean we need 6 configs (desktop/mobile and 3 gather modes for each). We would probably have to repeat some config implementation somewhere. Maybe we could have used separate configs for (#13013), but I think the problem is that we don't want simulated throttling to even be possible with timespan modes. I'm not sure we even want PWA to be available at all in snapshot or timespan through Maybe we could hardcode an override for PWA like we did with throttling settings. With this however, a new audit in SEO that works in all three modes would quietly add SEO to all timespan reports (unless we hardcode another exception). I like the ability to explicitly control which categories appear for each mode, and I don't think a |
My primary thoughts here in general are that relying on manual configuration rather than the property-based enforcement we see in this PR complicates the story not just for us but all other config authors as well. For example, a plugin author would need to publish 3 different versions of their plugin for each gather mode, three npm namespaces, with different configs, etc. Relying on manual configuration instead of automatic enforcement also tends to be more prone to errors (oops we forgot to update the timespan-config rather than "oh hey we adjusted this audit, adjust the top of the same file") |
Ha, well if y'all feel that good about this, that's fine :) Long term, I don't think six default configs is that big of a deal. We have three pretty different modes, we have multiple methods of config composition available to us to make maintenance easier (our I suspect the more the different modes diverge in expected or required behavior the less desirable it's going to be to smooth over the differences with more configuration options and the easier it's going to be to just define them separately, but obviously this isn't the straw that breaks that particular camel's back :) An option to keep in our back pocket, though. |
This is a fancy way of hiding PWA in timespan and snapshot. Filter is defined in the config.