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: work on calling icon hooks #7100

Merged
merged 3 commits into from
May 19, 2023

Conversation

BeksOmega
Copy link
Collaborator

The basics

  • I branched from develop
  • My pull request is against develop
  • My code follows the style guide
  • I ran npm run format and npm run lint

The details

Resolves

Fixes #7098

Proposed Changes

Adds correctly calling the new icon hooks in a bunch of places.

Reason for Changes

Actually get the code to work for testing refactoring icons.

Test Coverage

Enabling tests yay!

Documentation

N/A

Additional Information

Two of the initView tests are still skipped because I need to fix #7099 first.

@BeksOmega BeksOmega requested a review from a team as a code owner May 18, 2023 22:43
@BeksOmega BeksOmega requested a review from maribethb May 18, 2023 22:43
@github-actions github-actions bot added the PR: fix Fixes a bug label May 18, 2023
@BeksOmega BeksOmega mentioned this pull request May 18, 2023
4 tasks
core/icons/icon.ts Outdated Show resolved Hide resolved
core/render_management.ts Outdated Show resolved Hide resolved
@@ -321,7 +328,13 @@ export class Drawer {
if (this.info_.isInsertionMarker) {
// Fields and icons are invisible on insertion marker. They still have to
// be rendered so that the block can be sized correctly.
svgGroup.setAttribute('display', 'none');
if (isIcon((fieldInfo as Icon).icon)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

😵‍💫

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Haha I'll do another look at cleaning this up, but I think this method just needs to be split into some submethods

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm assuming that when you remove handling the old types some of these if statements will go away (though maybe not here since you didn't leave the comment about removing it?) so I tried not to comment on that aspect of them, but this one got me lol. I don't think you really need to change anything here unless you think it's actually possible to improve htis. but don't bother if it will be removed in 7042

@BeksOmega BeksOmega merged commit 4dc2869 into google:develop May 19, 2023
@BeksOmega BeksOmega deleted the feat/call-icon-hooks branch May 14, 2024 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: fix Fixes a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Modify gesture system to handle icon clicks Call new icon hooks in block rendering code
2 participants