app-generator / django-dynamic-datatb

Django Dynamic Datatables - Open-Source Library | AppSeed
https://pypi.org/project/django-dynamic-datatb/
MIT License
43 stars 19 forks source link

Custom DataTable #8

Closed IHesamI closed 1 year ago

IHesamI commented 1 year ago

I think it is better to have a custom data table and not use bootstrap or simple-datatables So, I implemented an initial table if you like it, inform me to complete it.

app-generator commented 1 year ago

hello @IHesamI a custom table is a great idea. the goal is to refactor the layout to make it plain vanilla usable in many contexts (BS4, BS5, tailwind)

Please proceed with this. Ty!

app-generator commented 1 year ago

P.S. just release the latest changes. here is the UI:

image

IHesamI commented 1 year ago

I have not removed the previous Data Table now it should be Ok.

app-generator commented 1 year ago

Hello @IHesamI Ty for your work.

Here is an issue visible in the latest version:

When the model contains more than 1 field, the popup always shows only ID + name, which seems hard coded.

Please take a look. Ty!


My current model is this:

class Product(models.Model):
    id     = models.AutoField(primary_key=True)
    info3  = models.CharField(max_length = 100, default = '')
    info4  = models.CharField(max_length = 100, default = '')

The UI -> OK

image


The Add Item Popup -> NOT Ok

Please note that the popup doesn't have any "NAME" field.

image

IHesamI commented 1 year ago

Oh, I will fix that. Ty for your response.

app-generator commented 1 year ago

Guys, I know that this task is pure hell, but .. somehow, we need to fix it and move forward. I will actively involve in the code, so if someone hits a dead end, just ask for help. Until the task ends, we are a team. 🚀🚀

IHesamI commented 1 year ago

I think the problem is solved

Hello @IHesamI Ty for your work.

Here is an issue visible in the latest version:

When the model contains more than 1 field, the popup always shows only ID + name, which seems hard coded.

Please take a look. Ty!

My current model is this:

class Product(models.Model):
    id     = models.AutoField(primary_key=True)
    info3  = models.CharField(max_length = 100, default = '')
    info4  = models.CharField(max_length = 100, default = '')

The UI -> OK

image

The Add Item Popup -> NOT Ok

Please note that the popup doesn't have any "NAME" field.

image

app-generator commented 1 year ago

Hello @IHesamI

Ty for the latest fixes.

We are getting closer. Please update, I did some small changes to align edit icons to the right. A minor issue is the alignment of export icons that look pulled to the left (not centered).

Please take a look. Ty!

image

IHesamI commented 1 year ago

I've added a few styles to fixed alignment. And when I test new Data Table with more than one Table in a page it does not work properly, I fixed it but please you test it if there is any issue left.

app-generator commented 1 year ago

Hello @IHesamI I will test and get back. ty!

IHesamI commented 1 year ago

I added more styles and fixed some bugs.

app-generator commented 1 year ago

Ty @IHesamI Let me test it ..

app-generator commented 1 year ago

Hello @IHesamI Looks good.

Can you confirm that server-side pagination is still there? Changing the page is suspectly fast.

Ty!

IHesamI commented 1 year ago

Sure, this is the method which handles the pagination Capture I think It is fast because nothing complex happened here. You can also check the server logs.

app-generator commented 1 year ago

Perfect. Ty @IHesamI

IHesamI commented 1 year ago

Hello @app-generator I created a fork of the project to run some tests and evalute capabilities of the Tables.

app-generator commented 1 year ago

Hello @IHesamI Thank you!

That's something we can use for the next embedded library: dynamic charts. Let us know if you spot some issues during tests.

🚀🚀

IHesamI commented 1 year ago

Hello @app-generator These are my concerns. 1- DateFields, I use a Datefield in a model and when i render this model the is_date parameter return false for this field. 2- Realations, when there is a relation between models the related fields are not in Heading parameter. 3- Cleaning, I think we should delete some files as they are not useful anymore. 4- Readme, as we changed the UI and customize the DataTable it is better to update the Readme file.

app-generator commented 1 year ago

Hello @IHesamI Thank you for the follow-up. Here are my answers:

Let us know if you need help with some item. Thanks again for your work.

IHesamI commented 1 year ago

Thank you for response @app-generator I deleted some files and Cleaned the Codebase.

app-generator commented 1 year ago

someone is really fast ... 🚀🚀

app-generator commented 1 year ago

Closing