Commit c28ba2af authored by Ezekiel Kigbo's avatar Ezekiel Kigbo

Merge branch '332072-update-policy-editor-styling' into 'master'

Update styling on policy editor page

See merge request gitlab-org/gitlab!62970
parents 5b3203f7 6afd8ac9
...@@ -97,7 +97,7 @@ export default { ...@@ -97,7 +97,7 @@ export default {
<section> <section>
<div class="gl-mb-5 gl-border-1 gl-border-solid gl-border-gray-100 gl-rounded-base"> <div class="gl-mb-5 gl-border-1 gl-border-solid gl-border-gray-100 gl-rounded-base">
<gl-form-group <gl-form-group
class="gl-px-5 gl-py-3 gl-mb-0 gl-bg-gray-10 gl-border-b-solid gl-border-b-gray-100 gl-border-b-1" class="gl-px-5 gl-py-3 gl-mb-0 gl-bg-gray-10 gl-border-b-solid gl-border-b-gray-100 gl-border-b-1 gl-rounded-top-base"
> >
<gl-segmented-control <gl-segmented-control
:options="editorModes" :options="editorModes"
...@@ -106,7 +106,7 @@ export default { ...@@ -106,7 +106,7 @@ export default {
/> />
</gl-form-group> </gl-form-group>
<div class="gl-display-flex gl-sm-flex-direction-column"> <div class="gl-display-flex gl-sm-flex-direction-column">
<section class="gl-w-full gl-p-5 gl-flex-fill-4 policy-table-left"> <section class="gl-w-full gl-p-5">
<div v-if="shouldShowRuleEditor" data-testid="rule-editor"> <div v-if="shouldShowRuleEditor" data-testid="rule-editor">
<slot name="rule-editor"></slot> <slot name="rule-editor"></slot>
</div> </div>
...@@ -120,7 +120,7 @@ export default { ...@@ -120,7 +120,7 @@ export default {
</section> </section>
<section <section
v-if="shouldShowRuleEditor" v-if="shouldShowRuleEditor"
class="gl-w-30p gl-p-5 gl-border-l-gray-100 gl-border-l-1 gl-border-l-solid gl-flex-fill-2" class="gl-md-w-50p gl-md-max-w-30p gl-p-5 gl-border-l-gray-100 gl-border-l-1 gl-md-border-l-solid"
data-testid="rule-editor-preview" data-testid="rule-editor-preview"
> >
<slot name="rule-editor-preview"></slot> <slot name="rule-editor-preview"></slot>
......
...@@ -43,18 +43,18 @@ export default { ...@@ -43,18 +43,18 @@ export default {
<div <div
v-if="policyDescription" v-if="policyDescription"
v-safe-html:[$options.safeHtmlConfig]="policyDescription" v-safe-html:[$options.safeHtmlConfig]="policyDescription"
class="gl-bg-white gl-rounded-top-left-none gl-rounded-top-right-none gl-rounded-bottom-left-base gl-rounded-bottom-right-base gl-py-3 gl-px-4 gl-border-1 gl-border-solid gl-border-gray-100" class="gl-bg-white gl-rounded-top-left-none gl-rounded-top-right-none gl-rounded-bottom-left-base gl-rounded-bottom-right-base gl-py-3 gl-px-4 gl-border-1 gl-border-solid gl-border-gray-100 gl-border-t-none!"
></div> ></div>
<div v-else> <div v-else>
<gl-alert variant="info" :dismissible="false" <gl-alert variant="info" :dismissible="false">
>{{ $options.i18n.PARSING_ERROR_MESSAGE }} {{ $options.i18n.PARSING_ERROR_MESSAGE }}
</gl-alert> </gl-alert>
</div> </div>
</gl-tab> </gl-tab>
<gl-tab :title="s__('NetworkPolicies|.yaml')"> <gl-tab :title="s__('NetworkPolicies|.yaml')">
<pre class="gl-bg-white gl-rounded-top-left-none gl-rounded-top-right-none">{{ <pre class="gl-bg-white gl-rounded-top-left-none gl-rounded-top-right-none gl-border-t-none"
policyYaml >{{ policyYaml }}
}}</pre> </pre>
</gl-tab> </gl-tab>
</gl-tabs> </gl-tabs>
</template> </template>
...@@ -10,6 +10,14 @@ ...@@ -10,6 +10,14 @@
align-items: flex-start; align-items: flex-start;
} }
.policy-editor .policy-table-left { .gl-md-max-w-30p {
flex: 4; @media (min-width: $breakpoint-md) {
max-width: 30%;
}
}
.gl-md-w-50p {
@media (min-width: $breakpoint-md) {
width: 50%;
}
} }
...@@ -12,7 +12,7 @@ exports[`PolicyPreview component with policy description renders policy preview ...@@ -12,7 +12,7 @@ exports[`PolicyPreview component with policy description renders policy preview
titlelinkclass="" titlelinkclass=""
> >
<div <div
class="gl-bg-white gl-rounded-top-left-none gl-rounded-top-right-none gl-rounded-bottom-left-base gl-rounded-bottom-right-base gl-py-3 gl-px-4 gl-border-1 gl-border-solid gl-border-gray-100" class="gl-bg-white gl-rounded-top-left-none gl-rounded-top-right-none gl-rounded-bottom-left-base gl-rounded-bottom-right-base gl-py-3 gl-px-4 gl-border-1 gl-border-solid gl-border-gray-100 gl-border-t-none!"
> >
<strong> <strong>
bar bar
...@@ -27,9 +27,10 @@ exports[`PolicyPreview component with policy description renders policy preview ...@@ -27,9 +27,10 @@ exports[`PolicyPreview component with policy description renders policy preview
titlelinkclass="" titlelinkclass=""
> >
<pre <pre
class="gl-bg-white gl-rounded-top-left-none gl-rounded-top-right-none" class="gl-bg-white gl-rounded-top-left-none gl-rounded-top-right-none gl-border-t-none"
> >
foo foo
</pre> </pre>
</gl-tab-stub> </gl-tab-stub>
</gl-tabs-stub> </gl-tabs-stub>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment