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

Add IDalamudConfigReader and early Analytics system #1547

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

KazWolfe
Copy link
Member

@KazWolfe KazWolfe commented Nov 25, 2023

Add a new service, IDalamudConfigReader. This service is designed to expose certain internal Dalamud configurations or states to plugins in a simple manner. Config entries are exposed to plugins as required, and generally in cases where there's no other way to get them (e.g. ImGui styles).

In addition, leverage this service to provide two new config options:

  • PluginAnalyticsConsent, which controls whether plugins are allowed to collect analytics on players:
    • OptedOut: The user has requested that no analytics be collected on them.
    • Ask (default): Plugins must ask the user via their own UI before collecting analytics.
    • OptedIn: The user has automatically consented to analytics collection from all plugins.
  • PluginAnalyticsId, which is an opaque string that uniquely identifies a specific Dalamud installation. Every plugin is exposed a different Analytics ID derived from the plugin's InternalName and the user's global Analytics ID (as a GUID). If a user has opted out of analytics, this value will return a consistent value across all installs of that plugin.

This PR is a preview/draft, and comments/suggestions are welcome as this API is scoped out.

@Soreepeong
Copy link
Contributor

The internal DalamudConfiguration should be marked to implementIDalamudConfigReader, so that it is easier to know when removing an option would be a breaking change for pluguns and typos can be caught quicker.

@KazWolfe
Copy link
Member Author

KazWolfe commented Dec 1, 2023

From the discussion in Discord:

I don't necessarily want to bind our internal configs to public API (in case we want to remove something from the config) or limit this service to just configs - this may be an ideal place to expose other (read-only) states in the future.

Similarly, I don't necessarily want to expose the full set of internal configs to plugins. While, yes, plugins can reflect anything they want, I don't necessarily think it's a good idea to provide an easy interface to access the true analytics ID or other configuration options.

@KazWolfe KazWolfe marked this pull request as ready for review April 23, 2024 22:10
@KazWolfe KazWolfe requested a review from a team as a code owner April 23, 2024 22:10
@KazWolfe KazWolfe added enhancement New feature or request plugin-api About or affects the Plugin API needs api bump Held for the next API bump labels Jun 3, 2024
@KazWolfe KazWolfe added this to the Dalamud apiX (API 10) milestone Jun 3, 2024
@KazWolfe KazWolfe changed the base branch from master to apiX June 8, 2024 23:20
KazWolfe added 4 commits June 8, 2024 16:20
New service designed to expose certain Dalamud configs to plugins as read-only.
- New Hash to Base64 for smaller hash values
- New DynamicSettingsEntry to display live text/previews in Settings tabs.
- Default analytics mode to "Ask"
- Should all now be `DalamudSetting*PluginAnalytics*`
@KazWolfe KazWolfe removed the needs api bump Held for the next API bump label Jun 8, 2024
@goaaats goaaats deleted the branch goatcorp:master July 1, 2024 18:48
@goaaats goaaats closed this Jul 1, 2024
@KazWolfe KazWolfe reopened this Jul 1, 2024
@KazWolfe KazWolfe changed the base branch from apiX to master July 1, 2024 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request plugin-api About or affects the Plugin API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants