-
Notifications
You must be signed in to change notification settings - Fork 26
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
feat(a11y-table): Define a standalone table component #1634
base: master
Are you sure you want to change the base?
Conversation
596aec9
to
972eb6a
Compare
canvastablecontainer { | ||
opacity: 0; | ||
} | ||
|
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.
Would be better to instead get rid of anything canvas related in the code.
src/app/app.component.scss
Outdated
@@ -68,3 +72,10 @@ | |||
width: 150px; | |||
} | |||
|
|||
.text-primary { | |||
color: #01579b; |
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.
Move to a css property
return Array.from(this.selectedRows).map(x => x.id); | ||
} | ||
|
||
updateRows() { |
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.
This is where I normalize the sync messages and non-sync messages. It's a mess but the simplest I could thing of
src/app/app.component.ts
Outdated
this.rows = (() => { | ||
if (!this.canvastable?.rows?.rows?.length) return [] | ||
|
||
if (Array.isArray(this.canvastable.rows.rows[0])) |
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.
This is for when the rows are the arrays where the first item is the messageid.
Initial thoughts
|
async enrichRows() { | ||
const { start, end } = this.renderedRange | ||
|
||
this.rows = await Promise.all(mapOverIndexes(async (value) => { |
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.
This might cause a race condition. When renderedRange changes twice; it might happen that the first range change resolves later than the second range change.
- Find a way to merge resolved arrays in a way that will keep the latest and not overwrite fetched rows
Add table to the app component.
This removes the error where it complains about a property change after render.
- Setup a sane default for column widths. - Convert absolute columns widths to relative ones. https://codepen.io/Neizan/pen/ExajoJe
7c02014
to
62b6d40
Compare
Add table to the app component.
Use j and k to scroll up and down in messages.Dropped the support for j and k scroll.