Skip to content

Conversation

@abhi1693
Copy link
Member

@abhi1693 abhi1693 commented Aug 4, 2023

Fixes: #12110

@abhi1693 abhi1693 marked this pull request as draft August 4, 2023 20:44
Copy link
Member

@jeremystretch jeremystretch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great, thanks! I think with a little further cleanup we should be able to simplify it even further and avoid any potentially breaking changes in plugins.

@abhi1693 abhi1693 marked this pull request as ready for review August 8, 2023 16:23
@abhi1693 abhi1693 requested a review from jeremystretch August 8, 2023 16:23
@abhi1693
Copy link
Member Author

abhi1693 commented Aug 8, 2023

There is an issue with the cluster object views which requires more changes or we may have to revert the changes partially or fully for cluster views

Copy link
Member

@DanSheps DanSheps left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really dislike the tab_view.html template name. It does not properly convey what this view does (displays objectchildren lists)

Instead, I would propose we rename it to objectchildren_list.html to properly convey what this template actually does.

@abhi1693
Copy link
Member Author

abhi1693 commented Aug 8, 2023

@DanSheps If you check the latest changes, the file was moved and renamed to generic/object_tab.html

@DanSheps
Copy link
Member

DanSheps commented Aug 8, 2023

@DanSheps If you check the latest changes, the file was moved and renamed to generic/object_tab.html

Still doesn't address the fact that object_tab is overly generic, especially when this template can only be used to generate a list. As mentioned, I think objectchildren_list.html would be better and it also follows already "established convention" as object_list.html is the Object list view (class ObjectListView).

The convention, which is mostly universal within the generics:

  • Take the class name and remove "View"
  • Take the result, and reverse find the next capital ("List, Edit, Delete") and split forward of that with an underscore
  • Lowercase it all
  • Add .html

Doing all that gives you the template name (object.html, object_edit.html, object_delete.html, object_list.html)

@abhi1693 abhi1693 changed the title Adds generic tab view template Adds generic object children template Aug 9, 2023
@jeremystretch jeremystretch merged commit 545769a into develop Aug 9, 2023
@jeremystretch jeremystretch deleted the feat/12110-generic-tab-view branch August 9, 2023 18:16
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a generic view_tab.html template to ease plugin development

4 participants