-
Notifications
You must be signed in to change notification settings - Fork 281
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
docs(site): fix demos and test e2e #2444
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ | |
field="area" | ||
title="区域" | ||
:editor="{ | ||
component: Select, | ||
component: TinySelect, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Move TinySelect to components registration. The current implementation exposes TinySelect through data(), which is an unconventional pattern. Instead, register it in the components section for consistency and better maintainability. export default {
components: {
TinyGrid,
- TinyGridColumn
+ TinyGridColumn,
+ TinySelect
},
data() {
return {
- TinySelect,
options: [
{ name: '华中区', id: '1' },
// ...
], Also applies to: 37-52 |
||
attrs: { | ||
multiple: true, | ||
options, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ | |
<tiny-grid-column | ||
field="id" | ||
title="名称(Popeditor)" | ||
:editor="{ component: Popeditor, attrs: getPopEditorOp }" | ||
:editor="{ component: TinyPopeditor, attrs: getPopEditorOp }" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Codebase verification Both demo files need to be updated for consistency The regular version (popeditor-in-grid-remote-search.vue) is still using
🔗 Analysis chainLGTM! Please verify the demo functionality. The change to use Let's verify if any documentation updates are needed: 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Search for any remaining references to the old "Popeditor" in documentation
rg -i "popeditor" --type=md --type=vue
# Check if there are any related demo files that might need similar updates
fd -e vue "popeditor.*\.vue$"
Length of output: 266 Script: #!/bin/bash
# Let's check the content of both files to see if they are consistent
echo "=== Content of composition API file ==="
cat examples/sites/demos/pc/app/grid/editor/popeditor-in-grid-remote-search-composition-api.vue
echo -e "\n=== Content of regular file ==="
cat examples/sites/demos/pc/app/grid/editor/popeditor-in-grid-remote-search.vue
# Also check for any documentation references
rg -i "popeditor" --type=markdown
Length of output: 10621 |
||
:format-config="{ | ||
type: 'enum', | ||
async: true, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,7 @@ | |
show-overflow="tooltip" | ||
> | ||
<tiny-grid-column type="index" width="60"></tiny-grid-column> | ||
<tiny-grid-column field="name" title="名称" :editor="{ component: Input }"></tiny-grid-column> | ||
<tiny-grid-column field="name" title="名称" :editor="{ component: TinyInput }"></tiny-grid-column> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Codebase verification Inconsistent editor component usage across grid validation demos The change to use
🔗 Analysis chainLGTM! Verify validation behavior with TinyInput. The change from Input to TinyInput aligns with the standardization effort. The validation rules for the name field are properly configured to work with the editor component. Let's verify that other grid validation demos are consistently using TinyInput: Let me analyze the results from the grid validation demos:
Let me verify if these are all the grid validation demos and check their specific purposes: Let me check the content of other validation demos to understand if they also use TinyInput: 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Description: Check for consistent usage of TinyInput in grid validation demos
# Expected: All grid validation demos should use TinyInput for consistency
rg -l "grid/validation" | xargs rg "editor.*Input" -A 1 -B 1
Length of output: 7089 Script: #!/bin/bash
# List all grid validation demo files to ensure we haven't missed any
fd "validation.*vue" examples/sites/demos/pc/app/grid/validation/
# Check the purpose of custcomp demos by looking at their descriptions/comments
rg -B 5 -A 5 "title|description" examples/sites/demos/pc/app/grid/validation/custcomp*.vue
Length of output: 4793 Script: #!/bin/bash
# Check editor components used in other validation demos
rg -A 1 -B 1 "editor.*component" examples/sites/demos/pc/app/grid/validation/before-submit-validation*.vue examples/sites/demos/pc/app/grid/validation/editing-isvalidalways-validation*.vue examples/sites/demos/pc/app/grid/validation/editing-validation*.vue examples/sites/demos/pc/app/grid/validation/select-validation*.vue
Length of output: 8645 |
||
<tiny-grid-column field="area" title="区域" :editor="{ component: 'input' }"></tiny-grid-column> | ||
<tiny-grid-column field="address" title="地址" :editor="{ component: 'input' }"></tiny-grid-column> | ||
<tiny-grid-column field="introduction" title="公司简介" :editor="{ component: 'input' }"></tiny-grid-column> | ||
Comment on lines
19
to
21
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Consider using TinyInput consistently across all editable columns. Currently, there's an inconsistency in how editor components are specified:
For better maintainability and consistency, consider using TinyInput for all editable columns. <tiny-grid-column field="name" title="名称" :editor="{ component: TinyInput }"></tiny-grid-column>
- <tiny-grid-column field="area" title="区域" :editor="{ component: 'input' }"></tiny-grid-column>
- <tiny-grid-column field="address" title="地址" :editor="{ component: 'input' }"></tiny-grid-column>
- <tiny-grid-column field="introduction" title="公司简介" :editor="{ component: 'input' }"></tiny-grid-column>
+ <tiny-grid-column field="area" title="区域" :editor="{ component: TinyInput }"></tiny-grid-column>
+ <tiny-grid-column field="address" title="地址" :editor="{ component: TinyInput }"></tiny-grid-column>
+ <tiny-grid-column field="introduction" title="公司简介" :editor="{ component: TinyInput }"></tiny-grid-column>
|
||
|
Original file line number | Diff line number | Diff line change | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -15,7 +15,7 @@ | |||||||||||||||||
show-overflow="tooltip" | ||||||||||||||||||
> | ||||||||||||||||||
<tiny-grid-column type="index" width="60"></tiny-grid-column> | ||||||||||||||||||
<tiny-grid-column field="name" title="名称" :editor="{ component: Input }"></tiny-grid-column> | ||||||||||||||||||
<tiny-grid-column field="name" title="名称" :editor="{ component: TinyInput }"></tiny-grid-column> | ||||||||||||||||||
<tiny-grid-column field="area" title="区域" :editor="{ component: 'input' }"></tiny-grid-column> | ||||||||||||||||||
<tiny-grid-column field="address" title="地址" :editor="{ component: 'input' }"></tiny-grid-column> | ||||||||||||||||||
<tiny-grid-column field="introduction" title="公司简介" :editor="{ component: 'input' }"></tiny-grid-column> | ||||||||||||||||||
Comment on lines
+18
to
21
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Maintain consistency in editor component declarations. While the Apply this change to maintain consistency: <tiny-grid-column field="name" title="名称" :editor="{ component: TinyInput }"></tiny-grid-column>
- <tiny-grid-column field="area" title="区域" :editor="{ component: 'input' }"></tiny-grid-column>
- <tiny-grid-column field="address" title="地址" :editor="{ component: 'input' }"></tiny-grid-column>
- <tiny-grid-column field="introduction" title="公司简介" :editor="{ component: 'input' }"></tiny-grid-column>
+ <tiny-grid-column field="area" title="区域" :editor="{ component: TinyInput }"></tiny-grid-column>
+ <tiny-grid-column field="address" title="地址" :editor="{ component: TinyInput }"></tiny-grid-column>
+ <tiny-grid-column field="introduction" title="公司简介" :editor="{ component: TinyInput }"></tiny-grid-column> 📝 Committable suggestion
Suggested change
|
||||||||||||||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ | |
<tiny-grid-toolbar :buttons="toolbarButtons" @button-click="toolbarButtonClickEvent"></tiny-grid-toolbar> | ||
</template> | ||
<tiny-grid-column type="index" width="160"></tiny-grid-column> | ||
<tiny-grid-column field="name" title="名称" width="460" :editor="{ component: Input }"></tiny-grid-column> | ||
<tiny-grid-column field="name" title="名称" width="460" :editor="{ component: TinyInput }"></tiny-grid-column> | ||
<tiny-grid-column field="area" title="区域" width="460" :editor="{ component: 'input' }"></tiny-grid-column> | ||
<tiny-grid-column field="address" title="地址" width="460" :editor="{ component: 'input' }"></tiny-grid-column> | ||
Comment on lines
+14
to
16
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Consider standardizing editor components across columns. While the Apply this pattern to other columns: - <tiny-grid-column field="area" title="区域" width="460" :editor="{ component: 'input' }"></tiny-grid-column>
- <tiny-grid-column field="address" title="地址" width="460" :editor="{ component: 'input' }"></tiny-grid-column>
- <tiny-grid-column field="introduction" title="公司简介" width="460" :editor="{ component: 'input' }"></tiny-grid-column>
+ <tiny-grid-column field="area" title="区域" width="460" :editor="{ component: TinyInput }"></tiny-grid-column>
+ <tiny-grid-column field="address" title="地址" width="460" :editor="{ component: TinyInput }"></tiny-grid-column>
+ <tiny-grid-column field="introduction" title="公司简介" width="460" :editor="{ component: TinyInput }"></tiny-grid-column>
|
||
<tiny-grid-column | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,7 +28,7 @@ test.describe('下拉表格远程搜索', () => { | |
const row2 = page.getByRole('row', { name: '省份2 城市2 区域2' }) | ||
await expect(row2).not.toBeVisible() | ||
await row1.getByRole('cell').first().click() | ||
await expect(row1).toHaveClass(/tiny-grid-body__row row__selected/) | ||
await expect(row1).toHaveClass(/tiny-grid-body__row row__radio/) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Codebase verification Inconsistent class names found in related test files The verification reveals inconsistencies in the class naming across test files:
🔗 Analysis chainLGTM! Verify similar class name changes across related tests. The class name change from Let's verify if all related test files have been updated consistently: 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Search for any remaining instances of the old class name in test files
rg -g "*.spec.ts" "row__selected"
# Search for the new class name pattern to ensure consistent usage
rg -g "*.spec.ts" "row__radio"
Length of output: 723 |
||
await expect(input).toHaveValue('省1-市1') | ||
|
||
const row3 = page.getByRole('row', { name: '省份10 城市10 区域10' }) | ||
|
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -119,7 +119,7 @@ export default { | |||
methods: { | ||||
remoteMethod(value) { | ||||
const filterData = this.filter(value) | ||||
|
||||
console.log(filterData, value) | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove console.log statement from production code. The added console.log statement appears to be for debugging purposes. Since this is a documentation demo, it should maintain clean console output for better developer experience. - console.log(filterData, value) 📝 Committable suggestion
Suggested change
|
||||
return new Promise((resolve) => { | ||||
setTimeout(() => { | ||||
resolve(filterData) | ||||
|
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.
💡 Codebase verification
Tests need to be updated to cover history functionality
The current test file
packages/vue/src/color-picker/__tests__/color-picker.spec.ts
does not include any test cases for the history feature. The tests only cover basic functionality like color selection, visibility, and v-model handling. Since the component now supports history functionality with methods likeaddHistoryColor
andpopHistoryColor
, corresponding test cases should be added.packages/vue/src/color-picker/__tests__/color-picker.spec.ts
to verify:🔗 Analysis chain
Verify e2e test coverage for the updated components.
Since this PR involves e2e test updates, ensure that the tests are updated to reflect the new component names and selectors.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
Length of output: 103
Script:
Length of output: 2983
Script:
Length of output: 2127