-
Notifications
You must be signed in to change notification settings - Fork 233
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
fix: fixed testset columns naming conventions #1743
fix: fixed testset columns naming conventions #1743
Conversation
@ashrafchowdury is attempting to deploy a commit to the mmabrouk's projects Team on Vercel. A member of the Team first needs to authorize 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.
Thanks @ashrafchowdury
The goal of the issue is not to set everything to lower case but just keep it as is
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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 don't understand the changes that you have made and why you have made them..
The way I would tackle this is the following: Somewhere in the code we are transforming the input made by the user and uppercasing the first letter (unless this is the default behavior in ant.design which is very likely), you need to find that part and remove it. That's it.
The primary issue is with the To fix this issue, I am using the column names that are coming from the database, rather than the names provided by the library. Code Changes:
|
The code is fine, the uppercase formatting is a characteristic of the
|
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.
Thank you for the PR @ashrafchowdury
Following the Docs, in order to fix the naming convention you just need to set the headerName
prop in the columnDefs object
For instance
const newColDefs = [
CHECKBOX_COL,
...colData.map((col) => ({
...col,
headerName: col.field,
})),
ADD_BUTTON_COL,
]
setColumnDefs(newColDefs)
You need to do this when we apply the columns, update the table and add new columns
Awesome work @ashrafchowdury however we also need to do the same when we add a new column |
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.
Great work @ashrafchowdury
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.
Thanks @ashrafchowdury
For some reason the behavior is weird. If you use an upper case column name, it would be transformed to lower case, then if you try to edit it, it would be shown as upper case. I think we need to be consistent here. Either, we show exactly what the user has provided (upper case or lower case), or we transform everything to lowercase and show it as such.
CleanShot.2024-06-03.at.14.38.08.mp4
Second problem is that each time you make a modification to the test set and save, you create a new test set it appears! @bekossy can you please look into this. I did not see this issue in cloud but I am seeing it in the Vercel preview here, is this a new issue introduced by this PR?
@mmabrouk I don’t think the Vercel Preview is showing the latest changes in the PR as it was last deployed 17 hours ago Screen.Recording.2024-06-03.at.1.55.28.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.
Thanks @bekossy
I deployed now the latest version. The issue now is that you cannot rename a column named 'correct_answer' to 'Correct_answer' although these are two different column names (since we now differ from lower case and upper case)
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.
Thanks @ashrafchowdury and @bekossy ! Great work!
@all-contributors please add @ashrafchowdury for bug fix and code |
I've put up a pull request to add @ashrafchowdury! 🎉 |
Description
Fixed the test set colums naming conventions by making it lowercase.
Screenshot
Issue
Closes #1737