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 console warnings if a shortcut has been skipped. #122

Merged
merged 4 commits into from
Mar 11, 2020

Conversation

rayankans
Copy link
Contributor

Resolves #116

@rayankans
Copy link
Contributor Author

@andreban Do you mind taking a look

@andreban
Copy link
Member

Have you considered using Log.ts to output the warnings? There's a Log.warn() method that will format it as a warning (yellow) and with a tag.

@rayankans
Copy link
Contributor Author

Changed this to use Log.ts

@@ -100,6 +101,8 @@ export class TwaManifest {
generatorApp: string;
webManifestUrl?: URL;

private static log: Log = new Log('twa-manifest');
Copy link
Member

Choose a reason for hiding this comment

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

nit: I've been passing a log object in the constructor, but initialising with a default value. This helps with tests so those don't pollute the console. But I'm ok to keep like this too.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's being used from within a static function though. I could make it a module-level constant but that won't help with the pollution issue.

@andreban andreban merged commit a62bec9 into GoogleChromeLabs:master Mar 11, 2020
@andreban andreban added the enhancement New feature or request label Mar 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Shortcut items with no icon URL are ignored
2 participants