specify / specify6

Source Code for Specify 6, Biological Collections Management Platform
https://specifysoftware.org
GNU General Public License v2.0
14 stars 6 forks source link

formatted guest/ento.views #1194

Closed ianengelbrecht closed 1 year ago

ianengelbrecht commented 1 year ago

Hey guys, please see my email about this (Max/Grant). I've just formatted one small views file to start with. You'll see that views and viewdefs are now sorted alphabetically in the file, making them easier to find in big files like common.views. Also, for viewdefs, the name attribute is now on the same line as the opening tag, so if you fold all (Ctrl+k+3 in VS Code), you can quickly see what each one is.

Let me know if you like it, and if it doesn't break anything.

ianengelbrecht commented 1 year ago

Here's the repo with the formatting script if you want to take a look: https://github.com/NSCF/specify-sort-views. Very raw string manipulation happening there.

ianengelbrecht commented 1 year ago

Thanks Max, I’ll wait to hear from you before going ahead with any more.

On Mon, 30 Jan 2023 at 16:31, Max Patiiuk @.***> wrote:

@.**** approved this pull request.

The reformatting looks good! Thanks for doing this. I will have one of our testers try it out in Specify just in case and then this can be merged.

— Reply to this email directly, view it on GitHub https://github.com/specify/specify6/pull/1194#pullrequestreview-1275280415, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACH3QI37UQ2WDEWCEFUP5CTWU7GDLANCNFSM6AAAAAAUJWOJQ4 . You are receiving this because you authored the thread.Message ID: @.***>

-- Ian Engelbrecht Digitization Coordinator Natural Science Collections Facility South Africa https://nscf.org.za/ https://nscf.org.za/ +27 82 763 4596 i @.>@. / @.***

maxpatiiuk commented 1 year ago

Just a FYI, our testers are busy doing pre-release testing for 7.8.5 today, but will get back to this pull request in the next few days. Sorry for the delay

ianengelbrecht commented 1 year ago

No problem, I have more than enough to keep me busy…

On Mon, 30 Jan 2023 at 17:46, Max Patiiuk @.***> wrote:

Just a FYI, our testers are busy doing pre-release testing for 7.8.5 https://github.com/specify/specify7/blob/production/CHANGELOG.md#785-unreleased today, but will get back to this pull request in the next few days. Sorry for the delay

— Reply to this email directly, view it on GitHub https://github.com/specify/specify6/pull/1194#issuecomment-1408858602, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACH3QI743I3BPMQ5WCHXVELWU7O6RANCNFSM6AAAAAAUJWOJQ4 . You are receiving this because you authored the thread.Message ID: @.***>

-- Ian Engelbrecht Digitization Coordinator Natural Science Collections Facility South Africa https://nscf.org.za/ https://nscf.org.za/ +27 82 763 4596 i @.>@. / @.***

maxpatiiuk commented 1 year ago

@ianengelbrecht looking forward to your pull request that reformats all the *.views.xml files in the config directory

ianengelbrecht commented 1 year ago

LOL, I think let's do this piecemeal just in case it does break something! I'll do global.views next, then common.views. If that's all still working perhaps we go one discipline at a time. Or do you think we should just do all the disciplines at once?

On Mon, Jan 30, 2023 at 9:26 PM Max Patiiuk @.***> wrote:

@ianengelbrecht https://github.com/ianengelbrecht looking forward to your pull request that reformats all the *.views.xml files in the config directory https://github.com/specify/specify6/tree/master/config/

— Reply to this email directly, view it on GitHub https://github.com/specify/specify6/pull/1194#issuecomment-1409212854, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACH3QI2DBDSGW3YVIKYJIXLWVAIVHANCNFSM6AAAAAAUJWOJQ4 . You are receiving this because you were mentioned.Message ID: @.***>

-- Ian Engelbrecht Digitization Coordinator Natural Science Collections Facility South Africa https://nscf.org.za/ https://nscf.org.za/ +27 82 763 4596 i @.>@. / @.***

maxpatiiuk commented 1 year ago

It might be easier for us to test when all the changes are included at once, rather than test everything again after each discipline is changed.

Given that you are using an automated tool rather than manually editing the files, if there is a bug with the reformatting, it would probably manifest itself in all the files (excluding any edge cases, and hopefully there arent any)

One thing I noticed though is that your script changes the order of tables in the view definition file. That might be something people are sensitive about (i.e, people like Collection Object being the first table followed by other important tables). Though that would become less important once we have a visual editor