-
-
Notifications
You must be signed in to change notification settings - Fork 131
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
[FEATURE occlusion]: Preliminary Vertical collection integration #483
[FEATURE occlusion]: Preliminary Vertical collection integration #483
Conversation
So we don't have to handle resize events for now
This is an amazing start @alexander-alvarez. Thanks for putting in the time to make this happen! Im super excited for the next iterations 😄 |
Will this fix what I attempted to in #298? |
@mkay581 quite possibly, as the implementation will likely have to inspect the DOM like you do in your PR |
woopss.. fat finger.. |
thanks @KeithClinard will take a look |
I just managed to get this to render properly. I was able to get it to work by tweaking the vertical-collection {
display: table;
table-layout: fixed;
}
vertical-collection occluded-content:first-of-type {
display: table-caption;
} There is likely a cleaner way to write the css, but I thought I would give you what I have. |
@KeithClinard thanks for the investigation and the fix, I've incorporated your changes. Check them out. As to:
I think you have to style the height of the header row appropriately so it doesn't scroll (padding & border widths included), but I could be wrong and there could be a way to have this not be a requirement. |
I finally got around to try this out. First of all: absolutely amazing work! Thank you so much. 🎉 ❤️ I dropped this into a rather complex table that has to display up to 500 rows simultaneously. Previously we incrementally pushed rows into the table to not freeze the main UI thread. I can confirm that I can now just throw in all 500 rows at once and it just works. I haven't yet discovered any styling issues. Functionality-wise I only discovered that I'll give this further test drives in the coming days and check back in. But so far, I can't 👍 this enough! |
I found a minor issue, but I suspect that it's an issue in
// assets/addon-tree-output/modules/vertical-collection/-private.js
ScrollHandler.prototype.removeScrollHandler = function removeScrollHandler(element, handler) {
var index = this.elements.indexOf(element);
var elementCache = this.handlers[index];
// TODO add explicit test
if (elementCache && elementCache.handlers) {
var _index = elementCache.handlers.indexOf(handler);
if (_index === -1) {
throw new Error('Attempted to remove an unknown handler');
}
elementCache.handlers.splice(_index, 1);
// cleanup element entirely if needed
// TODO add explicit test
if (!elementCache.handlers.length) {
_index = this.elements.indexOf(element);
this.handlers.splice(_index, 1);
this.elements.splice(_index, 1);
this.length--;
this.maxLength--;
if (this.length === 0) {
this.isPolling = false;
}
// TODO add explicit test
if (this.isUsingPassive) {
element.removeEventListener('scroll', elementCache.passiveHandler, { capture: true, passive: true });
}
}
} else {
throw new Error('Attempted to remove a handler from an unknown element or an element with no handlers');
}
}; |
package.json
Outdated
"ember-wormhole": "^0.5.1" | ||
}, | ||
"devDependencies": { | ||
"@html-next/vertical-collection": "^1.0.0-beta.8", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this intentionally only a devDependency
, because not every user will want to try occlusion rendering just yet?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this was a blunder on my part... will update when I update to beta.9
@buschtoens sounds related to html-next/vertical-collection#140 |
Status update... generally well received & thanks to help from @KeithClinard we've gotten to a pretty good place... I'm waiting for a |
Fix alignment issue of header not respecting the padding of it's container
4a7e836
to
374f62b
Compare
https://github.com/html-next/vertical-collection/releases/tag/v1.0.0-beta.9 was just released, so I updated this branch to reflect the API changes. we may explore moving the vertical collection into Please take a look |
I'm super happy with this PR and would love, if we'd merge it. Since it's behind a flag, we can change some finer details later. 😄 If you're okay with it, I'd merge and release, so I can properly test drive it in my apps. 😁 🚀 |
The green button is 👇 😃 |
thanks for all the work @alexander-alvarez! (and reviewers like @buschtoens ). :) can someone merge this please? I would like to test this in our application that has numerous large tables. |
Released as |
WHY
#12 #435
Especially #12 (comment)
WHAT
This PR introduces experimental integration with https://github.com/html-next/vertical-collection, as it is nearing a
1.0
in terms of stability. By setting theocclusion=true
flag and setting a value forestimatedRowHeight
, we deactivateember-scrollable
and usevertical-collection
instead.There is a new section in the cookbook
cookbook/occlusion-rendering
where an example is liveSome compromises with respect to functionality are made with this initial release so that it can get into people's hands and begin testing and playing with it. These are listed below:
CAVEATS (To be turned into issues)
scrollBuffer
property in ELT & vertical collectionvertical collection
orvertical collection
intoember scrollable