Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Changes to database selection - Saving connections

オープン
#663 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
25/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
php, wordpress

調査の方向性

まず、プラグインが現在チャート上にデータベース認証情報をどのように保存しているかを確認し、次に移行とインポート/エクスポートの経路を追跡します。その後、チャートのデータベース選択 UI と WordPress 管理メニューの構造を調査します。接続が個別の再利用可能なエンティティになり、既存のチャートが移行され、インポート/エクスポートの互換性が維持され、ユーザーが説明どおりに接続を管理および選択できれば完了です。

索引モデルが issue の本文から書いたものです。

説明

enhancement

Moved from https://github.com/Codeinwp/visualizer-pro/issues/248

Context: Multiple users want to be able to re-use old connections instead of having to retype the details. We want to give them an option to re-use an older connection for that purpose.

I also thought of the scenario, if a connection has a password change, at the moment users need to modify every chart to update the change. Making connections their own entity (that can be modified one and have the changes reflected on all charts that selected it) would make sense.

Here are the changes involved for this:

1- Creation of 'database connections'

Currently the credentials are tied to a specific chart, we want to separate the chart from the connection so they become separate entities.

Connections would then be stored separately from the chart, and charts would have a "connection_id" linking to the connection.

2- Migration

Existing credentials would have to be migrated to the new format, meaning for each chart with a connection to an external database, a connection record would be created with an automated name ex : "MySQL001, MySQL002" etc. and the charts would link to it with the corresponding ID.

3- Import/Export

We have to ensure import/export will work with the new structure.

4- Manage Connections page

In the menu, between "Add new chart" and "support, we would have a "Manage Connections" page

This page would be a standard WP crud page (like feedzy's https://i.imgur.com/uBFwOop.png) and allow users to modify all details of the connection, including the name (unique) and credentials. The modification would happen on a separate page (that we can link to later). Upon submitting modifications, a confirmation message will appear: "Are you sure you want to modify this connection? This will affect all charts linked to this connection".

It would also allow creating and deleting a connection, but would not allow deleting a connection linked to a chart.

We could also display a list of charts that use this connection and upon clicking on the chart name in the last, it could open it in edit mode.

5- Update the UI to select a database

Currently we have this: https://i.imgur.com/q6DIkOt.png

Changes:

  • Reword the header to "Select a database connection"
  • Remove the accordion (we want to make it more obvious that the user has more options)
  • Upon selecting an option that is not Wordpress DB, a second dropdown will appear containing "New Connection" as well as all existing connections for this database type.

If the user chooses an existing connection, no other fields need to be displayed. We can have a button on the right of it that says "View/Edit this connection" which would open the edit page in a new tab.

If the user chooses "New Connection", it will be same as this: https://i.imgur.com/PS0O9rQ.png

Except there will be the "New Connection" dropdown and the connection name.

The connection will be created/saved when the user saves the chart itself, if the name was left empty, it will have a generic unique name (ex: MySQL001)

主要言語
PHP
スター
108
フォーク
29
平均マージ
1日 5時間
マージ済み PR(30日)
8

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Codeinwp/visualizer のほかの issue

Codeinwp/visualizer の issue をすべて見る

似ている issue

PHP の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。