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

feat: show Metals' release notes if server version is updated #1009

Merged
merged 13 commits into from
Jun 13, 2022

Conversation

kpodsiad
Copy link
Member

@kpodsiad kpodsiad commented Jun 6, 2022

Motivation

Currently Metals updates are completely silent and I suspect that most of the users doesn't even know that update just happened. Not everyone has twitter account or is checking Metals' blog on regular basis and this kind of people (I suspect that most of the beginners?) can omit all of those juicy new features which are shipped with the new release.

It is a goal of this PR to provide some mechanism to inform user about latest changes.


Other solutions

Currently, as far as I know, there is no mechanism for showing extension updates in vscode - see microsoft/vscode#102139. There are some ways to do it, for example I found https://github.com/alefragnani/vscode-whats-new but it seems like its use case is a bit different than what this PR needs (metals-vscode doesn't have any useful changes on its own).


Goals

Show some indicator that update happened, maybe show embedded release notes in the webview panel?

No matter what indicator will be chosen it mechanism should:

  • not show too often. Ideally only once, after first vscode window start with updated Metals extension
  • not show when running metals e.g. on gitpod or other containers which install extension every time
  • be able to be disabled in options

Current state

sbt-playground-1654627142733


Copy link
Contributor

@tgodzik tgodzik left a comment

Choose a reason for hiding this comment

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

Great idea! 🎉 It would be similar to the VS Code updates that show up, which are really nice to check out. The main difficulty will be to make sure that we don't show it too often.

src/releaseProvider.ts Outdated Show resolved Hide resolved
src/releaseProvider.ts Outdated Show resolved Hide resolved
src/releaseProvider.ts Outdated Show resolved Hide resolved
Copy link
Member Author

@kpodsiad kpodsiad left a comment

Choose a reason for hiding this comment

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

I think PR is ready for review & testing.
Tests:

  • MacOS - done by me
  • Linux
  • Windows (not sure how it'll work with wsl)
  • remote containers (gitpod, codespaces) - I read that they start from scratch every time, better to not show release notes at all than show them every time
  • synchronization between editors on local computer - release notes are showed only in first vscode instance, subsequent windows don't get them
  • synchronization between devices - not necessary but nice to have & should work

src/releaseNotesProvider.ts Outdated Show resolved Hide resolved
src/releaseNotesProvider.ts Outdated Show resolved Hide resolved
src/releaseNotesProvider.ts Outdated Show resolved Hide resolved
src/releaseNotesProvider.ts Outdated Show resolved Hide resolved
@kpodsiad kpodsiad changed the title [WIP] feat: show "What's changed" view after server/extension update feat: show Metals' release notes if server version is updated Jun 9, 2022
@kpodsiad kpodsiad marked this pull request as ready for review June 9, 2022 21:26
@kpodsiad kpodsiad requested a review from tgodzik June 9, 2022 21:26
@tanishiking
Copy link
Member

tanishiking commented Jun 10, 2022

@kpodsiad Thanks for kicking off, this is a great idea!

I remember GitLens extension shows a welcome/what's the new view if there're updates, so I checked how it is implemented.

Maybe we can store the server version in globalState and compare it with the previous ones. Nevermind! you already do this!

src/releaseNotesProvider.ts Outdated Show resolved Hide resolved
src/releaseNotesProvider.ts Show resolved Hide resolved
@tgodzik
Copy link
Contributor

tgodzik commented Jun 10, 2022

Current state

sbt-playground-1654627142733

Could we improve the spacing maybe somehow? The text seems kind of squashed.

@kpodsiad
Copy link
Member Author

@tgodzik I've increased margin for headers, it should be better now.

sbt-playground-1654933445764

src/releaseNotesProvider.ts Outdated Show resolved Hide resolved
src/releaseNotesProvider.ts Show resolved Hide resolved
@kpodsiad kpodsiad requested review from tanishiking and dos65 June 11, 2022 07:51
@tanishiking
Copy link
Member

The change looks good to me! Let me playing around this change a bit :)

@kpodsiad
Copy link
Member Author

I think author part needs some overhaul. Maybe simple prefix like Authored by: <author name with link to twitter (current content)>. What do you think?

src/releaseNotesProvider.ts Outdated Show resolved Hide resolved
@Arthurm1
Copy link
Contributor

Is there a command to bring up the release notes? Maybe add show release notes in Help and Feedback?

image

@kpodsiad
Copy link
Member Author

Is there a command to bring up the release notes? Maybe add show release notes in Help and Feedback?

image

Great idea @Arthurm1. I can both command and button in 'Help and Feedback'.

@kpodsiad
Copy link
Member Author

I've added a command Metals: show release notes which will allow to open webview with current release notes.

@kpodsiad kpodsiad requested a review from tgodzik June 13, 2022 07:14
Copy link
Contributor

@tgodzik tgodzik left a comment

Choose a reason for hiding this comment

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

Looks good! Let's just rebase on the main branch

src/releaseNotesProvider.ts Outdated Show resolved Hide resolved
src/releaseNotesProvider.ts Show resolved Hide resolved
@kpodsiad
Copy link
Member Author

I'm merging, pre-release it's time to do your job :D

@kpodsiad kpodsiad merged commit 3ebbea7 into scalameta:main Jun 13, 2022
@kpodsiad kpodsiad deleted the feat/whats-new branch June 13, 2022 17:14
tgodzik added a commit to tgodzik/metals-vscode that referenced this pull request Jun 13, 2022
@tgodzik
Copy link
Contributor

tgodzik commented Jun 13, 2022

I reverted the PR in #1019 since it seems to have broke Metals at all.

kpodsiad added a commit to kpodsiad/metals-vscode that referenced this pull request Jun 14, 2022
@kpodsiad kpodsiad mentioned this pull request Jun 14, 2022
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.

4 participants