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

fix(sheet): merge cell custom property #3365

Merged
merged 2 commits into from
Sep 9, 2024
Merged

fix(sheet): merge cell custom property #3365

merged 2 commits into from
Sep 9, 2024

Conversation

Dushusir
Copy link
Member

@Dushusir Dushusir commented Sep 7, 2024

close #3346

What has changed?

cell.custom used to overwrite the entire thing, causing the original custom to be lost. Now it has been fixed to be similar to cell style, and needs to be merged when updating cell.custom (one-layer merge)

How to test?

  1. Set new custom data to A1 univerAPI.getActiveWorkbook().getActiveSheet().getRange(0,0,1,1).setValue({custom:{a:1}})
  2. Check cell data univer._univerInstanceService.getFocusedUnit()._snapshot
  3. Add more custom data to A1 univerAPI.getActiveWorkbook().getActiveSheet().getRange(0,0,1,1).setValue({custom:{b:1}})
  4. Check cell data
    image

Pull Request Checklist

  • Related tickets or issues have been linked in the PR description (or missing issue).
  • Naming convention is followed (do please check it especially when you created new plugins, commands and resources).
  • Unit tests have been added for the changes (if applicable).
  • Breaking changes have been documented (or no breaking changes introduced in this PR).

Copy link

github-actions bot commented Sep 7, 2024

View Deployment

📑 Examples 📚 Storybook
🔗 Preview link 🔗 Preview link

Copy link

codecov bot commented Sep 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 30.21%. Comparing base (56a27a7) to head (cb6b6d0).
Report is 2 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #3365      +/-   ##
==========================================
+ Coverage   30.20%   30.21%   +0.01%     
==========================================
  Files        2109     2110       +1     
  Lines      110029   110047      +18     
  Branches    23922    23930       +8     
==========================================
+ Hits        33233    33251      +18     
  Misses      76796    76796              

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

@Dushusir Dushusir marked this pull request as ready for review September 7, 2024 07:54
@univer-bot univer-bot bot added the qa:untested This PR is ready to be tested label Sep 7, 2024
@zhaolixin7 zhaolixin7 added the qa:verified This PR has already by verified by a QA and is considered good enough to be merge label Sep 7, 2024
@univer-bot univer-bot bot removed the qa:untested This PR is ready to be tested label Sep 7, 2024
@Dushusir Dushusir requested a review from weird94 September 7, 2024 10:35
@Dushusir Dushusir force-pushed the dushusir/custom-field branch from f22d73a to cb6b6d0 Compare September 9, 2024 12:00
@Dushusir Dushusir merged commit 880ef44 into dev Sep 9, 2024
9 checks passed
@Dushusir Dushusir deleted the dushusir/custom-field branch September 9, 2024 12:28
@hexf00
Copy link
Member

hexf00 commented Sep 13, 2024

reverted in #3431

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
qa:verified This PR has already by verified by a QA and is considered good enough to be merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] [data-validation] When changing cell values ​​through drop-down, cell custom fields are overwritten
3 participants