Skip to content

Fixes #3099 - use vscode-extension-proposals to unify proposal logic - #3101

Merged
rgrunber merged 1 commit into
redhat-developer:masterfrom
robstryker:issue3099
May 19, 2023
Merged

rgrunber merged 1 commit into
redhat-developer:masterfrom
robstryker:issue3099

Conversation

@robstryker

Copy link
Copy Markdown
Contributor

No description provided.

@rgrunber
rgrunber self-requested a review May 10, 2023 18:47
@rgrunber rgrunber added this to the End May 2023 milestone May 10, 2023

@rgrunber rgrunber left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Using just a simple Maven project, I noticed when I click the "Never" option (when opening a pom file), then next time I start up the window and open a pom file, I still see the notification prompt showing up. In the $HOME/.config/Code/User/globalStorage/vscode-extension-recommender/extension-recommender.model.json shows something like :

{
    "sourceId": "redhat.java",
    "extensionId": "redhat.fabric8-analytics",
    "extensionDisplayName": "Dependency Analytics",
    "description": "The [Dependency Analytics](https://github.com/fabric8-analytics) extension helps you to stay informed about vulnerable dependencies in pom.xml files.",
    "shouldShowOnStartup": false,
    "timestamp": 1684205886424,
    "userIgnored": false
}

within the "recommendations" list.

}

async function delayedShowDependencyRecommendation (context: vscode.ExtensionContext, recommendService: IRecommendationService): Promise<void> {
await new Promise(f => setTimeout(f, 6000));

@rgrunber rgrunber May 16, 2023 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is this delay needed ?

Update: @robstryker mentioned this is so that we give other extensions starting up (this code is activated on startup) the opportunity to register/display any recommendations they have. That way, if any recommend the dependency analytics, we don't prompt once again.

Basically, this part of the code can sometimes behave as a manual notification on startup (in the case where a pom file is already opened), so we need to be careful not to spam the notification.

@robstryker

Copy link
Copy Markdown
Contributor Author

found the bug. will fix.

@robstryker

Copy link
Copy Markdown
Contributor Author

Released patched vscode-extension-proposals and using v0.0.18 now.

@rgrunber rgrunber left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I've played around with this and it looks good to me now. Just let me know if there's any additional changes/bugs you plan to make based on any recent feedback to @redhat-developer/vscode-extension-proposals prior to merging so to ensure what we'll merge is solid initially.

USAGE_DATA.md still accurately encompasses the reported telemetry so no changes needed there.

… proposal logic

Signed-off-by: Rob Stryker <rob@oxbeef.net>

Upversion proposals dependency to 0.0.16

Signed-off-by: Rob Stryker <rob@oxbeef.net>

Upversion to newest extension-proposals 0.0.18

Signed-off-by: Rob Stryker <rob@oxbeef.net>

Use newest extension-proposals 0.0.21

Signed-off-by: Rob Stryker <rob@oxbeef.net>
@rgrunber rgrunber linked an issue May 19, 2023 that may be closed by this pull request
@rgrunber
rgrunber merged commit 02deb55 into redhat-developer:master May 19, 2023
@rgrunber rgrunber removed this from the End May 2023 milestone May 19, 2023
gayanper pushed a commit to gayanper/vscode-java that referenced this pull request May 27, 2023
…per#3101)

- Use newest extension-proposals 0.0.21
- Fixes redhat-developer#3099 

Signed-off-by: Rob Stryker <rob@oxbeef.net>
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

Successfully merging this pull request may close these issues.

Use vscode-extension-proposals for recommendations

2 participants