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

Avoid loading and twisty codicons set at the same time #95915

Merged
merged 2 commits into from Nov 6, 2020

Conversation

aeschli
Copy link
Contributor

@aeschli aeschli commented Apr 22, 2020

The reason for #95878 was that the loading codicon class name is set together with the twisty codicon class name.

That works as long as the CSS for the loading codicon is defined after the twisty CSS.

We want to avoid to depend on the CSS definition order. Instead, the PR nakes sure that only one icon class name is set at a time.

The fix changes the ITreeRenderer.renderTwistie API by adding a boolean return type.

renderTwistie returns true when renderTwistie has rendered a twisty, or false if not.

The tree will only draw the regular twisty if renderTwistie has not already done so.

Alternative would be to change the API to:
getTwistie?(element: T): Codicon | undefined;

@aeschli aeschli requested a review from joaomoreno April 22, 2020 19:49
@aeschli aeschli self-assigned this Apr 22, 2020
@aeschli aeschli added this to the April 2020 milestone Apr 22, 2020
@aeschli aeschli changed the title Avoid loading and twisty set at the same time Avoid loading and twisty codicons set at the same time Apr 22, 2020
@joaomoreno
Copy link
Member

I know this is ugly, but since loading should always have priority... couldn't we instead just use !important in its CSS?

@aeschli aeschli modified the milestones: April 2020, May 2020 May 4, 2020
@aeschli aeschli modified the milestones: May 2020, June 2020 Jun 16, 2020
@kieferrm kieferrm modified the milestones: June 2020, July 2020 Jul 6, 2020
@joaomoreno joaomoreno modified the milestones: July 2020, August 2020 Aug 3, 2020
@aeschli aeschli modified the milestones: August 2020, September 2020 Aug 31, 2020
@bpasero bpasero modified the milestones: September 2020, October 2020 Oct 6, 2020
@bpasero
Copy link
Member

bpasero commented Oct 6, 2020

@aeschli @joaomoreno snow-plow alarm

@joaomoreno joaomoreno self-assigned this Oct 6, 2020
@aeschli aeschli modified the milestones: October 2020, November 2020 Oct 30, 2020
@joaomoreno
Copy link
Member

Thanks @aeschli !

@joaomoreno joaomoreno merged commit d03925a into master Nov 6, 2020
@joaomoreno joaomoreno deleted the aeschli/treeloadingtwistie branch November 6, 2020 10:51
@github-actions github-actions bot locked and limited conversation to collaborators Dec 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants