repo_name
stringlengths
1
62
dataset
stringclasses
1 value
lang
stringclasses
11 values
pr_id
int64
1
20.1k
owner
stringlengths
2
34
reviewer
stringlengths
2
39
diff_hunk
stringlengths
15
262k
code_review_comment
stringlengths
1
99.6k
tiny-engine
github_2023
others
1,070
opentiny
chilingling
@@ -20,11 +20,19 @@ <div class="toolbar-right-content"> <div class="toolbar-right-item" v-for="(item, idx) in state.rightBar" :key="idx"> <div v-if="typeof item === 'string'"> - <component :is="getMergeMeta(item)?.entry" :options="getMergeMeta(item)?.options"></component> + ...
这个入参看看是不是可以干掉了
tiny-engine
github_2023
others
1,070
opentiny
chilingling
@@ -0,0 +1,74 @@ +<template> + <div class="toolbar-theme-switch"> + <toolbar-base :content="baseContent" :icon="baseIcon" :options="optionsData" @click-api="themeChange"> + <template v-if="position === 'collapse'"> + <div class="toolbar-theme-switch-radio"> + <div class="toolbar-theme-switch-ra...
`const { themeState: state, themeChange } = useThemeSwitch()`
tiny-engine
github_2023
javascript
1,070
opentiny
coderabbitai[bot]
@@ -0,0 +1,59 @@ +import { reactive } from 'vue' +import { defineService, getMetaApi, getMergeMeta, META_SERVICE } from '@opentiny/tiny-engine-meta-register' +import { setGlobalMonacoEditorTheme } from '@opentiny/tiny-engine-common' + +const THEME_DATA = [ + { + text: '浅色模式', + label: 'light', + oppositeTheme...
_:hammer_and_wrench: Refactor suggestion_ **Add error handling in service initialization and implement cleanup.** The service initialization should handle errors and clean up resources when destroyed. ```diff export default defineService({ id: META_SERVICE.ThemeSwitch, type: 'MetaService', init: () => { - ...
tiny-engine
github_2023
javascript
1,070
opentiny
coderabbitai[bot]
@@ -0,0 +1,59 @@ +import { reactive } from 'vue' +import { defineService, getMetaApi, getMergeMeta, META_SERVICE } from '@opentiny/tiny-engine-meta-register' +import { setGlobalMonacoEditorTheme } from '@opentiny/tiny-engine-common' + +const THEME_DATA = [ + { + text: '浅色模式', + label: 'light', + oppositeTheme...
_:hammer_and_wrench: Refactor suggestion_ **Internationalize theme labels for better i18n support.** The theme labels are hardcoded in Chinese. Consider using i18n for better internationalization support. ```diff const THEME_DATA = [ { - text: '浅色模式', + text: t('theme.light'), label: 'light', opp...
tiny-engine
github_2023
javascript
1,070
opentiny
coderabbitai[bot]
@@ -0,0 +1,59 @@ +import { reactive } from 'vue' +import { defineService, getMetaApi, getMergeMeta, META_SERVICE } from '@opentiny/tiny-engine-meta-register' +import { setGlobalMonacoEditorTheme } from '@opentiny/tiny-engine-common' + +const THEME_DATA = [ + { + text: '浅色模式', + label: 'light', + oppositeTheme...
_:hammer_and_wrench: Refactor suggestion_ **Add error handling and improve theme mapping.** The theme change function needs error handling for localStorage operations and could benefit from explicit theme mapping. ```diff const themeChange = (theme) => { + try { themeState.theme = getTheme(theme).label t...
tiny-engine
github_2023
others
1,122
opentiny
coderabbitai[bot]
@@ -33,6 +33,7 @@ "@babel/generator": "~7.23.2", "@babel/parser": "~7.23.2", "@babel/traverse": "~7.23.2", + "@eslint/js": "^8.57.1",
_:hammer_and_wrench: Refactor suggestion_ **Consider moving @eslint/js to devDependencies.** Since @eslint/js is typically used during development for linting purposes and not required at runtime, it should be moved to the devDependencies section. Apply this diff to move the dependency: ```diff "dependencies": { ...
tiny-engine
github_2023
typescript
1,102
opentiny
chilingling
@@ -54,26 +54,33 @@ export function useUtils(context: Record<string, any>) { } }) - const npmUtilsImports = data + const npmUtilPromises = data .filter((item) => item.type === 'npm' && item.content.cdnLink) - .map((item) => import(/* @vite-ignore */ item.content.cdnLink)) - const npmU...
这里为什么要改成 `Promise.all` ?
tiny-engine
github_2023
javascript
1,102
opentiny
gene9831
@@ -121,6 +121,7 @@ export const fetchAvailableBlocks = ({ groupId, label_contains, author, tag, pub getMetaApi(META_SERVICE.Http).get( `/material-center/api/block/notgroup/${groupId}${getParams({ label_contains, + name_cn_contains: label_contains,
这里是不是少加了`description`参数。区块管理插件的区块列表中,是通过`label`, `name_cn`, `description`三个字段是否包含输入的字符串来进行列表的筛选
tiny-engine
github_2023
others
941
opentiny
coderabbitai[bot]
@@ -63,9 +65,8 @@ export default { right: -2px; z-index: 100; } -} - -.save-title { - margin: 0 6px; + .svg-icon.svg-icon.svg-icon { + color: var(--te-common-icon-primary); + }
_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the specificity hack** The triple class selector `.svg-icon.svg-icon.svg-icon` appears to be a specificity hack. While it works, it's not a maintainable approach. Consider these alternatives: ```diff -.svg-icon.svg-icon.svg-icon { - color: var(--te-c...
tiny-engine
github_2023
others
941
opentiny
coderabbitai[bot]
@@ -278,6 +278,15 @@ export default { color: var(--ti-lowcode-toolbar-icon-color); display: flex; } + :deep(.tiny-collapse-item__wrap) { + padding: 0 12px; + .tiny-collapse-item__content { + padding: 0; + .tiny-form-item:first-child { + padding-bottom: 12px; + } + } + }
_:hammer_and_wrench: Refactor suggestion_ **Merge duplicate CSS rules** There appears to be duplicate styling for `.tiny-collapse-item__wrap`. Consider merging these rules with the identical ones defined earlier in the file (around line 247) to improve maintainability. Here's how to merge the rules: ```diff .store-...
tiny-engine
github_2023
others
941
opentiny
coderabbitai[bot]
@@ -9,8 +9,8 @@ </div> </template> <template #operate="{ data }"> - <svg-button name="to-edit" tips="编辑" placement="top" @click="setEdit(data)"></svg-button> - <svg-button name="delete" tips="删除" placement="top" @click="delBlockEvent(data.name)"></svg-button> + <svg-button class="opt-but...
_:bulb: Codebase verification_ Based on the search results, I can now provide a final response as there's a clear pattern of tooltip usage across the codebase: **Tooltips should be retained for consistency with codebase patterns** The codebase consistently uses tooltips (`tips` attribute) on svg-button components, e...
tiny-engine
github_2023
others
941
opentiny
coderabbitai[bot]
@@ -1,43 +1,35 @@ <!--录入数据的字符范围--> <template> <div class="collection-field-num"> - <tiny-row gutter="0"> - <tiny-col :span="6"> - <div class="collection-field-item"> - <tiny-form-item - prop="format.min" - :label="type === 'string' ? '最少输入字符数(包含空格)' : '最小值'" - ...
_:hammer_and_wrench: Refactor suggestion_ **Add validation methods and value synchronization** The component needs validation logic to ensure data integrity: - Add methods to validate min/max relationships - Handle edge cases for numeric inputs - Sync values when min/max changes ```diff import { Numeric, FormItem }...
tiny-engine
github_2023
others
941
opentiny
coderabbitai[bot]
@@ -1,43 +1,35 @@ <!--录入数据的字符范围--> <template> <div class="collection-field-num"> - <tiny-row gutter="0"> - <tiny-col :span="6"> - <div class="collection-field-item"> - <tiny-form-item - prop="format.min" - :label="type === 'string' ? '最少输入字符数(包含空格)' : '最小值'" - ...
_:hammer_and_wrench: Refactor suggestion_ **Add form validation rules and improve accessibility** The form items lack validation rules and accessibility attributes. Consider adding: - Validation rules to ensure min value is less than max - aria-labels for screen readers - Error state handling ```diff <tiny-form-ite...
tiny-engine
github_2023
others
941
opentiny
coderabbitai[bot]
@@ -1,5 +1,5 @@ <template> - <tiny-popover :visible-arrow="false" width="140" trigger="hover"> + <tiny-popover :visible-arrow="false" width="140" trigger="click" :open-delay="500">
_:hammer_and_wrench: Refactor suggestion_ **Review UX implications of click delay** The 500ms delay on click trigger seems unnecessary and might make the UI feel unresponsive. Consider removing the delay or significantly reducing it for better user experience. ```diff - <tiny-popover :visible-arrow="false" width="14...
tiny-engine
github_2023
others
941
opentiny
coderabbitai[bot]
@@ -768,6 +784,18 @@ .tiny-form-item__label.tiny-form-item__label { padding-right: 16px; } +.tiny-form--label-left.label-align .tiny-form-item.is-required .tiny-form-item__label.tiny-form-item__label { + padding-left: 0; +} +.tiny-form--label-left.label-align + .tiny-form-item.is-required + ~ .tiny-form-item + ...
_:hammer_and_wrench: Refactor suggestion_ **Remove duplicate padding rules** The padding rules for form labels are duplicated. Consider consolidating these rules to improve maintainability. ```diff -.tiny-form--label-left.label-align .tiny-form-item.is-required .tiny-form-item__label.tiny-form-item__label { - paddi...
tiny-engine
github_2023
others
941
opentiny
coderabbitai[bot]
@@ -20,10 +20,10 @@ </div> <div class="field-operation" v-if="!field.editable"> <div class="field-handler" @click="openFieldForm(index)"> - <svg-button name="to-edit" tips="编辑" placement="top" @click="handleEdit(data)"></svg-button> + <svg-button name="to-edit" :hoverBgColor="false" @clic...
_:warning: Potential issue_ **Fix undefined variable and remove redundant click handler** The button click handler references an undefined 'data' variable and is redundant since the parent div already has a click handler. Apply this fix: ```diff - <svg-button name="to-edit" :hoverBgColor="false" @click="handl...
tiny-engine
github_2023
others
941
opentiny
coderabbitai[bot]
@@ -78,14 +78,12 @@ <tiny-grid-column width="90" field="operation" title="操作"> <template v-slot="data"> <div v-if="editingRow !== data.row" class="i18n-opera"> - <tiny-tooltip class="item" effect="dark" placement="bottom" content="编辑" :open-delay="500"> - ...
_:hammer_and_wrench: Refactor suggestion_ **Add ARIA labels to improve accessibility** The clickable icons should have proper ARIA labels to improve accessibility for screen readers. Apply this diff: ```diff -<span class="icon"> - <svg-icon name="to-edit" @click.stop="openEditor($event, data.row)"></svg-icon> -</s...
tiny-engine
github_2023
others
941
opentiny
coderabbitai[bot]
@@ -327,9 +323,9 @@ copyRowIndex.value = rowIndex try { await toClipboard(row.key) - copyTipContent.value = '复制成功!' + copyTipContent.value = '复制成功' } catch (e) { - copyTipContent.value = '复制失败!' + copyTipContent.value = '复制失败'
_:hammer_and_wrench: Refactor suggestion_ **Use i18n keys for copy messages** The success and failure messages should use i18n keys for consistency with the rest of the application. Apply this diff: ```diff -copyTipContent.value = '复制成功' +copyTipContent.value = useTranslate().t('lowcode.copy.success') -copyTipConte...
tiny-engine
github_2023
others
941
opentiny
lichunn
@@ -68,4 +68,11 @@ export default { outline: none; } } +.svg-button-hover { + color: var(--ti-lowcode-component-svg-button-color);
这里的样式变量都改成用--te-
tiny-engine
github_2023
others
941
opentiny
lichunn
@@ -8,14 +8,19 @@ </div> <div :class="['buttons', { fullscreen: fullscreen }]" id="icon-buttons"> <slot name="buttons"></slot> - <tiny-tooltip v-if="showFormatBtn && options.language === 'json'" content="格式化" placement="top"> + <tiny-tooltip + v-if="showFormatBt...
500多次使用,建议抽取为常量
tiny-engine
github_2023
others
941
opentiny
lichunn
@@ -276,4 +272,7 @@ export default { color: var(--ti-lowcode-canvas-handle-hover-bg); padding: 0 5px; } +.save-style .save-time .tiny-input__inner { + height: 24px !important;
能否改成id?尽量避免使用Important
tiny-engine
github_2023
javascript
941
opentiny
lichunn
@@ -75,6 +75,10 @@ export const BLOCK_OPENNESS = { Special: 2 } +export const OPEN_DELAY = { + default: 500
default改为大写字母开头,参照上面的常量
tiny-engine
github_2023
others
1,051
opentiny
lichunn
@@ -11,18 +11,15 @@ --te-base-gray-30: #e6e6e6; --te-base-gray-40: #dbdbdb; --te-base-gray-50: #c2c2c2; - --te-base-gray-60: #808080; - --te-base-gray-70: #595959; - --te-base-gray-80: #333333; - --te-base-gray-90: #191919; - --te-base-gray-100: #000; - --te-base-gray-110: #b4b5b8; - --te-base-gray-120:...
为什么会出现125,125是代表什么
tiny-engine
github_2023
others
1,101
opentiny
chilingling
@@ -266,20 +266,16 @@ export default { outline: none; } .life-cycle-btn { - color: var(--ti-lowcode-meta-codeEditor-color); - border-color: var(--ti-lowcode-meta-codeEditor-border-color); + color: var(--te-component-common-color); + border-color: var(--te-component-common-default-border-color); ...
这个和 非 hover 状态也是一样的?是否可以取消掉?
tiny-engine
github_2023
others
1,101
opentiny
chilingling
@@ -92,34 +92,34 @@ export default { padding-block: 4px; padding-inline: 11px 8px; width: auto; - color: var(--te-common-text-secondary); - background-color: var(--te-common-bg-container); + color: var(--te-component-common-text-color); + background-color: var(--te-component-meta-description-bg-color); ...
看看这样行不行 ```css border: 1px solid var(--te-component-common-default-border-color); border-left: none; ```
tiny-engine
github_2023
others
1,105
opentiny
coderabbitai[bot]
@@ -279,7 +279,7 @@ export default { color: rbg(217, 217, 217);
_:warning: Potential issue_ **Fix typo in color value** There's a typo in the color value: 'rbg' should be 'rgb'. ```diff - color: rbg(217, 217, 217); + color: rgb(217, 217, 217); ``` Consider converting this hardcoded color value to a module variable for consistency with the PR's objectives. <!-- ...
tiny-engine
github_2023
others
1,105
opentiny
chilingling
@@ -96,13 +96,13 @@ export default { .icon-setting { font-size: 16px; - fill: var(--te-common-text-secondary, #d9d9d9); + fill: var(--te-canvas-container-text-color, #d9d9d9); } .icon-wrap { width: 20px; height: 20px; - fill: var(--ti-lowcode-text-color, #6a6a6a); + fill: var(--t...
【后续优化】 需要覆盖 tiny-vue icon 颜色为 currentcolor 的,抽个公共类出来。 ```css .fill-currentcolor { fill: currentcolor; } ``` 然后哪里需要用,就直接加类名就好了 ```vue <template> <icon-close class="fill-currentcolor"> </icon-close> </template> ```
tiny-engine
github_2023
others
1,105
opentiny
chilingling
@@ -57,14 +57,14 @@ export default { .label { padding: 0 3px 0 16px; border-top: 0; - color: var(--te-canvas-breadcrumb-weaken-color); + color: var(--te-canvas-breadcrumb-text-color); transition: 0.3s; border: none; &:hover { ...
border 是不是不应该用 bg 的变量?
tiny-engine
github_2023
others
1,096
opentiny
coderabbitai[bot]
@@ -0,0 +1,32 @@ +:root { + // 高级配置 + --te-events-advanced-config-color: var(--te-common-text-secondary); + --te-events-advanced-label-color: var(--te-common-text-secondary); + --te-events-advanced-binding-state-bg-color: var(--te-common-bg-info); + --te-events-advanced-binding-state-border-color: var(--te-common-...
_:bulb: Verification agent_ <details> <summary>🧩 Analysis chain</summary> **Verify variable usage across components.** Please ensure all components in the events module are updated to use these new variables instead of the common ones. --- 🏁 Script executed: ```shell #!/bin/bash # Search for any remaining usage...
tiny-engine
github_2023
others
1,096
opentiny
coderabbitai[bot]
@@ -128,16 +128,16 @@ export default { .display-label { flex: 0 0 50px; line-height: 24px; - color: var(--te-common-text-secondary); + color: var(--te-styles-common-text-color);
_:bulb: Verification agent_ <details> <summary>🧩 Analysis chain</summary> **LGTM! Variable updates align with module standardization.** The changes correctly replace `--te-common-*` variables with module-specific `--te-styles-common-*` variables, which aligns with the PR objective of standardizing module variables....
tiny-engine
github_2023
others
1,087
opentiny
chilingling
@@ -141,22 +141,4 @@ export default { } </script> -<style lang="less" scoped> -.version-list-panel { - :deep(.plugin-setting-header) { - color: var(--ti-lowcode-component-block-version-list-panel-title-color); - } -} -.close-icon { - margin-left: 16px; -} -.tiny-button.tiny-button { - &.fallback-btn { - m...
没样式了就不要了
tiny-engine
github_2023
others
1,078
opentiny
coderabbitai[bot]
@@ -0,0 +1,13 @@ +:root { + // 资源管理 + --te-bridge-list-color: var(--te-common-text-primary); + --te-bridge-list-bg-color: var(--te-common-bg-container); + --te-bridge-list-icon-color: var(--te-common-icon-secondary); + --te-bridge-list-border-color: var(--te-common-border-default); + --te-birdge-editor-border-col...
_:warning: Potential issue_ **Fix typo in variable prefix: "birdge" should be "bridge".** There's an inconsistent spelling in the variable naming where "bridge" is misspelled as "birdge". This should be corrected to maintain consistency across the codebase. ```diff - --te-birdge-editor-border-color: var(--te-common...
tiny-engine
github_2023
others
1,078
opentiny
coderabbitai[bot]
@@ -0,0 +1,41 @@ +:root { + --te-block-alert-color: var(--te-common-text-weaken); + --te-block-error-tip-color: var(--te-common-color-error); + // 区块列表 - 面板 + --te-block-panel-header-border-bottom-color: var(--te-common-border-divider); + --te-block-panel-footer-color: var(--te-common-text-primary); + --te-block-...
_:warning: Potential issue_ **Fix typo in variable names: "avtive" should be "active".** There's a typo in the following variable names: ```diff --- te-block-panel-footer-btn-avtive-color +-- te-block-panel-footer-btn-active-color --- te-block-panel-footer-btn-avtive-border-color +-- te-block-panel-footer-btn-active...
tiny-engine
github_2023
others
1,078
opentiny
chilingling
@@ -535,13 +535,13 @@ export default { height: calc(100% - 48px); flex: 1; padding: 12px; - border-top: 1px solid var(--ti-lowcode-i18n-border-color); + border-top: 1px solid var(--te-i18n-border-color); overflow-y: scroll; &::-webkit-scrollbar-thumb {
用公共类 `.lowcode-scrollbar` 或者是 `.lowcode-scrollbar-thin` 是不是就好了?`base-config-page.less` 文件中有定义公共的滚动样式。
tiny-engine
github_2023
others
1,078
opentiny
chilingling
@@ -0,0 +1,41 @@ +:root {
试试放到插件的“顶层节点”里面,这样就不用在 `:root` 顶层声明太多变量了。 比如 block 插件顶层节点应该是 `block-manage`。 但是需要注意验证下弹窗、提示节点等渲染在 body 节点下面的是否生效。
tiny-engine
github_2023
javascript
1,078
opentiny
chilingling
@@ -14,6 +14,7 @@ import entry, { api } from './src/Main.vue' import metaData from './meta.js' import { BlockService } from './src/composable' import SaveNewBlock from './src/SaveNewBlock.vue' +import './src/styles/vars.less'
看看放到主入口 `Main.vue` 是不是更好一点?
tiny-engine
github_2023
others
1,078
opentiny
chilingling
@@ -358,8 +358,8 @@ div.tiny-guide.shepherd-element { font-size: 12px; margin: 0 -16px; padding: 0 16px; - color: var(--te-common-text-primary); - fill: var(--te-common-icon-primary); + color: var(--te-help-box-item-text-color); + fill: var(--te-help-box-item-text-color);
改成 `fill: currentcolor`,与当前颜色一致
tiny-engine
github_2023
javascript
1,109
opentiny
coderabbitai[bot]
@@ -42,6 +42,10 @@ export const handleTinyIcon = (nameObj, globalHooks) => { return } + // 增加 svg 颜色属性,使编辑模式与出码模式一致 + debugger + nameObj.schema.props['fill'] = 'currentColor'
_:warning: Potential issue_ **Remove debugger statement and translate comment.** The debugger statement should be removed before merging. Also, consider translating the Chinese comment to English for better accessibility. Apply this diff: ```diff - // 增加 svg 颜色属性,使编辑模式与出码模式一致 - debugger + // Add SVG color proper...
tiny-engine
github_2023
javascript
1,103
opentiny
chilingling
@@ -59,6 +59,42 @@ const fetchAppList = (platformId) => getMetaApi(META_SERVICE.Http).get(`/app-cen const { subscribe, publish } = useMessage() +const postLocationHistoryChanged = (data) => publish({ topic: 'locationHistoryChanged', data }) + +const updatePageId = (pageId) => { + const url = new URL(window.locati...
这里是不是没必要判断了?反正都是要设置相同的目标 id 了
tiny-engine
github_2023
typescript
1,063
opentiny
coderabbitai[bot]
@@ -0,0 +1,79 @@ +import { onUnmounted, ref } from 'vue' +import { getController } from './controller' +import { getPageAncestors } from '../material-function/page-getter' + +export function useRouterPreview() { + const pageId = ref(getController().getBaseInfo().pageId) + const previewId = ref(getController().getBase...
_:hammer_and_wrench: Refactor suggestion_ **Consider adding error handling for getPageAncestors calls.** The function makes multiple async calls to getPageAncestors without try-catch blocks. Failed API calls could lead to unhandled promise rejections. ```diff async function calcNewPreviewFullPath() { + try { ...
tiny-engine
github_2023
javascript
1,038
opentiny
coderabbitai[bot]
@@ -21,7 +21,7 @@ export default { entry, metas: [BlockService], options: { - mergeCategoriesAndGroups: false + mergeCategoriesAndGroups: true
_:bulb: Codebase verification_ **Breaking change needs documentation and migration guide** The review comment is valid. The `mergeCategoriesAndGroups` option is a breaking change that switches from using block category APIs to block group APIs. This needs to be documented: 1. Add JSDoc comment above the option in ...
tiny-engine
github_2023
others
1,041
opentiny
coderabbitai[bot]
@@ -135,9 +135,7 @@ export default { border-top: 1px solid var(--ti-lowcode-datasource-border-color); } .datasource-list-item { - box-shadow: - var(--ti-lowcode-datasource-tabs-border-color) 0, - -1px; + box-shadow: var(--ti-lowcode-datasource-tabs-border-color) 0, -1px;
_:warning: Potential issue_ **Fix invalid box-shadow syntax.** The current box-shadow property has incorrect syntax that would prevent it from working as intended. The comma after `0` is invalid, and the values don't follow the standard box-shadow format. Apply this diff to fix the syntax: ```diff - box-shadow: ...
tiny-engine
github_2023
others
1,069
opentiny
coderabbitai[bot]
@@ -94,15 +94,25 @@ export default { setup() { const { pageSettingState, changeTreeData, STATIC_PAGE_GROUP_ID } = usePage() const ROOT_ID = pageSettingState.ROOT_ID - const oldParentId = ref(pageSettingState.currentPageData.parentId) + + const pageParentId = computed({ + get() { + return ...
_:hammer_and_wrench: Refactor suggestion_ **Avoid duplicating or desynchronizing state.** `oldParentId` is now maintained both here and in `pageSettingState.oldParentId`. Having two sources of truth can cause confusion or bugs if they diverge. Consider unifying them or removing one if not strictly needed. <!-- This...
tiny-engine
github_2023
javascript
1,069
opentiny
coderabbitai[bot]
@@ -151,10 +154,16 @@ const isCurrentDataSame = () => { return isEqual } +const getParentNode = (parentId) => { + return parentId === pageSettingState.ROOT_ID + ? { id: pageSettingState.ROOT_ID, children: pageSettingState.pages[STATIC_PAGE_GROUP_ID].data } + : pageSettingState.treeDataMapping[parentId] +} ...
_:hammer_and_wrench: Refactor suggestion_ **Guard against undefined parent data.** If `folderData` or `parentData` come back as `undefined`, subsequent operations like `parentData.children?.findIndex` will fail. Add a guard to avoid runtime errors. ```diff if (newParentId && oldParentId && String(newParentId) ...
tiny-engine
github_2023
others
1,092
opentiny
coderabbitai[bot]
@@ -91,12 +96,19 @@ export default { delete item.children } else { if (item.children.length) { - translateChild(item.children) + const { maxDepth: curDepth } = translateChild(item.children) + + if (curDepth > maxDepth.value) { + ...
_:warning: Potential issue_ **Fix incorrect destructuring of translateChild return value.** The `translateChild` function now returns an object with `data` and `maxDepth`, but the destructuring is incorrect. ```diff - return [{ ...translateChild([extend(true, {}, data)])[0], componentName: 'body' }] + const { ...
tiny-engine
github_2023
others
1,092
opentiny
rhlin
@@ -80,9 +81,17 @@ export default { const { PLUGIN_NAME } = useLayout() const panelFixed = computed(() => props.fixedPanels?.includes(PLUGIN_NAME.OutlineTree)) + const maxDepth = ref(1) + // 树宽度:最大深度 * 16 + 120,其中 16 为每层缩进的宽度(tiny-grid 默认的缩进宽度),120 为树的最小宽度 + const treeWidth = computed(() => `${Math...
代码互相耦合比较严重, 并且在中间过程中反复修改maxDepth。连锁可能造成一直修改treewiidth 建议用闭包的形式 计算后同时返回 ,内部的最大值和过滤后的数据结果, 计算完毕后再复制给外部的maxDepth。
tiny-engine
github_2023
javascript
1,074
opentiny
coderabbitai[bot]
@@ -14,14 +25,22 @@ describe('generate element-plus material project correctly', () => { const { genResult } = res // 写入文件 - genResult.forEach(({ fileName, path: filePath, fileContent }) => { + for (const { fileName, path: filePath, fileContent } of genResult) { fs.mkdirSync(path.resolve(__dirn...
_:warning: Potential issue_ **Add error handling for file operations.** The file writing logic lacks try-catch blocks for error handling. File system operations can fail for various reasons. ```diff - for (const { fileName, path: filePath, fileContent } of genResult) { + for (const { fileName, path: filePath, ...
tiny-engine
github_2023
typescript
1,083
opentiny
coderabbitai[bot]
@@ -54,26 +54,31 @@ export function useUtils(context: Record<string, any>) { } }) - const npmUtilsImports = data + const npmUtilPromises = data .filter((item) => item.type === 'npm' && item.content.cdnLink) - .map((item) => import(/* @vite-ignore */ item.content.cdnLink)) - const npmU...
_:hammer_and_wrench: Refactor suggestion_ **Simplify promise handling to avoid unnecessary nesting.** The current implementation unnecessarily wraps a single promise in `Promise.allSettled`. This adds complexity without benefits. ```diff - const promise = import(/* @vite-ignore */ item.content.cdnLink) - ...
tiny-engine
github_2023
typescript
1,083
opentiny
coderabbitai[bot]
@@ -54,26 +54,31 @@ } }) - const npmUtilsImports = data + const npmUtilPromises = data .filter((item) => item.type === 'npm' && item.content.cdnLink) - .map((item) => import(/* @vite-ignore */ item.content.cdnLink)) - const npmUtils = await Promise.allSettled(npmUtilsImports) - - n...
_:bulb: Codebase verification_ **URL validation is needed for CDN links before dynamic imports** The code uses CDN links directly in dynamic imports without prior validation. Adding URL validation would catch invalid URLs early and provide better error messages, preventing unnecessary failed network requests. - `...
tiny-engine
github_2023
others
1,079
opentiny
coderabbitai[bot]
@@ -10,7 +10,7 @@ "axios": "${VITE_CDN_DOMAIN}/axios@1.0.0/dist/esm/axios.js", "@opentiny/tiny-engine-webcomponent-core": "${VITE_CDN_DOMAIN}/@opentiny/tiny-engine-webcomponent-core@1/dist/tiny-engine-webcomponent-core.es.js", "@opentiny/tiny-engine-i18n-host": "${VITE_CDN_DOMAIN}/@opentiny/tiny-engine-i...
_:bulb: Codebase verification_ **Recommend pinning to version 2.1.0 for stability** The package shows active development with multiple release candidates. While no breaking changes were found, pinning to the latest stable version 2.1.0 would ensure consistent behavior across environments. <details> <summary>🔗 A...
tiny-engine
github_2023
others
1,080
opentiny
coderabbitai[bot]
@@ -166,6 +166,7 @@ export default { message: '添加区块成功', type: 'success' }) + useBlock().isRefresh.value = true
_:hammer_and_wrench: Refactor suggestion_ **Remove duplicate refresh state update.** The `isRefresh.value` is set to `true` twice in this method. The first one is at line 168 (shown in context), and this line duplicates that update. ```diff - useBlock().isRefresh.value = true ``` <!-- This is an auto-gen...
tiny-engine
github_2023
javascript
1,080
opentiny
coderabbitai[bot]
@@ -403,6 +425,8 @@ export const delBlock = (closePanel) => () => { // data:后台删除成功返回的是被删除的数据 remove(getBlockList(), block) message({ message: '删除区块成功!', status: 'success' }) + updateBlockList() + useBlock().isRefresh.value = true
_:hammer_and_wrench: Refactor suggestion_ **Consolidate refresh state management.** The code sets `isRefresh.value = true` in multiple places after updating the block list. This pattern could lead to race conditions and inconsistent state. Consider implementing a more robust state management approach. ```diff expor...
tiny-engine
github_2023
javascript
1,080
opentiny
coderabbitai[bot]
@@ -391,6 +399,20 @@ }) } +export const updateBlockList = () => { + let params = useBlock().shouldReplaceCategoryWithGroup() + ? { groupId: currentCategory.value } + : { categoryId: currentCategory.value } + if (!currentCategory.value) { + params = {} + } + const appId = getAppId() + fetchBlockLis...
_:hammer_and_wrench: Refactor suggestion_ **Improve error handling in updateBlockList.** The function lacks error handling for the API call, which could lead to unhandled promise rejections. Also, the sorting logic could be moved to a separate function for better maintainability. ```diff export const updateBlockLis...
tiny-engine
github_2023
others
1,080
opentiny
hexqi
@@ -238,9 +243,10 @@ export default { const block = getEditBlock() if (block) { - const { category_id } = categoryList.value.find((item) => item.id === value) ?? {} - block.path = category_id - block.categories = [value] + const idKey = shouldReplaceCategoryWithGroup() ? 'id'...
value为非数组时,block.categories给的默认值是字符串?这里是不是不对
tiny-engine
github_2023
others
1,077
opentiny
coderabbitai[bot]
@@ -0,0 +1,105 @@ +import fs from 'fs-extra' +import path from 'node:path' +import { fileURLToPath } from 'node:url' +import Logger from './logger.mjs' +import pkg from '../packages/design-core/package.json' assert { type: 'json' } + +const logger = new Logger('updateTemplate') + +const __filename = fileURLToPath(impor...
_:hammer_and_wrench: Refactor suggestion_ **Fix assignments in expressions.** The static analysis tool correctly flagged assignments in expressions. Let's refactor for better readability. ```diff - Object.keys(pkgData.dependencies) - .filter((name) => name.includes('@opentiny/tiny-engine')) - .forEach((name) ...
tiny-engine
github_2023
others
1,076
opentiny
coderabbitai[bot]
@@ -1,20 +1,20 @@ { - "name": "designer-demo-template", + "name": "designer-demo", "private": true, "version": "0.0.0", "type": "module", "scripts": { "dev": "concurrently 'pnpm:serve:mock' 'pnpm:serve:frontend'", - "serve:frontend": "cross-env VITE_THEME=light vite", - "serve:mock": "node nod...
_:bulb: Codebase verification_ **Use stable version 2.1.0 instead of release candidate 2.2.0-rc.0** The template should use the latest stable version (2.1.0) instead of a release candidate version. Templates are starting points for new projects and should prioritize stability. All required @opentiny packages have 2...
tiny-engine
github_2023
others
1,076
opentiny
coderabbitai[bot]
@@ -0,0 +1,105 @@ +import fs from 'fs-extra' +import path from 'node:path' +import { fileURLToPath } from 'node:url' +import Logger from './logger.mjs' +import pkg from '../packages/design-core/package.json' assert { type: 'json' } + +const logger = new Logger('updateTemplate') + +const __filename = fileURLToPath(impor...
_:hammer_and_wrench: Refactor suggestion_ **Add error handling to main function.** The main function should catch errors and provide appropriate feedback. ```diff async function main() { + try { + logger.info('Starting template update...') await copyTemplate() + logger.info('Template copied successfully...
tiny-engine
github_2023
others
1,076
opentiny
coderabbitai[bot]
@@ -0,0 +1,105 @@ +import fs from 'fs-extra' +import path from 'node:path' +import { fileURLToPath } from 'node:url' +import Logger from './logger.mjs' +import pkg from '../packages/design-core/package.json' assert { type: 'json' } + +const logger = new Logger('updateTemplate') + +const __filename = fileURLToPath(impor...
_:hammer_and_wrench: Refactor suggestion_ **Enhance vite.config.js modification logic.** The current implementation could be more robust: 1. Use a more specific regex pattern 2. Add error handling for file operations ```diff async function modifyViteConfig() { const viteConfigPath = path.resolve(templateDistPath...
tiny-engine
github_2023
others
1,076
opentiny
coderabbitai[bot]
@@ -0,0 +1,105 @@ +import fs from 'fs-extra' +import path from 'node:path' +import { fileURLToPath } from 'node:url' +import Logger from './logger.mjs' +import pkg from '../packages/design-core/package.json' assert { type: 'json' } + +const logger = new Logger('updateTemplate') + +const __filename = fileURLToPath(impor...
_:warning: Potential issue_ **Refactor assignments in forEach loops.** The current implementation uses assignments in expressions, which can be confusing and was flagged by static analysis. ```diff - Object.keys(pkgData.dependencies) - .filter((name) => name.includes('@opentiny/tiny-engine')) - .forEach((name...
tiny-engine
github_2023
others
1,067
opentiny
coderabbitai[bot]
@@ -22,17 +22,9 @@ <span><svg-icon class="svg-icon" name="user-guide"></svg-icon>使用手册</span ><icon-fillet-external-link class="icon-fillet-external-link" /> </a> - <tiny-tooltip v-model="state.showTooltip" :manual="true" effect="light" placement="right-end"> - <t...
_:bulb: Codebase verification_ **Remove unused tooltip variable** The tooltip functionality has been successfully removed, but there's still an unused tooltip-related variable that should be cleaned up: - `toolTipContent` variable in `packages/plugins/help/src/HelpIcon.vue` <details> <summary>🔗 Analysis chain</...
tiny-engine
github_2023
others
1,065
opentiny
coderabbitai[bot]
@@ -2,5 +2,5 @@ // 资源管理 --ti-lowcode-bridge-list-color: var(--te-common-text-primary); --ti-lowcode-bridge-list-bg: var(--te-common-bg-container); - --ti-lowcode-birdge-editor-border-color: var(--te-common-border-default); + --ti-lowcode-birdge-editor-border-color: var(--te-common-border-divider);
_:warning: Potential issue_ **Fix typo in CSS variable name: "birdge" → "bridge"** The variable name contains a typo: `--ti-lowcode-birdge-editor-border-color` should be `--ti-lowcode-bridge-editor-border-color`. ```diff - --ti-lowcode-birdge-editor-border-color: var(--te-common-border-divider); + --ti-lowcode-bridg...
tiny-engine
github_2023
others
1,065
opentiny
lichunn
@@ -551,6 +551,7 @@ export default { .binding-state { color: var(--ti-lowcode-meta-config-item-bind-color); background: var(--ti-lowcode-meta-config-item-bind-bg); + border: 1px solid var(--ti-lowcode-meta-config-item-bind-border);
这里应该使用--te-common变量
tiny-engine
github_2023
others
1,065
opentiny
lichunn
@@ -741,7 +725,7 @@ export default { box-sizing: border-box; cursor: pointer; &:hover { - color: var(--te-common-text-primary); + color: var(--ti-lowcode-common-primary-text-color);
同上,公共组件目前都调整为--te-common变量
tiny-engine
github_2023
others
1,065
opentiny
lichunn
@@ -358,7 +358,7 @@ export default { padding: 12px; background: var(--ti-lowcode-component-block-list-shortcut-bg); border-radius: 5px; - border: 1px solid var(--te-common-border-default); + border: 1px solid var(--ti-lowcode-common-border-color-4);
同上,这里应该使用--te-common变量
tiny-engine
github_2023
others
1,065
opentiny
lichunn
@@ -158,7 +148,7 @@ export default { .dots { width: 6px; height: 6px; - background: var(--te-common-color-error); + background: var(--ti-lowcode-common-error-color);
--ti-lowcode-common-xxx的变量都不能使用了,后期要全部删除的
tiny-engine
github_2023
others
1,065
opentiny
lichunn
@@ -1,8 +1,13 @@ :root { --ti-lowcode-page-manage-title-background-text-color: var(--te-common-text-primary); - --ti-lowcode-page-manage-tip-text-color: var(--te-common-text-weaken); + --ti-lowcode-page-manage-tip-border-color: var(--te-common-text-weaken); + --ti-lowcode-page-manage-icon-text-color: var(--te-co...
这里又有一个--ti-lowcode-common
tiny-engine
github_2023
others
1,065
opentiny
hexqi
@@ -1,12 +1,17 @@ -.tiny-engine-toolbar { +:root { // 头部工具栏 --ti-lowcode-toolbar-border-bottom-color: var(--te-common-border-divider); --ti-lowcode-toolbar-title-color: var(--te-common-text-primary); + --ti-lowcode-toolbar-sub-title-color: var(--te-common-text-secondary); --ti-lowcode-toolbar-hover-color: ...
应该使用te开头变量
tiny-engine
github_2023
others
1,008
opentiny
coderabbitai[bot]
@@ -35,8 +35,8 @@ "vite": "^5.4.2" }, "peerDependencies": { - "@opentiny/vue": "^3.14.0", - "@opentiny/vue-icon": "^3.14.0", + "@opentiny/vue": "^3.20.0", + "@opentiny/vue-icon": "^3.20.0",
_:bulb: Codebase verification_ **Update @opentiny/vue version in tiny-engine-toolbar-view-setting package** The version check revealed an inconsistency: - `@opentiny/tiny-engine-toolbar-view-setting` uses `@opentiny/vue: ^3.14.0` while all other packages use `^3.20.0` <details> <summary>🔗 Analysis chain</summar...
tiny-engine
github_2023
others
1,008
opentiny
coderabbitai[bot]
@@ -36,7 +36,7 @@ "vite": "^5.4.2" }, "peerDependencies": { - "@opentiny/vue": "^3.14.0", + "@opentiny/vue": "^3.20.0",
_:warning: Potential issue_ **Breaking Change: Comprehensive Review Required** This PR introduces a significant version upgrade (3.14.0 → 3.20.0) across multiple packages. Before merging, please address: 1. Breaking Changes: - Document all breaking changes - Provide migration guide - Update all affected doc...
tiny-engine
github_2023
others
1,008
opentiny
coderabbitai[bot]
@@ -36,9 +36,9 @@ "vite": "^5.4.2" }, "peerDependencies": { - "@opentiny/vue": "^3.14.0", - "@opentiny/vue-icon": "^3.14.0", - "@opentiny/vue-renderless": "^3.14.0", + "@opentiny/vue": "^3.20.0", + "@opentiny/vue-icon": "^3.20.0", + "@opentiny/vue-renderless": "^3.20.0",
_:warning: Potential issue_ **Document breaking changes and provide migration guide.** Since this is marked as a breaking change in the PR objectives, please: 1. Document the breaking changes between @opentiny/vue 3.14.0 and 3.20.0 2. Provide a migration guide for users 3. Add test cases to verify the upgrade Consi...
tiny-engine
github_2023
others
1,008
opentiny
coderabbitai[bot]
@@ -26,19 +26,21 @@ "@opentiny/tiny-engine-common": "workspace:*", "@opentiny/tiny-engine-meta-register": "workspace:*", "@opentiny/tiny-engine-utils": "workspace:*", - "@opentiny/vue": "~3.14.0", - "@opentiny/vue-design-smb": "~3.14.0", - "@opentiny/vue-icon": "~3.14.0", - "@opentiny/vue-ren...
_:bulb: Codebase verification_ **Vue 3.4.x compatibility verified, but one package needs version alignment** The Vue 3.4.x upgrade is safe as: - All production packages consistently use Vue 3.4.x - No usage of Vue 3.4-specific features that could cause compatibility issues - OpenTiny packages are consistently on ve...
tiny-engine
github_2023
others
1,008
opentiny
coderabbitai[bot]
@@ -22,8 +22,8 @@ "vite": "^5.4.2" }, "peerDependencies": { - "@opentiny/vue": "^3.14.0", - "@opentiny/vue-icon": "^3.14.0", + "@opentiny/vue": "^3.20.0", + "@opentiny/vue-icon": "^3.20.0",
_:bulb: Codebase verification_ **Tests needed for OpenTiny Vue 3.20.0 upgrade** The verification confirms that tests are missing for the configurator package. This is particularly critical because: - Multiple configurator components (25+) depend on OpenTiny Vue - No test files exist to verify compatibility with the...
tiny-engine
github_2023
others
1,008
opentiny
coderabbitai[bot]
@@ -38,8 +38,8 @@ "vite": "^5.4.2" }, "peerDependencies": { - "@opentiny/vue": "^3.14.0", - "@opentiny/vue-icon": "^3.14.0", + "@opentiny/vue": "^3.20.0", + "@opentiny/vue-icon": "^3.20.0",
_:bulb: Codebase verification_ **Documentation update needed for OpenTiny Vue 3.20.0 upgrade** The verification confirms that documentation for the OpenTiny Vue version upgrade is missing. Please: 1. Create a changelog entry documenting the upgrade from previous version to 3.20.0 2. Document any breaking changes, n...
tiny-engine
github_2023
others
1,008
opentiny
coderabbitai[bot]
@@ -15,12 +15,12 @@ "@opentiny/tiny-engine-theme-dark": "^2.1.0", "@opentiny/tiny-engine-theme-light": "^2.1.0", "@opentiny/tiny-engine-utils": "^2.1.0", - "@opentiny/vue": "~3.14.0", - "@opentiny/vue-design-smb": "~3.14.0", - "@opentiny/vue-icon": "~3.14.0", - "@opentiny/vue-locale": "~3.14....
_:warning: Potential issue_ **❌ Blocking: Missing crucial documentation for breaking changes.** This PR introduces a major version bump (3.14.0 → 3.20.0) across multiple packages and is marked as a breaking change. Before proceeding: 1. Add a detailed changelog documenting: - Breaking changes - New features ...
tiny-engine
github_2023
javascript
1,008
opentiny
coderabbitai[bot]
@@ -16,7 +16,7 @@ export function extraPreviewImport(filename, originCdnPrefix) { const result = [] const importMap = readJsonSync(filename) Object.entries(importMap.imports)?.forEach(([_key, location]) => { - const url = location.replace('${VITE_CDN_DOMAIN}', originCdnPrefix).replace('${opentinyVueVersion}...
_:hammer_and_wrench: Refactor suggestion_ **Extract the version string to a constant.** The version string `~3.20` is duplicated and hardcoded. Consider extracting it to a constant at the module level for better maintainability and to avoid potential inconsistencies during future updates. ```diff +const OPENTINY_VUE...
tiny-engine
github_2023
javascript
1,061
opentiny
coderabbitai[bot]
@@ -38,12 +38,21 @@ const appSchemaState = reactive({ materialsDeps: { scripts: [], styles: new Set() } }) +function goPage(pageId) { + const url = new URL(window.location) + + url.searchParams.set('pageid', pageId) + window.history.pushState({}, '', url) + usePage().postLocationHistoryChanged({ pageId }) +}
_:warning: Potential issue_ **Add parameter validation to prevent undefined pageId.** The `goPage` function should validate the `pageId` parameter before updating the URL to prevent setting 'undefined' as the page ID. This aligns with the PR's objective of fixing the undefined page ID issue. Here's the suggested imp...
tiny-engine
github_2023
javascript
1,061
opentiny
coderabbitai[bot]
@@ -38,12 +38,21 @@ materialsDeps: { scripts: [], styles: new Set() } }) +function goPage(pageId) { + const url = new URL(window.location) + + url.searchParams.set('pageid', pageId) + window.history.pushState({}, '', url) + usePage().postLocationHistoryChanged({ pageId }) +} + const initPage = (pageInfo) => ...
_:hammer_and_wrench: Refactor suggestion_ **Improve page initialization logic.** The current implementation could still attempt to call `goPage` with an undefined ID. Consider restructuring the logic to make the flow more explicit and handle edge cases better. Here's a suggested improvement: ```diff - goPage(p...
tiny-engine
github_2023
others
1,053
opentiny
coderabbitai[bot]
@@ -1,7 +1,7 @@ { "name": "designer-demo", "private": true, - "version": "2.1.0", + "version": "2.2.0-beta.1",
_:bulb: Codebase verification_ **Align workspace dependency patterns with project convention** The codebase predominantly uses `workspace:*` for internal dependencies. Consider updating the following in designer-demo/package.json to match this pattern: - `@opentiny/tiny-engine: workspace:^` → `workspace:*` - `@open...
tiny-engine
github_2023
others
1,053
opentiny
coderabbitai[bot]
@@ -1,6 +1,6 @@ { "name": "@opentiny/tiny-engine-layout", - "version": "2.1.0", + "version": "2.2.0-beta.1",
_:bulb: Codebase verification_ _:warning: Potential issue_ **Critical: Vue version inconsistency confirmed across packages** The version mismatch is verified: - `@opentiny/tiny-engine-layout` uses Vue 3.2.45 - Most other packages use Vue ^3.4.x (primarily 3.4.21) This significant version gap (3.2.45 → 3.4.21) sho...
tiny-engine
github_2023
others
1,004
opentiny
hexqi
@@ -137,13 +137,18 @@ export default { }, state.timeValue * 60 * 1000) } const autoSave = () => {
这个方法名不合规范,也一起改下,一般用动词+名词,例如可以改成: saveConfig
tiny-engine
github_2023
others
1,004
opentiny
coderabbitai[bot]
@@ -136,14 +136,19 @@ export default { saveSetTimeout() }, state.timeValue * 60 * 1000) } - const autoSave = () => { + const saveConfig = () => { + setAutoSaveStatus(state.checked) if (state.checked) { saveSetTimeout() } else { clearTimeout(state.preservat...
_:hammer_and_wrench: Refactor suggestion_ **Restart auto-save timer if it was previously enabled.** When the component mounts and auto-save was previously enabled, the timer should be restarted to continue the auto-save functionality. ```diff onMounted(() => { state.checked = getAutoSaveStatus() + if (state.che...
tiny-engine
github_2023
others
1,004
opentiny
coderabbitai[bot]
@@ -136,14 +136,19 @@ saveSetTimeout() }, state.timeValue * 60 * 1000) } - const autoSave = () => { + const saveConfig = () => { + setAutoSaveStatus(state.checked) if (state.checked) { saveSetTimeout() } else { clearTimeout(state.preservationTime) }
_:bulb: Codebase verification_ **Confirmed: Save interval is not persisted across page refreshes** The codebase search confirms that `timeValue` is only used locally within Main.vue and is reset to 5 minutes on each page load. The original review's suggestion to persist this value in localStorage would improve user...
tiny-engine
github_2023
others
1,049
opentiny
coderabbitai[bot]
@@ -1,16 +1,12 @@ :root { - // 国际化表格操作图标颜色 - --ti-lowcode-i18n-operate-svg-color: var(--ti-lowcode-base-text-color); // 国际化表格加载中字体颜色 - --ti-lowcode-i18n-loading-text-color: #999999; + --ti-lowcode-i18n-loading-text-color: var(--te-common-text-weaken); // 国际化表格加载中图标颜色 - --ti-lowcode-i18n-loading-svg-color: v...
_:warning: Potential issue_ **Add missing icon color variable to dark theme.** The light theme includes `--ti-lowcode-i18n-icon-color` but this variable is missing in the dark theme. This could lead to inconsistent styling between themes. Add the following to `packages/theme/dark/i18n.less`: ```diff :root { // ......
tiny-engine
github_2023
others
1,049
opentiny
coderabbitai[bot]
@@ -1,27 +1,9 @@ :root { - --ti-lowcode-page-manage-title-background-text-color: var(--ti-lowcode-base-text-color); - --ti-lowcode-page-manage-tip-border-color: var(--ti-lowcode-base-gray-50); - --ti-lowcode-page-manage-tree-text-background-color: var(--ti-lowcode-common-bg-8); - --ti-lowcode-page-manage-tree-node...
_:warning: Potential issue_ **Add missing tree node label variable to dark theme.** The light theme includes `--ti-lowcode-page-manage-tree-node-label-color` but this variable is missing in the dark theme. This could cause inconsistent tree node styling. Add the following to `packages/theme/dark/pageManage.less`: ``...
tiny-engine
github_2023
others
1,049
opentiny
coderabbitai[bot]
@@ -1,17 +1,12 @@ .tiny-engine-toolbar { // 头部工具栏 - --ti-lowcode-toolbar-border-bottom-color: var(--ti-lowcode-common-border-color-4); - --ti-lowcode-toolbar-media-bg: var(--ti-lowcode-common-component-bg); - --ti-lowcode-toolbar-media-setting-border-color: var(--ti-lowcode-common-border-color-1); - --ti-lowcod...
_:bulb: Codebase verification_ **Update the misleading transparency comment** The comment stating "相当于 规范中定义的 #191919 透明度5%" (equivalent to #191919 with 5% transparency) is incorrect. The actual implementation uses solid colors: - Light theme: `--te-base-gray-30` (#e6e6e6) - Dark theme: `--te-base-gray-120` (#8b8c8...
tiny-engine
github_2023
others
1,049
opentiny
coderabbitai[bot]
@@ -1,30 +1,22 @@ :root { // 带边框的图标按钮边框颜色 --ti-lowcode-materials-border-icon-border-color: transparent; - // 带边框的图标按钮图标颜色 - --ti-lowcode-materials-border-icon-svg-color: #d9d9d9; // 带边框的图标按钮悬浮边框颜色 --ti-lowcode-materials-border-icon-border-color-hover: transparent; // 带边框的图标按钮背景颜色 - --ti-lowcode-mater...
_:bulb: Codebase verification_ **Document theme differences in a central location** The differences between light and dark themes are currently documented through inline comments, but should be centralized for better maintainability. Create a dedicated theme documentation file that lists these intentional variation...
tiny-engine
github_2023
others
1,049
opentiny
coderabbitai[bot]
@@ -1,54 +1,29 @@ :root { - // 历史备份列表 - --ti-lowcode-component-block-history-list-item-border-color: var(--ti-lowcode-common-border-color-1); // 组件边框色 - --ti-lowcode-component-block-history-list-item-hover-bg: var( - --ti-lowcode-common-component-hover-bg - ); // 组件 hover 背景 色 - --ti-lowcode-component-block-hi...
_:warning: Potential issue_ **Remove duplicate variable declaration.** The variable `--ti-lowcode-component-block-version-list-time-color` is declared twice with the same value. Remove the duplicate declaration on line 12. Also applies to: 12-12 <!-- This is an auto-generated comment by CodeRabbit -->
tiny-engine
github_2023
others
1,049
opentiny
coderabbitai[bot]
@@ -55,13 +53,13 @@ --ti-lowcode-chat-model-tips-bg: #f5f5f5; // chatGPT加载 - --ti-lowcode-chat-loading-svg-color: var(--ti-lowcode-common-primary-color); + --ti-lowcode-chat-loading-svg-color: #1476ff; --ti-lowcode-chat-loading-text-color: #595959; } .chat-model-popover { --ti-lowcode-chat-model-pop...
_:hammer_and_wrench: Refactor suggestion_ **Use common theme variables instead of hardcoded colors.** The changes introduce hardcoded color values (`#1476ff`, `#191919`) instead of using the new common theme variables. This goes against the PR's objective of standardizing variables. Consider using the appropriate `-...
tiny-engine
github_2023
others
1,049
opentiny
coderabbitai[bot]
@@ -1,40 +1,39 @@ .setting-advanced-add-custom-event-tip { - --ti-lowcode-events-add-custom-event-tips-color: var(--ti-lowcode-base-text-color); - --ti-lowcode-event-add-custom-event-tips-highlight-color: var(--ti-lowcode-base-warn-color); + --ti-lowcode-events-add-custom-event-tips-color: var(--te-common-text-prim...
_:warning: Potential issue_ **Fix typo in variable name.** The variable has an extra dash: `---te-common-bg-container` should be `--te-common-bg-container`. Apply this diff to fix the typo: ```diff - --ti-lowcode-events-bind-action-item-hover-bg-color: var(---te-common-bg-container); + --ti-lowcode-events-bind-ac...
tiny-engine
github_2023
others
1,049
opentiny
coderabbitai[bot]
@@ -270,117 +188,34 @@ --ti-lowcode-breadcrumb-hover-bg: #fff; // 弹框中tip提示边框颜色 --ti-lowcode-dialog-tip-border-color: #575d6c; - // 弹框字体颜色 && 左侧面板 title 字体颜色 - --ti-lowcode-dialog-font-color: #333; // 输入框icon图标颜色 --ti-lowcode-input-icon-color: #737373; - // 弹框字体颜色 && 图标颜色 && 输入框 suffix 字体颜色 - --ti-low...
_:bulb: Codebase verification_ **The hover background value needs adjustment for theme consistency** The current implementation has several issues: - Both light and dark themes use the same `rgba(255, 255, 255, 0.1)` value, which is not optimal for light theme - Other hover backgrounds in the codebase use semantic ...
tiny-engine
github_2023
others
1,049
opentiny
coderabbitai[bot]
@@ -4,46 +4,12 @@ --base-min-width: 1280px; // ------ 主要的公共主题色,前缀为 --ti-lowcode-common ------- - --ti-lowcode-common-primary-color: #4f77ff; - --ti-lowcode-common-primary-hover-color: #3961eb; - --ti-lowcode-common-primary-color-1: #cad6ff; - --ti-lowcode-common-component-bg: #2f2f2f; - --ti-lowcode-common...
_:warning: Potential issue_ **Fix circular reference in error color variable.** The variable `--te-common-color-error` is self-referential, which could lead to undefined behavior. This needs to be set to an actual color value. ```diff --- te-common-color-error: var(--te-common-color-error); +-- te-common-color-error...
tiny-engine
github_2023
others
1,049
opentiny
coderabbitai[bot]
@@ -53,100 +19,81 @@ } .tiny-grid { - --ti-grid-light-color: var(--ti-lowcode-common-component-bg); - --ti-grid-text-color: var(--ti-lowcode-common-text-color-5); + --ti-grid-light-color: var(--te-common-bg-default); + --ti-grid-text-color: var(--te-common-text-weaken); } --ti-lowcode-trigge...
_:hammer_and_wrench: Refactor suggestion_ **Replace hard-coded color with semantic variable.** The hard-coded color `#262626` breaks the pattern of using semantic variables. Consider using an appropriate common variable for consistency. ```diff --ti-lowcode-plugin-panel-border-right-color: var(--te-common-border-d...
tiny-engine
github_2023
others
1,049
opentiny
coderabbitai[bot]
@@ -292,115 +205,35 @@ --ti-lowcode-breadcrumb-hover-bg: #fff; // 弹框中tip提示边框颜色 --ti-lowcode-dialog-tip-border-color: #d9d9d9; - // 弹框字体颜色 && 左侧面板 title 字体颜色 - --ti-lowcode-dialog-font-color: #ebebeb; // 输入框icon图标颜色 --ti-lowcode-input-icon-color: #737373; - // 弹框字体颜色 && 图标颜色 && 输入框 suffix 字体颜色 - --ti-...
_:bulb: Codebase verification_ **Fix incorrect hover background in light theme** The same white background with 0.1 opacity is used in both themes, which won't work correctly: - Dark theme: `rgba(255, 255, 255, 0.1)` ✓ (correct for dark background) - Light theme: `rgba(255, 255, 255, 0.1)` ✗ (incorrect, should use ...
tiny-engine
github_2023
others
1,049
opentiny
coderabbitai[bot]
@@ -1,27 +1,8 @@ :root { - --ti-lowcode-page-manage-title-background-text-color: var(--ti-lowcode-base-text-color); - --ti-lowcode-page-manage-tip-border-color: var(--ti-lowcode-base-gray-50); - --ti-lowcode-page-manage-tree-text-background-color: var(--ti-lowcode-common-bg-8); - --ti-lowcode-page-manage-tree-node...
_:hammer_and_wrench: Refactor suggestion_ **Simplify variable usage by directly using te-common variables.** The current changes create an unnecessary level of indirection by keeping the `ti-lowcode-*` variables as intermediaries. According to the PR objectives, we should eliminate dependencies on `ti-lowcode-*` vari...
tiny-engine
github_2023
others
1,049
opentiny
coderabbitai[bot]
@@ -121,34 +72,24 @@ // 头部工具栏更多more图标hover颜色 --ti-lowcode-toolbar-more-hover-color: var(--te-common-icon-secondary); - // 头部工具栏面包屑字体颜色 - --ti-lowcode-toolbar-breadcrumb-color: var(--ti-lowcode-base-gray-60); - // 头部工具栏画布大小文本hover背景色 && 头部弹框背景色 && context-menu 背景色 && 大纲树节点hover背景色 && 日期组件背景色 - --ti-lowcode-t...
_:hammer_and_wrench: Refactor suggestion_ **Use appropriate semantic variable for hover state.** Using `--te-common-bg-primary-checked` for hover state seems incorrect. Consider using a hover-specific semantic variable instead. ```diff - --ti-lowcode-canvas-handle-hover-bg: var(--te-common-bg-primary-checked); + --t...
tiny-engine
github_2023
others
1,049
opentiny
coderabbitai[bot]
@@ -1,54 +1,28 @@ :root { - // 历史备份列表 - --ti-lowcode-component-block-history-list-item-border-color: var(--ti-lowcode-common-border-color-1); // 组件边框色 - --ti-lowcode-component-block-history-list-item-hover-bg: var( - --ti-lowcode-common-component-hover-bg - ); // 组件 hover 背景 色 - --ti-lowcode-component-block-hi...
_:bulb: Codebase verification_ **Theme inconsistencies require attention** Several issues need to be addressed: - Incomplete variable definition: `--ti-lowcode-component-block-list-setting-btn-hover-color` in dark theme - Missing variable in light theme: `--ti-lowcode-component-block-version-list-current-version-co...
tiny-engine
github_2023
others
1,048
opentiny
coderabbitai[bot]
@@ -14187,6 +14035,23 @@ } ] } + ], + "packages": [ + { + "name": "TinyVue组件库", + "package": "@opentiny/vue", + "version": "3.14.0", + "destructuring": true, + "script": "https://unpkg.com/@opentiny/vue@~3.14/runtime/tiny-vue...
_:bulb: Codebase verification_ **⚠️ Element Plus version 2.4.2 is outdated** The current version (2.4.2) is several versions behind the latest stable release (2.9.3). While no security vulnerabilities are present in the current version, upgrading is recommended to benefit from the latest improvements and bug fixes....
tiny-engine
github_2023
others
1,027
opentiny
coderabbitai[bot]
@@ -194,18 +191,13 @@ export default { p span { &:first-child { font-size: 14; - color: var(--ti-lowcode-toolbar-breadcrumb-color); + color: var(--te-common-text-secondary);
_:hammer_and_wrench: Refactor suggestion_ **Complete variable migration for consistency** While these text color changes correctly adopt the new `te-common-*` variables, there are still some unconverted `ti-lowcode-*` variables in the file: - `--ti-lowcode-data-list-color` in `.item-head` - `--ti-lowcode-toolbar-icon...
tiny-engine
github_2023
others
1,027
opentiny
coderabbitai[bot]
@@ -119,13 +119,10 @@ padding-top: 12px; border-top: 1px solid var(--te-common-border-divider); overflow-y: scroll; - .data-source-list-blank { - font-size: 12px; - } .data-source-list-item { &.selected, &:hover { - background: var(--ti-lowcode-common-component-hover-bg); + backgrou...
_:bulb: Codebase verification_ **Use dedicated hover state variable** Replace `--te-common-bg-container` with `--te-common-bg-primary-checked` which is specifically designed for hover and selected states in the new theme system. - Location: Line 125 in packages/plugins/state/src/DataSourceList.vue <details> <sum...
tiny-engine
github_2023
others
1,027
opentiny
coderabbitai[bot]
@@ -240,24 +240,24 @@ export default { align-items: center; padding: 8px 12px; background: var(--ti-lowcode-toolbar-bg); - border-top: 1px solid var(--ti-lowcode-toolbar-border-color); - border-bottom: 1px solid var(--ti-lowcode-toolbar-border-color); - color: var(--ti-lowcode-toolbar-breadcrumb...
_:hammer_and_wrench: Refactor suggestion_ **Standardize remaining toolbar background variable** While most variables have been standardized, there's still a non-standard variable `--ti-lowcode-toolbar-bg` being used. Consider replacing it with an appropriate `--te-common-*` variable for consistency. <!-- This is an ...