Change list default sort modification proposal

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Change list default sort modification proposal

Joshua Russo-2

I just wanted to toss this out there before creating the ticket. I've
tweaked the change list sort handling so that by default it uses the
full list of sort columns defined in the model. It sets all of the
headers as unselected and then behaves as it currently does if someone
selects a header column to sort by. I've also modified the template to
add a Reset sort (or conditionally Reset sort and filter) button to
bring everything back to the original state.

Does this sound like something that is desired?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django developers" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Change list default sort modification proposal

Rock-10

Yes. I have a project that could use this immediately. Looking forward
to seeing the ticket and a patch I can try out.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django developers" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Change list default sort modification proposal

Joshua Russo-2
On Tue, Aug 11, 2009 at 7:46 PM, Rock <[hidden email]> wrote:

Yes. I have a project that could use this immediately. Looking forward
to seeing the ticket and a patch I can try out.

Ok, let me know what you think.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django developers" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Change list default sort modification proposal

Malcolm Tredinnick

For those, like me, wondering what this proposal was about, it's
concerning changing sorting in the admin interface to initially use the
full set of fields specified in Meta.ordering on the model.

What I can't work out yet, due to difficulty in reviewing the patch,
mentioned below, is whether it allow sorting by more than one column via
the column-clicking method. That would almost certainly seem to be a
request that is going to arrive 10 seconds after a feature like this is
committed, although the difficulty has always been with how the UI works
for that situation.

On Tue, 2009-08-11 at 20:21 -0100, Joshua Russo wrote:
> On Tue, Aug 11, 2009 at 7:46 PM, Rock <[hidden email]> wrote:
>        
>         Yes. I have a project that could use this immediately. Looking
>         forward
>         to seeing the ticket and a patch I can try out.
>
>
> Ok, let me know what you think.
> http://code.djangoproject.com/ticket/11695 

Please read contributing.txt about how to submit patches. I looked at
the latest patch on that ticket and it wasn't complete. Then I realised
you have filed three patches that all need to be read together. This
makes reviewing extremely difficult. It also means that if somebody
fixes a problem in one of the patches, it becomes incredibly unclear
which are the relevant patches.

Creating svn diffs isn't difficult. You change to the top of the source
tree and run "svn diff". All your changes in one patch with full paths.

Regards,
Malcolm




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django developers" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Change list default sort modification proposal

Rock-10

My suggestion for handling the UI for multi-column sorts is to allow
the definition
of named sorts in a manner similar to the way that the default sorting
is defined.
With this in place, additional multi column orders can be accomplished
simply
by using this name as a sort selection and applying the corresponding
named sort.

If this is an acceptable approach, I can flesh out the API for it.

On Aug 11, 10:10 pm, Malcolm Tredinnick <[hidden email]>
wrote:

> For those, like me, wondering what this proposal was about, it's
> concerning changing sorting in the admin interface to initially use the
> full set of fields specified in Meta.ordering on the model.
>
> What I can't work out yet, due to difficulty in reviewing the patch,
> mentioned below, is whether it allow sorting by more than one column via
> the column-clicking method. That would almost certainly seem to be a
> request that is going to arrive 10 seconds after a feature like this is
> committed, although the difficulty has always been with how the UI works
> for that situation.
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django developers" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Change list default sort modification proposal

Joshua Russo-2

Sorry for dragging this back out of the depths but I was reviewing my
code for regression testing and I noticed I had missed this comment
way back when.

Where is this named sort option documented?

It seems to me that the implementation that I have here would still be
useful even if you could associate multiple sort columns with a single
displayed column. I think that it's confusing to the developer not to
have the list display using the sort order that is defined within the
model.


On Aug 13, 2:49 pm, Rock <[hidden email]> wrote:

> My suggestion for handling the UI for multi-column sorts is to allow
> the definition
> of named sorts in a manner similar to the way that the default sorting
> is defined.
> With this in place, additional multi column orders can be accomplished
> simply
> by using this name as a sort selection and applying the corresponding
> named sort.
>
> If this is an acceptable approach, I can flesh out the API for it.
>
> On Aug 11, 10:10 pm, Malcolm Tredinnick <[hidden email]>
> wrote:
>
>
>
> > For those, like me, wondering what this proposal was about, it's
> > concerning changing sorting in the admin interface to initially use the
> > full set of fields specified in Meta.ordering on the model.
>
> > What I can't work out yet, due to difficulty in reviewing the patch,
> > mentioned below, is whether it allow sorting by more than one column via
> > the column-clicking method. That would almost certainly seem to be a
> > request that is going to arrive 10 seconds after a feature like this is
> > committed, although the difficulty has always been with how the UI works
> > for that situation.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django developers" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Change list default sort modification proposal

