question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow plugins to replace core views

See original GitHub issue

As …

P.D. - Plugin Developer

I want …

A plugin to define a view that can functionally replace a core view by changing which view is routed to in the URL path from urlpatterns

So that …

I can provide functionality in a plugin that entirely replaces the implementation of a core view. For example, I may want to drastically change the look and feel of the IPAM prefix-list or detail views by completely suppressing certain model fields from table columns or filter fields. I may also want to provide my own filterset and filter form.

Plugin developers are doing this today by having a plugin provide a new view under its own URL namespace and using hacks in the permission framework to “hide” the existing views from navigation. This is very cumbersome as it requires the usage of custom permission actions and the unnecessary implementation of other related model views to override things like return URLs. Even with this hacky implementation, consider that a user may still be able to access the core view by navigating through other areas of the UI. For example, accessing the existing Prefix view by navigating through IP Addresses. This creates very bad UX.

I know this is done when…

  • A plugin developer is able to register a view that is defined in the plugin and fully conforms to the core view’s functional interface
  • A plugin developer can specify which core view and URL paths should be replaced by the registered plugin view

Optional - Feature groups this request pertains to.

  • Automation
  • Circuits
  • DCIM
  • IPAM
  • Misc (including Data Sources)
  • Organization
  • Plugins (and other Extensibility)
  • Security (Secrets, etc)
  • Image Management
  • UI/UX
  • Documentation
  • Other (not directly a platform feature)

Database Changes

No response

External Dependencies

No response

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
lampwinscommented, Mar 10, 2022

This is certainly an advanced feature and I envision it really only being used by an org’s internally developed plugins. I would be fine with the order within PLUGINS dictating which view wins.

0reactions
bryanculvercommented, Jul 12, 2022

Completed in #1957.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Create a .NET Core application with plugins - Microsoft Learn
Replace the // Load commands from plugins comment with the following code snippet to enable it to load plugins from given file paths:....
Read more >
Managing Plugins – WordPress.org Forums
Manual Plugin Update From The Plugins Page​​ Look down the list of installed plugins for any that include a line reading “There is...
Read more >
Create new PluginViews to allow plugins to extend base view ...
Create separate view classes for plugins to extend and provide base functionality to plugins. This class would provide a consistent api for plugin...
Read more >
Is it possible to add settings to "allow-plugins" in config section ...
Since composer 2.2 the setting allow-plugins will be compulsory I've tried to push this setting through the composer config command in the ...
Read more >
About Views plugins | views.api.php | Views 7.x-3.x | Drupal API
Display extenders: Display extender plugins allow scaling of views options horizontally. This means that you can add options and do stuff on all...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found