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

feat(theme/datasource&setting): change datasource and setting panel theme variable #927

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion designer-demo/src/configurators/MyInputConfigurator.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export default {
font-size: 16px;
&:hover {
cursor: pointer;
color: var(--ti-lowcode-dialog-font-color);
color: var(--te-common-text-primary);
}
}
</style>
15 changes: 1 addition & 14 deletions packages/canvas/container/src/components/CanvasAction.vue
Original file line number Diff line number Diff line change
Expand Up @@ -671,21 +671,8 @@ export default {
}
}
}
.short-cut-set.tiny-popper.tiny-popover {
background: var(--ti-lowcode-toolbar-bg);
.short-cut-set.short-cut-set.tiny-popper.tiny-popover {
padding: 10px;
.body label,
.header {
color: var(--ti-lowcode-dialog-font-color);
font-size: 12px;
}
.tiny-popover__title {
color: var(--ti-lowcode-dialog-font-color);
}
}

.short-cut-set.tiny-popper.tiny-popover[x-placement^='bottom'] .popper__arrow::after {
border-bottom-color: var(--ti-lowcode-toolbar-bg);
}

.drag-resize {
Expand Down
4 changes: 2 additions & 2 deletions packages/canvas/container/src/components/CanvasDivider.vue
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ export default {
left: v-bind('state.horizontalLeft');
}
&:hover {
background-color: var(--ti-lowcode-common-primary-color);
background-color: var(--te-common-bg-primary-checked);
.divider {
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAGKADAAQAAAABAAAAGAAAAADiNXWtAAACbElEQVRIDZ2Vu2sVURCH9yZgbCxMsFFjKQkExScREgQtLISAXbS4GDu10fgHiL1gpxKDCLFRfICCCSpCwEiCYiNWFkYsImIRH4jgY/x+xzNy7t29614HvsycmfnN3j1nd5Nl0cysDrPwEV7DRVjn9Vaent7Y+wYvrWbUG/pJTIHsCzyBd1pg8v0NzcmC2kDswdkizIFmyKZCK4F+uWwGelxPfAx+wFPPpZ58JzyHX3DEa8TdoFmyesYf3ZKu+nd40nyJvGzEc+7JjYWK2aTn3JPXRTRzVhdYhjkvpp78KMieNeW7yGnPZYfSmsfktV3LHSSWoNVhro+CbTTvdzH+KGyI61batdSXdAcXQDYWBcGx1m2+ha/wHRZUwK+C9/ABtA3q6W7S+vadl6AH9LT8hAk4CKdAQtlJuBIis3340zE+gR+PsXqlkVYzNEsz/5wrQR/MQ2qfWYzHX72RWE+UnppPoP3vijUNVm9qCyz60rvSnXTAJtBjOwKr0wbWV8GtaDulkVYzdLbtGaLdINPed1ZVt3Mlf/21r8NVL1Cpj1+sM9IZvAK9uY8qCas2MfAGyPbC9RCZDVXVl/YxbHsc+FCNxDpE3cWDUmHVIoPug2yna4hvhYzZLs/9l2fInjjoZjqA3JaYn07zbccM0Qujw839TyB3B2Q72h4sAcIDQW52uWiABsf63aJ6aQ6h3uqX8A38q5nTULsHsq25YlkCweEgMzv3j77B2He7rK+hhmAFLII+YGsaigULevSU6bHdXFDOp2g8DrIz+Wo+Q99Q6Da7lq9mWdG3aCWNL+BskaA5V6vVHpPT8FpzTevfkrgJcwZ0OJIAAAAASUVORK5CYII=);
}
Expand All @@ -232,7 +232,7 @@ export default {

.divider-line {
position: absolute;
border: 1px dashed var(--ti-lowcode-common-primary-color);
border: 1px dashed var(--te-common-border-checked);
z-index: 2;
}
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ export default {
&::after {
content: '';
display: block;
border: 1px solid var(--ti-lowcode-common-primary-color);
border: 1px solid var(--te-common-border-checked);
}
&.resize-vertical {
cursor: ns-resize;
Expand Down
10 changes: 5 additions & 5 deletions packages/canvas/container/src/components/shortCutPopover.vue
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export default {
display: flex;
align-items: center;
padding: 0 10px;
border-bottom: 1px solid var(--ti-lowcode-toolbar-border-color, #333);
border-bottom: 1px solid var(--te-common-border-default, #333);
height: 36px;

div {
Expand All @@ -96,7 +96,7 @@ export default {

.icon-setting {
font-size: 16px;
fill: var(--ti-lowcode-toolbar-breadcrumb-color, #d9d9d9);
fill: var(--te-common-text-secondary, #d9d9d9);
}

.icon-wrap {
Expand All @@ -111,7 +111,7 @@ export default {
align-items: center;
transition: 0.3s;
&:hover {
fill: var(--ti-lowcode-toolbar-icon-color, #fff);
fill: var(--te-common-icon-primary, #fff);
background: var(--ti-lowcode-icon-hover-bg, rgba(255, 255, 255, 0.1));
}
}
Expand Down Expand Up @@ -164,14 +164,14 @@ export default {
width: 100%;
padding: 4px 0;
display: inline-block;
background: var(--ti-lowcode-toolbar-view-hover-bg, #4d4d4d);
background: var(--te-common-bg-container, #4d4d4d);
border-radius: 2px;
display: flex;
justify-content: center;
align-items: center;
}
svg {
fill: var(--ti-lowcode-toolbar-breadcrumb-color, #d9d9d9);
fill: var(--te-common-text-secondary, #d9d9d9);
margin-left: 4px;
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/canvas/layout/src/CanvasLayout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const siteCanvasStyle = computed(() => {

<style lang="less" scoped>
#canvas-wrap {
background: var(--ti-lowcode-canvas-wrap-bg);
background: var(--te-common-bg-container);
flex: 1 1 0;
border: none;
display: flex;
Expand Down
3 changes: 1 addition & 2 deletions packages/common/component/SearchEmpty.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,10 @@ export default {
.empty-icon {
width: 80px;
height: 80px;
color: var(--ti-lowcode-datasource-common-empty-color);
}
.empty-text {
font-size: 12px;
color: var(--te-base-text-color-3);
color: var(--te-common-text-weaken);
}
}
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ export default {
justify-content: space-between;
align-items: center;
padding: 10px 0;
color: var(--ti-lowcode-toolbar-breadcrumb-color);
color: var(--te-common-text-secondary);

.header-title {
font-size: 14px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,8 @@ export default {
width: 24px;
height: 24px;
font-size: 16px;
color: var(--ti-lowcode-toolbar-breadcrumb-color);
background: var(--ti-lowcode-canvas-wrap-bg);
color: var(--te-common-text-secondary);
background: var(--te-common-bg-container);
border: 1px solid var(--ti-lowcode-left-button-border-color);
border-radius: 2px;
display: inline-flex;
Expand All @@ -223,7 +223,7 @@ export default {
border: 1px solid var(--ti-lowcode-optionitem-border-color);
background: var(--ti-lowcode-optionitem-background-color);
margin-bottom: -1px;
color: var(--ti-lowcode-toolbar-breadcrumb-color);
color: var(--te-common-text-secondary);
padding: 7px;
display: grid;
grid-template-columns: 3fr auto;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export default {
font-size: 16px;
&:hover {
cursor: pointer;
color: var(--ti-lowcode-dialog-font-color);
color: var(--te-common-text-primary);
}
}
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ export default {
box-sizing: border-box;
width: 48px;
border: 1px solid var(--ti-lowcode-tabs-border-color);
background: var(--ti-lowcode-canvas-wrap-bg);
background: var(--te-common-bg-container);
border-radius: 4px;
padding: 4px;
margin: 0 4px 4px 4px;
Expand Down Expand Up @@ -313,13 +313,13 @@ export default {
justify-content: center;
align-items: center;
display: flex;
background: var(--ti-lowcode-canvas-wrap-bg);
color: var(--ti-lowcode-toolbar-breadcrumb-color);
background: var(--te-common-bg-container);
color: var(--te-common-text-secondary);
transition: none;
}

:deep(.splitpanes__splitter) {
background: var(--ti-lowcode-toolbar-view-hover-bg);
background: var(--te-common-bg-container);
border-left: var(--ti-lowcode-tabs-border-color);
}

Expand All @@ -328,7 +328,7 @@ export default {

.customize {
margin-bottom: 8px;
color: var(--ti-lowcode-toolbar-breadcrumb-color);
color: var(--te-common-text-secondary);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,15 +107,15 @@ export default {
padding-right: 20px;
width: 136px;
cursor: pointer;
background: var(--ti-lowcode-tabs-bg);
color: var(--ti-lowcode-toolbar-breadcrumb-color);
background: var(--te-common-bg-prompt);
color: var(--te-common-text-secondary);
border: 1px solid var(--ti-lowcode-tabs-active-bg);
border-radius: 3px;
.icon-box {
border-right: 1px solid var(--ti-lowcode-tabs-active-bg);
padding: 4px 8px;
.tiny-svg {
color: var(--ti-lowcode-toolbar-breadcrumb-color);
color: var(--te-common-text-secondary);
font-size: 14px;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,22 +95,22 @@ export default {
height: 3px;
width: 100%;
border-radius: 2px;
background-color: var(--ti-lowcode-canvas-wrap-bg);
background-color: var(--te-common-bg-container);
.tiny-slider__handle {
width: 10px;
height: 10px;
margin: -4px -5px 0 -5px;
border-radius: 50%;
border: none;
cursor: ew-resize;
background-color: var(--ti-lowcode-toolbar-breadcrumb-color);
background-color: var(--te-common-text-secondary);
box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px 1px, rgba(0, 0, 0, 0.3) 0px 0px 0px 0.5px;
}
.tiny-slider__range {
height: 3px;
border-radius: 3px;
margin-top: 0;
background: var(--ti-lowcode-canvas-wrap-bg);
background: var(--te-common-bg-container);
}

.tiny-slider__tips {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export default {
}
.slot-name {
width: 30%;
color: var(--ti-lowcode-dialog-font-color);
color: var(--te-common-text-primary);
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Codebase verification

Color variable standardization needed across multiple components

The search results reveal extensive usage of specific color variables with the --ti-lowcode- prefix across the codebase. Similar to the change in the review, many of these could be standardized to use common color variables. Key patterns found:

  • Multiple specific dialog/panel color variables that could use common text colors
  • Redundant border color definitions that could be consolidated
  • Component-specific color variables that could be standardized

Locations needing attention:

  • packages/layout/src/DesignSettings.vue: Uses specific panel color variables
  • packages/toolbars/**/src/*.vue: Multiple toolbar-specific color variables
  • packages/plugins/**/src/*.vue: Component-specific color variables
  • packages/settings/**/src/*.vue: Multiple setting-specific color variables
  • packages/common/component/*.vue: Common component color variables
🔗 Analysis chain

Color variable change aligns with theme standardization

The change from --ti-lowcode-dialog-font-color to --te-common-text-primary aligns well with the PR's objective of standardizing variables across themes.

Let's verify if there are other similar color variables that could be standardized:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for other specific color variables that might need standardization
rg --type=less --type=vue "var\(--ti-lowcode-.*?-color\)" 

Length of output: 87


Script:

#!/bin/bash
# Search for other specific color variables that might need standardization, fixing the file type issue
rg "var\(--ti-lowcode-.*?-color\)" --type-add 'vue:*.vue' --type=vue

Length of output: 66125

font-size: 12px;
display: flex;
justify-content: space-between;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export default {
font-size: 16px;
&:hover {
cursor: pointer;
color: var(--ti-lowcode-dialog-font-color);
color: var(--te-common-text-primary);
}
}
</style>
4 changes: 2 additions & 2 deletions packages/plugins/datasource/src/DataSourceField.vue
Original file line number Diff line number Diff line change
Expand Up @@ -186,10 +186,10 @@ export default {
align-items: center;
&.field-row-add {
color: var(--ti-lowcode-datasource-json-border-colorr);
color: var(--ti-lowcode-datasource-json-border-color);
svg {
color: var(--ti-lowcode-datasource-json-border-colorr);
color: var(--ti-lowcode-datasource-json-border-color);
}
}
}
Expand Down
5 changes: 4 additions & 1 deletion packages/plugins/datasource/src/DataSourceList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ export default {
display: flex;
align-items: center;
justify-content: space-between;
color: var(--ti-lowcode-base-gray-90);
color: var(--te-common-text-primary);
.item-name {
display: flex;
align-items: center;
Expand All @@ -171,6 +171,9 @@ export default {
height: 16px;
margin-top: 6px;
color: var(--ti-lowcode-datasource-toolbar-more-hover-color);
&:hover {
color: var(--ti-lowcode-toolbar-icon-color);
}
Comment on lines +174 to +176
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Consider using a common variable for hover state

While the hover state addition improves user interaction, the color variable var(--ti-lowcode-toolbar-icon-color) uses a specific prefix instead of a common one. This seems inconsistent with the PR's objective of standardizing variables.

Consider replacing it with a common variable:

  &:hover {
-   color: var(--ti-lowcode-toolbar-icon-color);
+   color: var(--te-common-icon-hover-color);
  }

Committable suggestion skipped: line range outside the PR's diff.

}
}
}
Expand Down
5 changes: 2 additions & 3 deletions packages/plugins/datasource/src/DataSourceRecordList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,7 @@ export default {
font-size: 12px;
text-align: left;
padding: 0;
color: var(--ti-lowcode-base-text-color);
color: var(--te-common-text-primary);
.icon-download {
margin: 0 1px 4px 0;
font-size: 16px;
Expand All @@ -631,10 +631,9 @@ export default {
.empty-icon {
width: 50px;
height: 50px;
color: var(--ti-lowcode-datasource-common-empty-color);
}
.add-column {
color: var(--ti-lowcode-datasource-json-border-colorr);
color: var(--ti-lowcode-datasource-json-border-color);
cursor: pointer;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ export default {
.monaco-editor {
height: 120px;
margin-top: 8px;
border: 1px solid var(--ti-lowcode-base-gray-101);
border: 1px solid var(--te-common-border-divider);
border-radius: 4px;
}
}
Expand Down
15 changes: 0 additions & 15 deletions packages/plugins/datasource/src/DataSourceRemoteForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -100,18 +100,6 @@ export default {
width: 100px;
border: none;
}
:deep(.tiny-input-group__prepend) {
background: var(--ti-lowcode-datasource-respones-select-color-bg);
border-color: var(--ti-lowcode-datasource-select-border-color);
.tiny-input-suffix {
.tiny-input-display-only {
.tiny-input__inner {
border-color: var(--ti-lowcode-datasource-select-border-right-color-bg);
border-left: none;
}
}
}
}
:deep(.tiny-input-suffix) {
width: 100px;
.tiny-input__inner {
Expand All @@ -123,9 +111,6 @@ export default {
border: none;
background: var(--ti-lowcode-datasource-respones-color-bg);
}
.requestBtn {
color: var(--ti-lowcode-datasource-respones-border-color-bg);
}
:deep(.border-input) {
input {
border-radius: 0;
Expand Down
13 changes: 0 additions & 13 deletions packages/plugins/datasource/src/DataSourceRemotePanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -305,19 +305,6 @@ export default {
:deep(.tiny-tabs__content) {
margin: 12px 0;
}
:deep(.is-active) {
.tiny-tabs__item__title {
color: var(--ti-lowcode-datasource-tabs-bottom-border-color);
}
}
:deep(.tiny-tabs__item__title) {
font-size: 14px;
}
}
:deep(.tiny-tabs__item__title) {
margin-right: 20px;
margin-left: 15px;
color: var(--ti-lowcode-datasource-label-color);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export default {
.monaco-editor {
height: 180px;
margin-top: 8px;
border: 1px solid var(--ti-lowcode-base-gray-101);
border: 1px solid var(--te-common-border-divider);
border-radius: 4px;
}
</style>
4 changes: 2 additions & 2 deletions packages/plugins/datasource/src/DataSourceTemplate.vue
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export default {
}
}
.blue::before {
border: 1px solid var(--ti-lowcode-datasource-json-border-colorr);
border: 1px solid var(--ti-lowcode-datasource-json-border-color);
}

.green::before {
Expand All @@ -105,7 +105,7 @@ export default {
.tiny-button {
color: var(--ti-lowcode-datasource-toolbar-breadcrumb-color);
&.tiny-button--primary {
border-color: var(--ti-lowcode-datasource-common-primary-color);
border-color: var(--ti-lowcode-datasource-common-border-primary-color);
}

&.tiny-button--success {
Expand Down
Loading
Loading