This repository has been archived by the owner on Jan 18, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 77
Conversation
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
improbable-prow-robot
added
do-not-merge/work-in-progress
Indicates that a PR should not merge because it is a work in progress.
jira/no-ticket
Indicates a PR has no corresponding JIRA ticket
labels
Sep 9, 2020
improbable-prow-robot
added
the
size/M
Denotes a PR that changes 40-149 lines, ignoring generated files.
label
Sep 9, 2020
improbable-prow-robot
removed
the
do-not-merge/work-in-progress
Indicates that a PR should not merge because it is a work in progress.
label
Sep 9, 2020
…os/gdk-for-unity into bug/worker-inspector-indentation
Comment on lines
142
to
145
var varDef = newVariable ? "var " : ""; | ||
var nestParam = containedType.Category == ValueType.Type ? $", {nestVar} + 1" : ""; | ||
|
||
if (newVariable) | ||
{ | ||
yield return $"var {uiElementName} = new {inner}(\"{label}\");"; | ||
} | ||
else | ||
{ | ||
yield return $"{uiElementName} = new {inner}(\"{label}\");"; | ||
} | ||
yield return $"{varDef}{uiElementName} = new {inner}(\"{label}\"{nestParam});"; |
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.
This is difficult to understand what's going on here. Can we refactor this function to make this clearer?
Comment on lines
5
to
13
public static class VisualElementExtensions | ||
{ | ||
public static void ShiftRightMargin(this VisualElement element, uint nest, float offset = -11) | ||
{ | ||
var style = element.style; | ||
var val = style.marginRight.value.value; | ||
style.marginRight = new StyleLength(val + offset * nest); | ||
} | ||
} |
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'd possibly make this internal and expose the assembly internals to the generated code.
Probably wouldn't want this to clutter code completion for users using VisualElement
s elsewhere.
Kudos, SonarCloud Quality Gate passed! 0 Bugs |
jamiebrynes7
approved these changes
Sep 11, 2020
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
jira/no-ticket
Indicates a PR has no corresponding JIRA ticket
size/M
Denotes a PR that changes 40-149 lines, ignoring generated files.
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.
Description
Fixed the indentation issue in the Worker Inspector due to nesting of
VisualElements
Tests
Created dummy components with various nesting levels of collections and check the indentation in the Worker Inspector manually
Documentation
How is this documented (for example: release note, upgrade guide, feature page, in-code documentation)?
Primary reviewers
If your change will take a long time to review, you can name at most two primary reviewers who are ultimately responsible for reviewing this request. @ mention them.