Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unused templates, blocks #1259

Closed
koeaw opened this issue Oct 2, 2024 · 4 comments
Closed

Unused templates, blocks #1259

koeaw opened this issue Oct 2, 2024 · 4 comments
Labels
question For any kind of question, whether about usage, contributing or the project in general

Comments

@koeaw
Copy link
Contributor

koeaw commented Oct 2, 2024

Going through the remaining style attributes as per #1258, I'm wondering if the following are still needed:

The relations template looks like it belonged with GenericRelationView, which was removed in e1e2e1e.

The modal block doesn't seem to get used by anything – I guess it's from when we used a modal to confirm deletion of an object? For which we're now using htmx, though I don't know if we're intending to keep that or eventually go back to the Bootstrap modal (which is a different discussion to be had). If the modal isn't needed anymore, the custom styling, whose purpose is unclear to me, doesn't need moving, either. ETA: If we wanna keep it, the customisations should be testable somehow.

@koeaw koeaw added the question For any kind of question, whether about usage, contributing or the project in general label Oct 2, 2024
@b1rger
Copy link
Contributor

b1rger commented Oct 2, 2024

The modal block doesn't seem to get used by anything – I guess it's from when we used a modal to confirm deletion of an object?

The modal was introduced so it can be used by plugins or projects. The bibsonomy plugin uses it for its form. It was also initially used for the new relations, but this was now replaced by a dialog element in a2e80fa.
Once the bibsonomy plugin also moves to a dialog element, the modal can be removed.

@koeaw
Copy link
Contributor Author

koeaw commented Oct 2, 2024

The modal block doesn't seem to get used by anything – I guess it's from when we used a modal to confirm deletion of an object?

The modal was introduced so it can be used by plugins or projects. The bibsonomy plugin uses it for its form. It was also initially used for the new relations, but this was now replaced by a dialog element in a2e80fa. Once the bibsonomy plugin also moves to a dialog element, the modal can be removed.

Ok, thanks. I don't dislike the idea of including a block for a modal – or other "convenience" blocks for projects – in general. This probably more highlights a problem with code that isn't actively used in Core itself but meant to be used downstream. Other bibsonomy-related if-else blocks in templates come to mind. I think it'd be a good idea if there were a way to test this sort of stuff.

I'll move the custom styling as-is for now.

@b1rger
Copy link
Contributor

b1rger commented Oct 2, 2024

Ok, thanks. I don't dislike the idea of including a block for a modal – or other "convenience" blocks for projects – in general. This probably more highlights a problem with code that isn't actively used in Core itself

Sorry, I think my comment was more confusing than helpful. The modal was also meant for plugins and downstream projects, but it was also used in core. The bootstrap modal is an element that is not that easy to inject into the DOM, so it made sense at the time to include it by default. Now that there is the dialog element which is more standardized there is no need for the modal anymore. I think our templates should be generic enough to make convenience blocks for projects unneccessary.

Other bibsonomy-related if-else blocks in templates come to mind.

If such blocks are still present I would consider this to be a bug. We tried hard in the last year to get rid of those

@koeaw
Copy link
Contributor Author

koeaw commented Oct 2, 2024

I think our templates should be generic enough to make convenience blocks for projects unneccessary.

👍

Other bibsonomy-related if-else blocks in templates come to mind.

If such blocks are still present I would consider this to be a bug. We tried hard in the last year to get rid of those

Ah! I came across a couple again while looking to move the last bits of JavaScript out of templates. But that template code is a(n inherited) mess in general, i.e. not representative, and I didn't look elsewhere, just saw them there (where they are nonsensical anyway because they reference code that doesn't exist anymore).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question For any kind of question, whether about usage, contributing or the project in general
Projects
None yet
Development

No branches or pull requests

2 participants