-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
ui: code-editor-styling #11474
Merged
johncowen
merged 21 commits into
hashicorp:main
from
deblasis:ui/bugfix/code-editor-styling
Nov 12, 2021
Merged
ui: code-editor-styling #11474
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
7dfbc6e
WIP: code-editor-styling
deblasis ba53c6a
changelog
deblasis f2cfacd
fix: toolbar title & link for policies
deblasis 5035cfd
fix: width fix + dropdown styling
deblasis c9444da
fix: toolbar styling variables
deblasis 363e432
fix: ACL rules docs link on `fieldsets-legacy`
deblasis c72b6fc
WIP: code-editor-styling
deblasis a662d5f
changelog
deblasis 76ac2a8
fix: toolbar title & link for policies
deblasis e97e76f
fix: width fix + dropdown styling
deblasis 614cc51
fix: toolbar styling variables
deblasis d241512
fix: ACL rules docs link on `fieldsets-legacy`
deblasis 8bada55
Merge branch 'ui/bugfix/code-editor-styling' of github.com:deblasis/c…
deblasis 5f3bee3
Merge branch 'hashicorp:main' into ui/bugfix/code-editor-styling
deblasis bb014ff
Merge branch 'ui/bugfix/code-editor-styling' of github.com:deblasis/c…
deblasis bca9ad0
refactoring: using named blocks
deblasis 3a3d0ef
fix: removed unnecessary property
deblasis b149aff
fix: themeable black/white in dropdown
deblasis 24c43a2
fix: use variables for border
deblasis ed20fb7
ui: CodeEditor refactoring
deblasis f160233
Update ui/packages/consul-ui/app/components/code-editor/README.mdx
deblasis File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
```release-note:bug | ||
ui: code editor styling (layout consistency + wide screen support) | ||
``` | ||
```release-note:improvement | ||
ui: added copy to clipboard button in code editor toolbars | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 27 additions & 10 deletions
37
ui/packages/consul-ui/app/components/code-editor/index.hbs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,28 @@ | ||
<div class="toolbar-container"> | ||
<div class="toolbar"> | ||
<label class="title"> | ||
{{#if (has-block "label")}} | ||
{{yield to="label"}} | ||
{{/if}} | ||
</label> | ||
<div class="tools"> | ||
{{#if (has-block "tools")}} | ||
{{yield to="tools"}} | ||
{{else}} | ||
{{#if (and (not readonly) (not syntax))}} | ||
<PowerSelect | ||
@onChange={{action "change"}} | ||
@selected={{mode}} | ||
@searchEnabled={{false}} | ||
@options={{modes}} as |mode|> | ||
{{mode.name}} | ||
</PowerSelect> | ||
<div class="toolbar-separator"></div> | ||
<CopyButton @value={{value}} @name="value" /> | ||
{{/if}} | ||
{{/if}} | ||
</div> | ||
</div> | ||
</div> | ||
<IvyCodemirror @value={{value}} @name={{name}} @class={{class}} @options={{options}} @valueUpdated={{action onkeyup}} /> | ||
<pre><code>{{yield}}</code></pre> | ||
{{#if (and (not readonly) (not syntax))}} | ||
<PowerSelect | ||
@onChange={{action "change"}} | ||
@selected={{mode}} | ||
@searchEnabled={{false}} | ||
@options={{modes}} as |mode|> | ||
{{mode.name}} | ||
</PowerSelect> | ||
{{/if}} | ||
<pre><code>{{#if (has-block "content")}}{{yield to="content"}}{{else}}{{value}}{{/if}}</code></pre> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh dear 😆 it was just this 🤣 . Surprising nobody has tweaked this before now 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know, right? It happens, it's always a single line of code that is holding things together or that breaks everything :)