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(sheets): correct unitId and subUnitId usage in SetStyleCommand #3586

Merged
merged 4 commits into from
Oct 11, 2024

Conversation

hexf00
Copy link
Member

@hexf00 hexf00 commented Sep 25, 2024

close #3502

const sheet1 = univerAPI.getActiveWorkbook().insertSheet();
const sheet2 = univerAPI.getActiveWorkbook().insertSheet();

const marks = [
  {
    id: sheet1.getSheetId(),
    row: 0,
    col: 0,
  },
  {
    id: sheet2.getSheetId(),
    row: 1,
    col: 1,
  },
];

marks.forEach((m) => {
  console.log(m);
  if (m.id === sheet1.getSheetId()) {
    univerAPI
      .getActiveWorkbook()
      ?.getSheetBySheetId(m.id)
      ?.getRange(m.row, m.col, 1, 1)
      .setBackgroundColor('red');
  }

  if (m.id === sheet2.getSheetId()) {
    univerAPI
      .getActiveWorkbook()
      ?.getSheetBySheetId(m.id)
      ?.getRange(m.row, m.col, 1, 1)
      .setBackgroundColor('green');
  }
});

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 25, 2024

View Deployment

📑 Examples 📚 Storybook
🔗 Preview link 🔗 Preview link

@hexf00 hexf00 marked this pull request as ready for review September 25, 2024 14:06
@univer-bot univer-bot bot added the qa:untested This PR is ready to be tested label Sep 25, 2024
Copy link

github-actions bot commented Sep 25, 2024

Playwright test results

passed  16 passed

Details

stats  16 tests across 8 suites
duration  3 minutes, 60 seconds
commit  ed197c7
info  For more information, see full report

Copy link

codecov bot commented Sep 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 31.26%. Comparing base (1964a4c) to head (ed197c7).
Report is 67 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #3586      +/-   ##
==========================================
- Coverage   31.87%   31.26%   -0.61%     
==========================================
  Files        2193     2263      +70     
  Lines      115294   117388    +2094     
  Branches    25402    25842     +440     
==========================================
- Hits        36745    36706      -39     
- Misses      78549    80682    +2133     
Flag Coverage Δ
?

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@oumomomo oumomomo added the qa:verified This PR has already by verified by a QA and is considered good enough to be merge label Sep 26, 2024
@univer-bot univer-bot bot removed the qa:untested This PR is ready to be tested label Sep 26, 2024
@hexf00 hexf00 requested a review from wzhudev September 28, 2024 03:41
Copy link
Member

@wzhudev wzhudev left a comment

Choose a reason for hiding this comment

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

Some subtle changes are required to make the code more comprehensible.

@hexf00 hexf00 merged commit b03711d into dev Oct 11, 2024
9 checks passed
@hexf00 hexf00 deleted the fix/fix-set-style branch October 11, 2024 14:00
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
3 participants