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 active cell update on tabbing #18614

Merged
merged 25 commits into from
Apr 8, 2022
Merged

Conversation

MaddyDev
Copy link
Contributor

@MaddyDev MaddyDev commented Mar 2, 2022

This PR addresses part of the issue #18274, it only fixes the tabbing forward scenario.

tabbingInCell

@MaddyDev MaddyDev requested a review from a team March 2, 2022 22:50
@coveralls
Copy link

coveralls commented Mar 2, 2022

Pull Request Test Coverage Report for Build 2116775063

  • 12 of 18 (66.67%) changed or added relevant lines in 5 files are covered.
  • 119 unchanged lines in 3 files lost coverage.
  • Overall coverage decreased (-0.02%) to 42.334%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/sql/workbench/contrib/notebook/browser/cellViews/collapse.component.ts 0 1 0.0%
src/sql/workbench/contrib/notebook/browser/notebook.component.ts 0 2 0.0%
src/sql/workbench/contrib/notebook/browser/cellViews/code.component.ts 0 3 0.0%
Files with Coverage Reduction New Missed Lines %
src/sql/workbench/contrib/notebook/browser/cellViews/code.component.ts 1 3.6%
extensions/sql-bindings/src/common/utils.ts 29 27.72%
extensions/sql-bindings/src/services/azureFunctionsService.ts 89 6.56%
Totals Coverage Status
Change from base Build 2112186448: -0.02%
Covered Lines: 27580
Relevant Lines: 60902

💛 - Coveralls

Copy link
Contributor

@Charles-Gagnon Charles-Gagnon left a comment

Choose a reason for hiding this comment

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

Did you make sure to test tabbing backwards as well?

@MaddyDev
Copy link
Contributor Author

MaddyDev commented Mar 3, 2022

Did you make sure to test tabbing backwards as well?

It is still wonky when tabbing backwards. It doesn't toggle backward across all the elements like it does forward, it just loops between first two elements backward. Still looking into that.

Copy link
Contributor

@Charles-Gagnon Charles-Gagnon left a comment

Choose a reason for hiding this comment

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

Please update the gif in the description with the latest changes. (make sure to include tabbing forward and backwards)

@@ -116,6 +117,11 @@ export class CellModel extends Disposable implements ICellModel {
}
// if the fromJson() method was already called and _cellGuid was previously set, don't generate another UUID unnecessarily
this._cellGuid = this._cellGuid || generateUuid();
if (this._cellType === 'code') {
this.cellLabel = localize('codeCellLabel', "Code Cell {0}", this.id);
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think ID is appropriate here since that's just a random number. Generally for lists of objects like this you would announce the index and then the label (which would just be "Code Cell" or "Markdown Cell"). But getting this working correctly is likely out of scope for this PR so I guess this is fine - just putting this here for future reference.

Although for code cells we should probably be saying the language as well.

@barbaravaldez
Copy link
Contributor

barbaravaldez commented Mar 31, 2022

Tested and looks good! I found an issue when entering a code cell editor, the cell's edit mode is not changed unless I tab again and the contents are modified.

Also, the changes in this pr fixes this issue as well #18504

@MaddyDev
Copy link
Contributor Author

@barbaravaldez Could you log an issue for the code cell issue you mentioned, looks like it's a different issue than what am addressing here. Also can you check if it's regression ? Thanks!!

@Charles-Gagnon
Copy link
Contributor

If it's not a regression (it's an issue with this PR) then I don't think a separate issue is necessary. That should be fixed before this goes in.

@barbaravaldez
Copy link
Contributor

@barbaravaldez Could you log an issue for the code cell issue you mentioned, looks like it's a different issue than what am addressing here. Also can you check if it's regression ? Thanks!!

@MaddyDev this is not a regression because we didn't change the cell edit mode when tabbing before

@MaddyDev
Copy link
Contributor Author

@barbaravaldez Could you log an issue for the code cell issue you mentioned, looks like it's a different issue than what am addressing here. Also can you check if it's regression ? Thanks!!

@MaddyDev this is not a regression because we didn't change the cell edit mode when tabbing before

But am not doing anything with the edit mode here, am just setting the cell as active on focus. Can you explain me more whats the expected experience and what's the regression you're seeing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants