Skip to content

Commit

Permalink
Apply OS changes (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
marianacapelo committed May 18, 2022
1 parent 8ad5e3b commit 4b03794
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 2 deletions.
63 changes: 63 additions & 0 deletions build/azure-pipelines/os-monaco-core-pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
pool:
vmImage: 'windows-latest'

trigger:
branches:
include:
- main-os
pr: none

variables:
TagName: 'v$(Build.BuildNumber)'

stages:
- stage: Build
displayName: 'Build'
jobs:
- job: Build
displayName: 'Build Job'
steps:
- task: NodeTool@0
inputs:
versionSpec: "12.14.1"
- script: |
yarn
- script: |
./node_modules/.bin/gulp editor-distro
- task: PublishPipelineArtifact@1
inputs:
targetPath: './out-monaco-editor-core'
artifact: 'artifacts'
publishLocation: 'pipeline'


- stage: Deploy
displayName: 'Deploy'
jobs:
- deployment: Deploy
displayName: 'Deploy to npm private repository and creates a git release'
pool:
vmImage: 'windows-latest'
environment: Automatic-Release
strategy:
runOnce:
deploy:
steps:
#Creates a Github release
- task: GitHubRelease@1
inputs:
gitHubConnection: 'GitHub Release'
repositoryName: '$(Build.Repository.Name)'
action: 'create'
target: '$(Build.SourceVersion)'
tagSource: 'userSpecifiedTag'
tag: '$(TagName)'
changeLogCompareToRelease: 'lastFullRelease'
changeLogType: 'commitBased'
#Publishes the package into the private artifact repository
- task: Npm@1
inputs:
command: 'publish'
workingDir: '$(Pipeline.Workspace)/artifacts/'
publishRegistry: 'useFeed'
publishFeed: 'd8b4d1eb-aeb3-4b5b-9b43-37b4fc985e2f'
2 changes: 1 addition & 1 deletion build/monaco/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "monaco-editor-core",
"private": true,
"version": "0.0.0",
"version": "0.32.1-os",
"description": "A browser based code editor",
"author": "Microsoft Corporation",
"license": "MIT",
Expand Down
4 changes: 4 additions & 0 deletions src/vs/editor/common/languages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -674,6 +674,10 @@ export interface CompletionItem {
* A command that should be run upon acceptance of this item.
*/
command?: Command;
/**
* Custom icon to be used (instead of those ones that depend on the completionItem kind)
*/
customIcon?: HTMLElement;

/**
* @internal
Expand Down
10 changes: 9 additions & 1 deletion src/vs/editor/contrib/suggest/browser/suggestWidgetRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,16 @@ export class ItemRenderer implements IListRenderer<CompletionItem, ISuggestionTe
matches: createMatches(element.score)
};

if (data.iconContainer.firstChild) {
data.iconContainer.removeChild(data.iconContainer.firstChild);
}

let color: string[] = [];
if (completion.kind === CompletionItemKind.Color && _completionItemColor.extract(element, color)) {
if (completion.customIcon) {
data.icon.className = 'icon hide';
data.iconContainer.className = 'suggest-icon custom-icon';
append(data.iconContainer, completion.customIcon);
} else if (completion.kind === CompletionItemKind.Color && _completionItemColor.extract(element, color)) {
// special logic for 'color' completion items
data.icon.className = 'icon customcolor';
data.iconContainer.className = 'icon hide';
Expand Down

0 comments on commit 4b03794

Please sign in to comment.