bendavis78
I'm not sure if anyone's seen this,  but I've written a patch for multi-sort columns in the changelist ui here:

http://code.djangoproject.com/ticket/11868

Not sure if this is what you guys had in mind, but I'd be interested in your feedback.

On Thu, Sep 17, 2009 at 12:57 PM, Joshua Russo <[hidden email]> wrote:

Sorry for dragging this back out of the depths but I was reviewing my
code for regression testing and I noticed I had missed this comment
way back when.

Where is this named sort option documented?

It seems to me that the implementation that I have here would still be
useful even if you could associate multiple sort columns with a single
displayed column. I think that it's confusing to the developer not to
have the list display using the sort order that is defined within the
model.


On Aug 13, 2:49 pm, Rock <[hidden email]> wrote:
> My suggestion for handling the UI for multi-column sorts is to allow
> the definition
> of named sorts in a manner similar to the way that the default sorting
> is defined.
> With this in place, additional multi column orders can be accomplished
> simply
> by using this name as a sort selection and applying the corresponding
> named sort.
>
> If this is an acceptable approach, I can flesh out the API for it.
>
> On Aug 11, 10:10 pm, Malcolm Tredinnick <[hidden email]>
> wrote:
>
>
>
> > For those, like me, wondering what this proposal was about, it's
> > concerning changing sorting in the admin interface to initially use the
> > full set of fields specified in Meta.ordering on the model.
>
> > What I can't work out yet, due to difficulty in reviewing the patch,
> > mentioned below, is whether it allow sorting by more than one column via
> > the column-clicking method. That would almost certainly seem to be a
> > request that is going to arrive 10 seconds after a feature like this is
> > committed, although the difficulty has always been with how the UI works
> > for that situation.



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django developers" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Change list default sort modification proposal

Joshua Russo-2
I don't have any say in what gets accepted or not but I do believe that your solution is a decent one. I'm continuing with mine because it addresses a current need simply and can be (fairly) easily tested. If you can create the regression tests for yours then I believe you might get more traction.

Then again there may be some hesitation to the level of complexity you are introducing. There is always a strong inclination in the the project for simplicity.


On Thu, Sep 17, 2009 at 5:42 PM, Ben Davis <[hidden email]> wrote:
I'm not sure if anyone's seen this,  but I've written a patch for multi-sort columns in the changelist ui here:

http://code.djangoproject.com/ticket/11868

Not sure if this is what you guys had in mind, but I'd be interested in your feedback.


On Thu, Sep 17, 2009 at 12:57 PM, Joshua Russo <[hidden email]> wrote:

Sorry for dragging this back out of the depths but I was reviewing my
code for regression testing and I noticed I had missed this comment
way back when.

Where is this named sort option documented?

It seems to me that the implementation that I have here would still be
useful even if you could associate multiple sort columns with a single
displayed column. I think that it's confusing to the developer not to
have the list display using the sort order that is defined within the
model.


On Aug 13, 2:49 pm, Rock <[hidden email]> wrote:
> My suggestion for handling the UI for multi-column sorts is to allow
> the definition
> of named sorts in a manner similar to the way that the default sorting
> is defined.
> With this in place, additional multi column orders can be accomplished
> simply
> by using this name as a sort selection and applying the corresponding
> named sort.
>
> If this is an acceptable approach, I can flesh out the API for it.
>
> On Aug 11, 10:10 pm, Malcolm Tredinnick <[hidden email]>
> wrote:
>
>
>
> > For those, like me, wondering what this proposal was about, it's
> > concerning changing sorting in the admin interface to initially use the
> > full set of fields specified in Meta.ordering on the model.
>
> > What I can't work out yet, due to difficulty in reviewing the patch,
> > mentioned below, is whether it allow sorting by more than one column via
> > the column-clicking method. That would almost certainly seem to be a
> > request that is going to arrive 10 seconds after a feature like this is
> > committed, although the difficulty has always been with how the UI works
> > for that situation.






--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django developers" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Change list default sort modification proposal

bendavis78
I would write the tests though I'm not 100% sure how to write regression tests for a UI change...   any suggestions on how to go about doing that?

On Thu, Sep 17, 2009 at 2:04 PM, Joshua Russo <[hidden email]> wrote:
I don't have any say in what gets accepted or not but I do believe that your solution is a decent one. I'm continuing with mine because it addresses a current need simply and can be (fairly) easily tested. If you can create the regression tests for yours then I believe you might get more traction.

