Repository navigation
[dataquery] fixes oversized table head element - #11087
marandmart wants to merge 8 commits into
Conversation
…idth and max height values of table content
|
@adamdaudrich can you take a look at this since you created the issue? |
|
LGTM |
|
Ok, I'll do a code review in the coming days! |
HenriRabalais
left a comment
There was a problem hiding this comment.
hey @marandmart! took a proper look, mostly small stuff but I'd like to sort a few things before approving:
- the
stripHTMLis going intogetDictionaryDescription, which is used in 6 places (fielddisplay, welcome, viewdata, definefields), not just the table header. so this strips html from descriptions everywhere now… is that intentional, or should it be scoped to just the header in viewdata? I could see it being an improvement across the board but wanted to check! - for the
labeltype going tostring | ReactNode… does the label actually need to be a ReactNode? could we keep it astringand handle the header sizing on thethdirectly instead of wrapping the value in a<div>? and if it does need to change,ReactNodealready includesstring, so the union can just beReactNode. - the
<style>block is injected inline in the render, and there's no css file in the dataquery module yet. could we move it into a proper.cssfile and import it at the top? (the way Filter.tsx does with Filter.css) - the
min-width: 150pxis on boththandtd, so it widens every column, not just the header, which'll add horizontal scroll on wider result sets. was that intended?
nothing major, just want to make sure we're not stripping html or forcing column widths in more places than we mean to! let me know 🙂
|
Hi @HenriRabalais!
|
|
thanks for going through all of those!
one thing i did notice though,
(4). let's drop it. I think the rest looks good to me, nice work on moving the css out into its own file 🙂 |
|
(1). I tried using a regex to strip HTML from the string, but I couldn’t come up with a reliable check for when we should fall back to the (4). removed |
There was a problem hiding this comment.
hey @marandmart! thanks for sorting the DOMParser one, that's exactly what I was after 🙂 a description with no tags never touches the parser now, so the filter loop in welcome stays cheap even on a big dictionary.
one small thing that doesn't block: label: string | ReactNode can just be ReactNode since it already includes string.
|
this conflicts with main now, could you merge main in? then it should be good to go |
|
@HenriRabalais done! |
|
hey @marandmart this conflicts with main again, could you merge main in when you have the time? |
|
@HenriRabalais fixed! I had to make a small change to the fix applied to keep inline with the updates from the conflict to DataTable.d.ts. So moved the div with the header-text class from the view-data.tsx and into the DataTable.js file itself to keep the Field type with the field.label type as string working. You can see the change by checking out the last commit |
Net change of aces/Loris PR aces#11087 at de05afc, ported onto the 29.0 DataTable.
Brief summary of changes
Testing instructions
Link to related issue