Skip to content

Conversation

@AiYuZhen
Copy link
Collaborator

@AiYuZhen AiYuZhen commented Dec 24, 2024

feat(TableFilter)修复 TableFilter 属性 LookupServiceKey 赋值为字符串 Column.LookupServiceKey 问题

Summary of the changes (Less than 80 chars)

简单描述你更改了什么, 不超过80个字符;如果有关联 Issue 请在下方填写相关编号
修复 TableFilter 组件中的子组件 LookupFilter 的属性 LookupServiceKey 赋值为字符串 "Column.LookupServiceKey" 问题。

Description

fixes #4938

Regression?

  • Yes
  • No

[If yes, specify the version the behavior has regressed from]

[是否影响老版本]

Risk

  • High
  • Medium
  • Low

[Justify the selection above]

Verification

  • Manual (required)
  • Automated

Packaging changes reviewed?

  • Yes
  • No
  • N/A

☑️ Self Check before Merge

⚠️ Please check all items below before review. ⚠️

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • Merge the latest code from the main branch

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Dec 24, 2024

Reviewer's Guide by Sourcery

This PR fixes a bug in the TableFilter component where the LookupServiceKey property of the LookupFilter subcomponent was being assigned the string literal "Column.LookupServiceKey" instead of the actual value of the Column.LookupServiceKey property.

Sequence diagram showing the fixed LookupFilter property binding

sequenceDiagram
    participant TF as TableFilter
    participant LF as LookupFilter
    participant Col as Column
    TF->>Col: Check IsLookup()
    alt IsLookup() is true
        TF->>Col: Get LookupServiceKey
        Col-->>TF: Return actual key value
        TF->>LF: Create with correct LookupServiceKey
    end
Loading

Class diagram showing the relationship between TableFilter and LookupFilter

classDiagram
    class TableFilter {
        +Column: ITableColumn
        +Render()
    }
    class LookupFilter {
        +Lookup: object
        +LookupService: object
        +LookupServiceKey: string
        +LookupServiceData: object
        +LookupStringComparison: StringComparison
        +Type: Type
        +IsShowSearch: bool
    }
    class Column {
        +LookupServiceKey: string
        +IsLookup(): bool
    }
    TableFilter --> LookupFilter: creates
    TableFilter --> Column: uses
    note for LookupFilter "Fixed: Now correctly receives Column.LookupServiceKey value"
Loading

File-Level Changes

Change Details Files
Fixed the incorrect assignment of the LookupServiceKey property.
  • Changed the LookupServiceKey property assignment in the LookupFilter component from a string literal to use the actual value of the Column.LookupServiceKey property by adding the @ symbol. This ensures that the correct key is used when interacting with the lookup service and fixes the reported issue #BugNumber
src/BootstrapBlazor/Components/Filters/TableFilter.razor

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time. You can also use
    this command to specify where the summary should be inserted.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@bb-auto
Copy link

bb-auto bot commented Dec 24, 2024

Thanks for your PR, @AiYuZhen. Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

@bb-auto bb-auto bot requested a review from ArgoZhang December 24, 2024 02:16
sourcery-ai[bot]
sourcery-ai bot previously approved these changes Dec 24, 2024
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @AiYuZhen - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@codecov
Copy link

codecov bot commented Dec 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.99%. Comparing base (a1e4a1a) to head (d766f62).
Report is 2 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##              main    #4932      +/-   ##
===========================================
- Coverage   100.00%   99.99%   -0.01%     
===========================================
  Files          628      628              
  Lines        28078    28086       +8     
  Branches      4043     4043              
===========================================
+ Hits         28078    28085       +7     
- Misses           0        1       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

ArgoZhang
ArgoZhang previously approved these changes Dec 24, 2024
Co-Authored-By: AiZhen <[email protected]>
Co-Authored-By: Chason <[email protected]>
@ArgoZhang ArgoZhang changed the title feat(TableFilter)修复 TableFilter 属性 LookupServiceKey 赋值为字符串 Column.LookupServiceKey 问题。 feat(TableFilter): add @ keyword Dec 24, 2024
@ArgoZhang ArgoZhang dismissed stale reviews from sourcery-ai[bot] and themself via d766f62 December 24, 2024 03:18
@ArgoZhang ArgoZhang enabled auto-merge (squash) December 24, 2024 03:20
@ArgoZhang ArgoZhang disabled auto-merge December 24, 2024 03:48
@ArgoZhang ArgoZhang merged commit 4059dc2 into dotnetcore:main Dec 24, 2024
4 of 5 checks passed
@AiYuZhen
Copy link
Collaborator Author

@microsoft-github-policy-service agree

@bb-auto bb-auto bot added the chore This are tasks or bot action label Dec 24, 2024
@bb-auto bb-auto bot added this to the v9.0.0 milestone Dec 24, 2024
@AiYuZhen AiYuZhen deleted the Feat_Table branch December 30, 2024 13:55
@AiYuZhen AiYuZhen restored the Feat_Table branch December 30, 2024 13:55
@AiYuZhen AiYuZhen deleted the Feat_Table branch December 30, 2024 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore This are tasks or bot action

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor(TableFilter): missing @ keyword

2 participants