-
Notifications
You must be signed in to change notification settings - Fork 4
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
[DCJ-741] refactor dataset table into two dataset and studies table #2691
Conversation
@@ -104,7 +104,7 @@ const DataRows = ({rowData, baseStyle, columnHeaders, rowWrapper = ({renderedRow | |||
let output; | |||
//columnHeaders determine width of the columns, | |||
//therefore extract width from columnHeader and apply to cell style | |||
const columnWidthStyle = columnHeaders[cellIndex].cellStyle; | |||
const columnWidthStyle = { width: columnHeaders[cellIndex].cellStyle.width }; |
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 didn't know where to check where this was used - but I was noticing we said we were extracting just the width, but actually pulling everything. I figured this would be cleaner.
history.push(`/dar_application/${darDraft.referenceId}`); | ||
}; | ||
|
||
const clearSearchRef = () => { | ||
searchRef.current.value = ''; | ||
filterHandler(null, datasets, '', ''); | ||
}; | ||
|
||
const openTranslatedDUL = (dataUse) => { |
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 was unused in the new version - I figure we can add it back if need be. Not sure because I didn't see dataUse in the mocks: https://www.figma.com/design/MkffpVbUdP4lWvkN9OWiro/Data-Library?node-id=23-43&node-type=frame
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.
Agreed - I'm usually in favor of aggressive pruning, it's easy enough to re-add. Especially for anything related to data use translations, we have some very inefficient code related to that functionality. If we do need it, we need to re-evaluate how we do it.
@@ -463,14 +248,6 @@ export const DatasetSearchTable = (props) => { | |||
} | |||
</Box> | |||
</Box> | |||
{ | |||
showTranslatedDULModal && | |||
<TranslatedDulModal |
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.
why did this go away?
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.
It wasn't used - I don't know if the new mocks have it or not, but I figure we can always readd it if need be
updateUser: UserTerm; | ||
dac: DacTerm; | ||
} | ||
|
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'd love to hear more about the design of your approach. I'm wondering about the distinctions between this file and the constants file. Additionally, I'm wondering about the abstraction to the Display file.
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.
overall, this looks great and the video looks good, just looking for a bit more info for my understanding!
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.
@rjohanek great question! The goal was to break up and separate concerns. Previously, the DatasetSearchTable
handled a lot - I wanted to reduce what it handled. The first abstraction was to pull out the table. Eventually I thought pulling out the constants would be nice as well, so DatasetSearchTableDisplay
just handled the rendering of the table, and DatasetSearchTableConstants
handled the constant values describing the rendering.
model.ts
is specifically the type definitions of the API responses, and doesn't include any scope beyond that.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Got it. I'll merge it in! |
Screen.Recording.2024-10-18.at.2.08.46.PM.mov |
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.
There are some really nice UX improvements here. We need to circle back and figure out where the export to TDR functionality fits now - I don't think it's in the mocks, but it is in the original version of the data library. I'm open to re-implementation in a different way if we can make that a priority.
history.push(`/dar_application/${darDraft.referenceId}`); | ||
}; | ||
|
||
const clearSearchRef = () => { | ||
searchRef.current.value = ''; | ||
filterHandler(null, datasets, '', ''); | ||
}; | ||
|
||
const openTranslatedDUL = (dataUse) => { |
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.
Agreed - I'm usually in favor of aggressive pruning, it's easy enough to re-add. Especially for anything related to data use translations, we have some very inefficient code related to that functionality. If we do need it, we need to re-evaluate how we do it.
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.
After all the improvements this looks great! Thank you 👍
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.
looks good! thanks for the changes and explanations
Addresses
Summary
Screen.Recording.2024-10-16.at.4.15.47.PM.mov
Have you read Terra's Contributing Guide lately? If not, do that first.