jboullion / rad-toolkit

Application for listing aerospace component properties with a focus on their radiation resistance
https://rad-toolkit.nexusaurora.org/
1 stars 0 forks source link

Filter values logical sort #21

Open codeflight1 opened 10 months ago

codeflight1 commented 10 months ago

The options within filter dropdowns are currently sorted by text instead of value (e.g. 5 should be before 12 is before 100, etc.) image

jboullion commented 10 months ago

Commit https://github.com/jboullion/rad-toolkit/commit/6d4db372c6a28e654cba55b999a16f26dcc0f42b

codeflight1 commented 10 months ago

Seems to mostly work, but values with prefixes are still sorted incorrectly.

codeflight1 commented 10 months ago

This behavior (including the first message) is also present when sorting by a column containing such values.

jboullion commented 8 months ago

Quick question here. On the first column we have Name and Partnumber. I am currently sorting by name, which feels right. But a lot of components do not have a name. So perhaps we should be sorting on part number?

jboullion commented 8 months ago

Commit https://github.com/jboullion/rad-toolkit/commit/d3a25b1d8affd30f2e8a41f7d8822268d0b7126d

I will push this and I believe it will be ready for testing :)

codeflight1 commented 8 months ago

It seems to be closer, but unit prefixes are still sorting incorrectly. The easiest fix may be to simply sort before unit prefixes are added.

Quick question here. On the first column we have Name and Partnumber. I am currently sorting by name, which feels right. But a lot of components do not have a name. So perhaps we should be sorting on part number?

Generally it shouldn't matter, but I agree that since most don't have a name we should sort by part number. Especially because name is also being used as more of a description field in some cases.

jboullion commented 8 months ago

I really need to go back and clean up how I set up my values now that I know how everything is used.

For now I did a dirty fix, but it should work. Let me know if it doesn't work in any columns you are aware of

codeflight1 commented 8 months ago

I'm seeing the same thing as previously, although from the code changes it seems like it should work. Don't worry about taking the time to do it properly, it's not urgent.

codeflight1 commented 8 months ago

May have just needed time to update, as it's sort of working now. Values with decimals or milli (m) prefixes are still wrong though.

jboullion commented 8 months ago

Updated!

If it isn't work may need to hard refresh. I was hoping the cache wouldn't stick, but sometimes it does.

codeflight1 commented 8 months ago

Awesome! Items with both a unit prefix and a decimal jump to the top, but that's not a big deal.