Skip to content

Initial plugin setup #2

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

Merged
merged 5 commits into from
Mar 29, 2024
Merged

Initial plugin setup #2

merged 5 commits into from
Mar 29, 2024

Conversation

joshuapease
Copy link
Contributor

@joshuapease joshuapease commented Mar 28, 2024

Overview

This is the first working version of a standalone Phone Home plugin.

  • Extracts the Phone Home feature from our Viget Base Module
  • Uses Notion instead of Airtable

Why are we doing this?

Previously this functionality was tied to our Viget Base module. But a few things prompted the idea of breaking this into it's own plugin.

  • Airtable's API was changing, and we use Notion more these days.
  • Having a third-party API tied to our base module felt a little brittle.
    • Forcing us to make updates when we didn't want to.
  • A smaller simpler plugin would be easier to share with the broader Craft community.

// databaseId: \craft\helpers\App::env('PHONE_HOME_NOTION_DATABASE'),
// ),
// ],
];
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This makes it easy to configure multiple endpoints if the need ever arises.

I could see this being useful with a client who has multiple Craft sites.

We could configure one Notion endpoint for our Viget database. But also set up the client with their own database of just their sites.

@maxdmyers
Copy link

Nice work on this, @joshuapease!


Create a [new database](https://www.notion.so/help/guides/creating-a-database) in Notion.

No need to add any columns or properties. This plugin will create them when it's first run.

Choose a reason for hiding this comment

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

😍


protected function defaultDescription(): ?string
{
return 'Phoning Home';

Choose a reason for hiding this comment

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

☎️ Phoning Home
👽 Phoning Home

Options...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That would be fun... I'm a little leery of emoji in SQL databases. It's probably not a huge issue... but I'd rather not think about it.

Should be resolved fully for Craft 5 (they're tweaking the default charset to be utf8mb4).

craftcms/cms#12935 (comment)

@joshuapease joshuapease merged commit b62c915 into craft-4 Mar 29, 2024
@joshuapease joshuapease deleted the jp/initial-setup branch March 29, 2024 17:14
Copy link

@maxfenton maxfenton left a comment

Choose a reason for hiding this comment

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

👍

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

Successfully merging this pull request may close these issues.

5 participants