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

Table actions menu on view pages, not on query pages #1067

Closed
simonw opened this issue Oct 30, 2020 · 6 comments
Closed

Table actions menu on view pages, not on query pages #1067

simonw opened this issue Oct 30, 2020 · 6 comments
Labels
Milestone

Comments

@simonw
Copy link
Owner

simonw commented Oct 30, 2020

Follow-on from #1066.

@simonw simonw added the small label Oct 30, 2020
@simonw simonw added this to the 0.51 milestone Oct 30, 2020
@simonw
Copy link
Owner Author

simonw commented Oct 30, 2020

Yes, this should be possible - no point restricting what plugin authors can do with the feature. Will need to add some extra arguments to the plugin hook for this.

@simonw simonw changed the title Should table actions menu show on view or query pages? Table actions menu on view or query pages Oct 30, 2020
@simonw
Copy link
Owner Author

simonw commented Oct 30, 2020

Maybe rename it to actions_menu and have it work for database, view, table and query pages using different arguments on each.

@simonw
Copy link
Owner Author

simonw commented Oct 31, 2020

Should the hook provide an indication that it's running on a different type of page? I think yes for queries. Not sure about views - they behave very much like tables, and the plugin can always introspect to see if something is a view if it needs to.

@simonw
Copy link
Owner Author

simonw commented Oct 31, 2020

For the 0.51 release I'm going to add tests that show this works on view pages. I won't implement it for query pages.

@simonw simonw changed the title Table actions menu on view or query pages Table actions menu on view pages, not on query pages Oct 31, 2020
@simonw
Copy link
Owner Author

simonw commented Oct 31, 2020

It bothers me that these aren't visible in any public demos. Maybe latest.datasette.io should include the my_plugins.py and my_plugins2.py plugins?

@simonw
Copy link
Owner Author

simonw commented Oct 31, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant