This repository has been archived by the owner on Nov 28, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
closes TryGhost/Ghost#8540 - use `{{vertical-collection}}` in the tags dropdown filter list, opening the dropdown is now virtually instant as it's not attempting to immediately render components for every tag in the list - remove pagination/infinite scroll from tags screen - load all tags when accessing the tags screen - will pause to show spinner if no tags have previously been loaded - if tags exist in the ember data store, show the list immediately and load/update list in the background - use `{{vertical-collection}}` to render enough tags to fill the scrollable area with a small buffer and use occlusion and element re-use to swap tags in whilst scrolling (suuuuper fast no matter number of tags loaded) - scroll tags into view when they are selected (keyboard nav now makes a lot more sense) - tested with 875 tags and 2x/5x CPU throttling with no major slowdowns 🎉
- Loading branch information
1 parent
016d3f8
commit e7b378e
Showing
13 changed files
with
231 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,5 @@ | ||
import Component from 'ember-component'; | ||
import injectService from 'ember-service/inject'; | ||
import {invokeAction} from 'ember-invoke-action'; | ||
|
||
export default Component.extend({ | ||
feature: injectService(), | ||
|
||
willDestroyElement() { | ||
this._super(...arguments); | ||
|
||
if (this.get('tag.isDeleted') && this.get('onDelete')) { | ||
invokeAction(this, 'onDelete'); | ||
} | ||
} | ||
tagName: '' | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import OptionsComponent from 'ember-power-select/components/power-select/options'; | ||
import layout from '../templates/components/power-select-vertical-collection-options'; | ||
|
||
export default OptionsComponent.extend({ | ||
layout | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
app/templates/components/power-select-vertical-collection-options.hbs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{{#if select.loading}} | ||
{{#if loadingMessage}} | ||
<li class="ember-power-select-option ember-power-select-option--loading-message" role="option">{{loadingMessage}}</li> | ||
{{/if}} | ||
{{/if}} | ||
|
||
{{#vertical-collection options minHeight=30 staticHeight=true bufferSize=5 as |opt index|}} | ||
<li class="ember-power-select-option" | ||
aria-selected="{{ember-power-select-is-selected opt select.selected}}" | ||
aria-disabled={{ember-power-select-true-string-if-present opt.disabled}} | ||
aria-current="{{eq opt select.highlighted}}" | ||
data-option-index="{{groupIndex}}{{index}}" | ||
role="option"> | ||
{{yield opt select}} | ||
</li> | ||
{{/vertical-collection}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.