Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Refresh tab-icons when changing item's title - #397

Closed
Alhadis wants to merge 3 commits into
atom:masterfrom
Alhadis:icon-update
Closed

Alhadis wants to merge 3 commits into
atom:masterfrom
Alhadis:icon-update

Conversation

@Alhadis

@Alhadis Alhadis commented Nov 10, 2016

Copy link
Copy Markdown
Contributor

A blank editor doesn't update its tab's icon after it's been saved to disk. Meaning that the file-icon service doesn't have a chance to show anything in the tab until it's been closed and reopened.

Alhadis added 2 commits November 10, 2016 16:02
When a blank text-editor is opened, its tab-icon wouldn't update when it
was saved to a path. This commit enables file-icon providers to keep tab
icons updated in such cases.
Comment thread spec/tabs-spec.coffee
runs ->
expect($(tabBar).find('.tab:eq(1) .title')).toHaveClass "status-modified"

describe "File-icons service", ->

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

In other packages this has been added as a standalone spec file file-icons-spec.coffee.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Bring it up with @as-cii, because he was the one who told me last time that file-icons-spec was for testing the activation and lifecycle of the service, rather than its visible effect.

I originally thought to add it there, but then I remembered the frustration of moving the specs into the tree-view package's main spec-file, and decided I'd spare myself a similar ordeal.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

He knows better than I do :)

@Alhadis Alhadis Nov 10, 2016 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Hence why I'm relying on precedent scenarios. =)

I'm hoping atom/tree-view#966 gets reviewed sooner, though. The hacks I'm currently writing to monkey-patch the tree-view's file-moving routine are nauseating.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Jesus... even with monkey-patching, this is impossible to work around. :S

I regret not making this the first PR...

@Alhadis

Alhadis commented Dec 18, 2016

Copy link
Copy Markdown
Contributor Author

Fixed in #402.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants