SFX and sfpy always have the same four links first: Summary, Files, Reviews, and Support. Fix Allura to do the same, ideally in a way that would leave the OSS Allura untouched (i.e., still able to order however).
One of the advantages of Allura is the ability to customize a lot, so I'm not 100% sure we want to do this.
If we do do this, we should integrate the existing option to enable/disable reviews with Allura and its menu. Also consider the same if projects don't have releases and want to have that removed from the initial 4 menu links.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I think this should be implemented as a neighborhood-level setting (fairly similar to the "project template") in which a list of tools & labels are specified to be the initial tools for all projects. Then, use those names and orderings when rendering the top nav and _nav.json. If a project already has a tool of that type installed, re-use that tool instance. If they don't have that tool installed, install it. (Open question - what happens if later you remove a tool from the nbhd's required tools list - ok to keep the auto-installed instances everywhere?)
On the tool admin page for individual projects, these required tools should show up first, just like they will on the nav. But they should not be delete-able. (Note: there is a separate ticket (can't find it right now) for each tool to specify the max number of instances of it that can be installed. Then project admins won't be able to install multiple instances of the Summary or Files tools for example)
Probably should base this off of the changes already on tv/4957 on the apache repo (not on master yet) since they also affect the top nav.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
FYI there is somewhat similar functionality in scripts/project-import.py line 192 (options.ensure_tools). That uses the nbhd's project template (which is a separate field from what we need in this ticket) so not sure if that code would be helpful or reusable or not.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Everything seems to be functioning well. Nice work.
The parsing of the default_tools field in a few different places for a dict and a list seems a tiny bit ugly to me. I'm not sure exactly what would be better, but could you see how an [OrderedDict|http://docs.python.org/2.7/library/collections.html#collections.OrderedDict] works out? get_default_tools and get_default_tools_order could be combined into a single method that returned the ordered dict and then places that use that could be simplified a bit I think. Try it and see, if it's looking better, then use it. If not really, than don't use it.
The is_missing value for the default tools should be '' so that existing neighborhoods aren't changed automatically by this feature.
On the project tools page, the .isnt_sorted cards shouldn't have the movement cursor. Make it the "not-allowed" cursor so it gives a hint that these tools are locked into place.
log.error(tool + ' is not available') should include the error message too in case something needs to be debugged. Just add exc_info=True to the log line
assert c.project.install_app.call_args[0][0] == 'tickets' is in a test twice, that seems like a copy/paste error or something.
And one last (sweeping) change. "default" doesn't seem like the right word here. I talked with the team and we think "anchored" is a better description of the behavior. Can you change the field, code, and HTML label to use "anchored" tools?
Thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
One of the advantages of Allura is the ability to customize a lot, so I'm not 100% sure we want to do this.
If we do do this, we should integrate the existing option to enable/disable reviews with Allura and its menu. Also consider the same if projects don't have releases and want to have that removed from the initial 4 menu links.
I think this should be implemented as a neighborhood-level setting (fairly similar to the "project template") in which a list of tools & labels are specified to be the initial tools for all projects. Then, use those names and orderings when rendering the top nav and _nav.json. If a project already has a tool of that type installed, re-use that tool instance. If they don't have that tool installed, install it. (Open question - what happens if later you remove a tool from the nbhd's required tools list - ok to keep the auto-installed instances everywhere?)
On the tool admin page for individual projects, these required tools should show up first, just like they will on the nav. But they should not be delete-able. (Note: there is a separate ticket (can't find it right now) for each tool to specify the max number of instances of it that can be installed. Then project admins won't be able to install multiple instances of the Summary or Files tools for example)
Probably should base this off of the changes already on tv/4957 on the apache repo (not on master yet) since they also affect the top nav.
Created #246: [#4943] Fix ordering in the Allura's nav for consistency with sfpy/sfx (3cp)
Related
Tickets:
#4943FYI there is somewhat similar functionality in scripts/project-import.py line 192 (options.ensure_tools). That uses the nbhd's project template (which is a separate field from what we need in this ticket) so not sure if that code would be helpful or reusable or not.
Closed #246.
allura:42cc_4943
Everything seems to be functioning well. Nice work.
The parsing of the
default_tools
field in a few different places for a dict and a list seems a tiny bit ugly to me. I'm not sure exactly what would be better, but could you see how an [OrderedDict|http://docs.python.org/2.7/library/collections.html#collections.OrderedDict] works out?get_default_tools
andget_default_tools_order
could be combined into a single method that returned the ordered dict and then places that use that could be simplified a bit I think. Try it and see, if it's looking better, then use it. If not really, than don't use it.The is_missing value for the default tools should be '' so that existing neighborhoods aren't changed automatically by this feature.
On the project tools page, the
.isnt_sorted
cards shouldn't have the movement cursor. Make it the "not-allowed" cursor so it gives a hint that these tools are locked into place.log.error(tool + ' is not available')
should include the error message too in case something needs to be debugged. Just addexc_info=True
to the log lineassert c.project.install_app.call_args[0][0] == 'tickets'
is in a test twice, that seems like a copy/paste error or something.And one last (sweeping) change. "default" doesn't seem like the right word here. I talked with the team and we think "anchored" is a better description of the behavior. Can you change the field, code, and HTML label to use "anchored" tools?
Thanks
Created #259: [#4943] Ordering in the Allura's nav improvements (1cp)
Related
Tickets:
#4943Closed #259.
allura:42cc_4943a