Then again there may be some hesitation to the level of complexity you are introducing. There is always a strong inclination in the the project for simplicity.


On Thu, Sep 17, 2009 at 5:42 PM, Ben Davis <[hidden email]> wrote:
I'm not sure if anyone's seen this,  but I've written a patch for multi-sort columns in the changelist ui here:

http://code.djangoproject.com/ticket/11868

Not sure if this is what you guys had in mind, but I'd be interested in your feedback.


On Thu, Sep 17, 2009 at 12:57 PM, Joshua Russo <[hidden email]> wrote:

Sorry for dragging this back out of the depths but I was reviewing my
code for regression testing and I noticed I had missed this comment
way back when.

Where is this named sort option documented?

It seems to me that the implementation that I have here would still be
useful even if you could associate multiple sort columns with a single
displayed column. I think that it's confusing to the developer not to
have the list display using the sort order that is defined within the
model.


On Aug 13, 2:49 pm, Rock <[hidden email]> wrote:
> My suggestion for handling the UI for multi-column sorts is to allow
> the definition
> of named sorts in a manner similar to the way that the default sorting
> is defined.
> With this in place, additional multi column orders can be accomplished
> simply
> by using this name as a sort selection and applying the corresponding
> named sort.
>
> If this is an acceptable approach, I can flesh out the API for it.
>
> On Aug 11, 10:10 pm, Malcolm Tredinnick <[hidden email]>
> wrote:
>
>
>
> > For those, like me, wondering what this proposal was about, it's
> > concerning changing sorting in the admin interface to initially use the
> > full set of fields specified in Meta.ordering on the model.
>
> > What I can't work out yet, due to difficulty in reviewing the patch,
> > mentioned below, is whether it allow sorting by more than one column via
> > the column-clicking method. That would almost certainly seem to be a
> > request that is going to arrive 10 seconds after a feature like this is
> > committed, although the difficulty has always been with how the UI works
> > for that situation.









--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django developers" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Change list default sort modification proposal

Joshua Russo-2
Take a look in test\regressiontests\admin_views\tests.py AdminViewBasicTest.testChangeListSortingXXX() methods. They should give you a good place to start.

On Wed, Sep 23, 2009 at 6:18 PM, Ben Davis <[hidden email]> wrote:
I would write the tests though I'm not 100% sure how to write regression tests for a UI change...   any suggestions on how to go about doing that?

On Thu, Sep 17, 2009 at 2:04 PM, Joshua Russo <[hidden email]> wrote:
I don't have any say in what gets accepted or not but I do believe that your solution is a decent one. I'm continuing with mine because it addresses a current need simply and can be (fairly) easily tested. If you can create the regression tests for yours then I believe you might get more traction.

Then again there may be some hesitation to the level of complexity you are introducing. There is always a strong inclination in the the project for simplicity.


On Thu, Sep 17, 2009 at 5:42 PM, Ben Davis <[hidden email]> wrote:
I'm not sure if anyone's seen this,  but I've written a patch for multi-sort columns in the changelist ui here:

http://code.djangoproject.com/ticket/11868

Not sure if this is what you guys had in mind, but I'd be interested in your feedback.


On Thu, Sep 17, 2009 at 12:57 PM, Joshua Russo <[hidden email]> wrote:

Sorry for dragging this back out of the depths but I was reviewing my
code for regression testing and I noticed I had missed this comment
way back when.

Where is this named sort option documented?

It seems to me that the implementation that I have here would still be
useful even if you could associate multiple sort columns with a single
displayed column. I think that it's confusing to the developer not to
have the list display using the sort order that is defined within the
model.


On Aug 13, 2:49 pm, Rock <[hidden email]> wrote:
> My suggestion for handling the UI for multi-column sorts is to allow
> the definition
> of named sorts in a manner similar to the way that the default sorting
> is defined.
> With this in place, additional multi column orders can be accomplished
> simply
> by using this name as a sort selection and applying the corresponding
> named sort.
>
> If this is an acceptable approach, I can flesh out the API for it.
>
> On Aug 11, 10:10 pm, Malcolm Tredinnick <[hidden email]>
> wrote:
>
>
>
> > For those, like me, wondering what this proposal was about, it's
> > concerning changing sorting in the admin interface to initially use the
> > full set of fields specified in Meta.ordering on the model.
>
> > What I can't work out yet, due to difficulty in reviewing the patch,
> > mentioned below, is whether it allow sorting by more than one column via
> > the column-clicking method. That would almost certainly seem to be a
> > request that is going to arrive 10 seconds after a feature like this is
> > committed, although the difficulty has always been with how the UI works
> > for that situation.












--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django developers" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---