Skip to content

Commit

Permalink
prf: getAboveTablePanelConfigs -> makeAboveTablePanelConfigs for more…
Browse files Browse the repository at this point in the history
… action oriented verbs
  • Loading branch information
hydrosquall committed Apr 20, 2023
1 parent 0536f5d commit cef6740
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions datasette/static/datasette-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const datasetteManager = {
datasetteManager.plugins.set(name, pluginMetadata);

// If the plugin partipates in the panel... update the panel.
if (pluginMetadata.getAboveTablePanelConfigs) {
if (pluginMetadata.makeAboveTablePanelConfigs) {
datasetteManager.renderAboveTablePanel();
}
},
Expand Down Expand Up @@ -120,9 +120,9 @@ const datasetteManager = {
}

datasetteManager.plugins.forEach((plugin, pluginName) => {
const { getAboveTablePanelConfigs: getPanelConfigs } = plugin;
const { makeAboveTablePanelConfigs } = plugin;

if (getPanelConfigs) {
if (makeAboveTablePanelConfigs) {
const controls = aboveTablePanel.querySelector('.tab-controls');
const contents = aboveTablePanel.querySelector('.tab-contents');

Expand Down
4 changes: 2 additions & 2 deletions datasette/static/table-example-plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const addPlugins = (manager) => {

manager.registerPlugin("panel-plugin-graphs", {
version: 0.1,
getAboveTablePanelConfigs: () => {
makeAboveTablePanelConfigs: () => {
return [
{
id: 'first-panel',
Expand Down Expand Up @@ -62,7 +62,7 @@ const addPlugins = (manager) => {

manager.registerPlugin("panel-plugin-maps", {
version: 0.1,
getAboveTablePanelConfigs: () => {
makeAboveTablePanelConfigs: () => {
return [
{
// ID only has to be unique within a plugin, manager namespaces for you
Expand Down

0 comments on commit cef6740

Please sign in to comment.