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

Emmet Wrap with Abbreviation History, fixes #40096 #114170

Closed
wants to merge 2 commits into from

Conversation

rzhao271
Copy link
Contributor

This PR fixes #40096 by replacing the inputbox that shows up during Wrap with Abbreviation with a quickpick.

@rzhao271 rzhao271 added feature-request Request for new features or functionality emmet Emmet related issues labels Jan 11, 2021
@rzhao271 rzhao271 added this to the January 2021 milestone Jan 11, 2021
@rzhao271 rzhao271 requested a review from sbatten January 11, 2021 21:47
@rzhao271 rzhao271 self-assigned this Jan 11, 2021
@rzhao271 rzhao271 marked this pull request as ready for review January 11, 2021 23:37
Copy link
Member

@sbatten sbatten left a comment

Choose a reason for hiding this comment

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

I did not test this yet, but I wonder how it performs when compared to something simpler like the commit message box history. I think we should aim for something light still and I could imagine after several emmet usages, the list could get long and cluttered making basic emmet usage more cumbersome. I know we cannot use an input box with history from an extension but the spirit remains.

* Both successful (accepted) and non-successful (cancelled) expansion attempts are stored.
* The expansion attempts are stored per extension reload.
*/
let previousItems: Set<string> = new Set();
Copy link
Member

Choose a reason for hiding this comment

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

could be const if you don't recreate

Copy link
Member

Choose a reason for hiding this comment

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

should this be initialized from previous sessions. e.g. if I press up in the commit message box, i can see commit messages from long ago

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think that can go into a separate feature, since firstly, I'd have to look into where to write the abbreviation history to, and secondly, I'd probably need to add a "clear history" command.

previousItems.add(valueToUse);
resolve(valueToUse);
} else {
resolve('');
Copy link
Member

Choose a reason for hiding this comment

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

undefined?

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 value is passed to makeChanges, and both undefined and '' would do the same thing in this case.

@rzhao271 rzhao271 force-pushed the rzhao271/wwa-history branch from 0376024 to b52667f Compare January 13, 2021 00:34
@rzhao271
Copy link
Contributor Author

I did not test this yet, but I wonder how it performs when compared to something simpler like the commit message box history. I think we should aim for something light still and I could imagine after several emmet usages, the list could get long and cluttered making basic emmet usage more cumbersome. I know we cannot use an input box with history from an extension but the spirit remains.

Just tested -- the quickpick comes with a scrollbar, so it isn't too bad.

@rzhao271 rzhao271 requested a review from sbatten January 13, 2021 01:08
@rzhao271 rzhao271 force-pushed the rzhao271/wwa-history branch from 11a683d to 29fed26 Compare January 14, 2021 00:23
@rzhao271 rzhao271 dismissed sbatten’s stale review January 20, 2021 19:11

Added response as comment, also testing this GitHub feature

@rzhao271 rzhao271 force-pushed the rzhao271/wwa-history branch from 29fed26 to a569ac3 Compare January 20, 2021 19:38
@rzhao271
Copy link
Contributor Author

Discussed offline with @sbatten
Closing this for now as we feel that implementing a history feature into the inputbox would be a better solution.

@rzhao271 rzhao271 closed this Jan 22, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Mar 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
emmet Emmet related issues feature-request Request for new features or functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wrap with abbreviation history
2 participants