-
Notifications
You must be signed in to change notification settings - Fork 177
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: Optimize List View Components with Table Design and Sorting Across Project Pages #819
base: main
Are you sure you want to change the base?
Conversation
… added sorting functionality
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.
Few comments on repeated url usage, pls address those. everything else looks fine.
frontend/src/components/custom-tools/list-of-tools/ListOfTools.jsx
Outdated
Show resolved
Hide resolved
frontend/src/components/tool-settings/tool-settings/ToolSettings.jsx
Outdated
Show resolved
Hide resolved
Quality Gate passedIssues Measures |
|
function ViewTools({ | ||
isLoading, | ||
isEmpty, | ||
listOfTools, | ||
setOpenAddTool, | ||
listOfTools = [], | ||
setOpenAddTool = () => {}, | ||
handleEdit, | ||
handleDelete, | ||
titleProp, | ||
descriptionProp, | ||
iconProp, | ||
descriptionProp = "", | ||
iconProp = "", | ||
idProp, | ||
centered, | ||
centered = false, | ||
isClickable = true, | ||
handleShare, | ||
showOwner, | ||
type, | ||
handleShare = null, | ||
showOwner = false, | ||
type = "", | ||
}) { |
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.
NIT: Move props with default values to bottom for better code readability.
id: user.id, | ||
email: user.email, |
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 optional chaining got removed here?
(adapter, isEdit) => { | ||
const requestOptions = { | ||
method: "GET", | ||
url: `${adapterBaseUrl}/users/${adapter.id}/`, |
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.
Please add optional chaining where ever necessary.
); | ||
|
||
const renderDateColumn = useCallback( | ||
(text) => (text ? moment(text).format("YYYY-MM-DD HH:mm:ss") : "-"), |
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.
Can we move the data formatter to static func? Are they reuseable?
const { setPostHogCustomEvent } = usePostHogEvents(); | ||
|
||
const { setAlertDetails } = useAlertStore(); | ||
const axiosPrivate = useAxiosPrivate(); | ||
const getBaseUrl = (sessionDetails) => |
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.
getBaseUrl naming is bit miss leading since we provide more than baseUrl also can we move this function to static functions where we actually provide base url (till org Id) when we pass sessionDetails?
What
This PR optimizes and enhances the list view components across multiple pages (workflow, prompt studio, LLM, vector DB, embedding, and x2text). The improvements include transitioning to a table-based design and implementing a sorting feature.
Why
Enhancing the list view components was necessary to:
Name
,Owner By
,Created At
, andModified At
.How
Can this PR break any existing features. If yes, please list possible items. If no, please explain why. (PS: Admins do not merge the PR without this section filled)
Yes, there are some substantial refactorings of the existing components in this PR, so there is a possibility of breaking existing features.
Database Migrations
NA
Env Config
NA
Relevant Docs
NA
Related Issues or PRs
NA
Dependencies Versions
NA
Notes on Testing
NA
Screenshots
Workflow Projects Page:
Prompt Studio Projects Page:
LLM Adapters Page:
VectorDB Adapters Page:
Embedding Adapters Page:
X2Text Adapters Page:
Checklist
I have read and understood the Contribution Guidelines.