MadStudioRoblox / ProfileService

Universal session-locked savable table API
https://madstudioroblox.github.io/ProfileService/
Apache License 2.0
292 stars 157 forks source link

Profile.onSaved Signal #11

Closed lucasmz-dev closed 3 years ago

lucasmz-dev commented 3 years ago

So, I know as of the moment, that saved signals sound useless, they mostly are. It seems like you're against the idea of having a Signal / Callback which is fired before a auto-save/save happens. I agree with that. However, I would like one to have as a after-save signal. It can be useful for data-saved notifications and etc.

There are some problems by having a indicator for the player for when their data is auto-saved, like them trying to throttle a profile by leaving as it was saved, but most of the time that's harmless anyway, and it's a developer's choice. I think it would be fine. I personally have something like this on a module I made, for debugging.

In this case, I know you would probably use something like Profile:ListenToSaveCompleted() or Profile:ListenToSucessfulSave() or something to stay consistent.

Wizertex commented 3 years ago

Would help with dev products so you can see if data was saved (or check when data from MetaTags appears in MetaTagsLatest) without loops

LM-loleris commented 3 years ago

So, I know as of the moment, that saved signals sound useless, they mostly are. It seems like you're against the idea of having a Signal / Callback which is fired before a auto-save/save happens. I agree with that. However, I would like one to have as a after-save signal. It can be useful for data-saved notifications and etc.

There are some problems by having a indicator for the player for when their data is auto-saved, like them trying to throttle a profile by leaving as it was saved, but most of the time that's harmless anyway, and it's a developer's choice. I think it would be fine. I personally have something like this on a module I made, for debugging.

In this case, I know you would probably use something like Profile:ListenToSaveCompleted() or Profile:ListenToSucessfulSave() or something to stay consistent.

I'm trying to keep the ProfileService method collection tight so it would try not to distract amateur developers with false pre-assumptions on how ProfileService might work. However...

Would help with dev products so you can see if data was saved (or check when data from MetaTags appears in MetaTagsLatest) without loops

This might be a valid suggestion and I'm willing to add a signal Profile.MetaTagsUpdated [ScriptSignal] (meta_tags_latest). This signal would be fired after every finished auto-save.

Wizertex commented 3 years ago

This might be a valid suggestion and I'm willing to add a signal Profile.MetaTagsUpdated [ScriptSignal] (meta_tags_latest). This signal would be fired after every finished auto-save.

Do you have any ETA on that? Don't worry if not, but I just started working on a project so it would be helpful

LM-loleris commented 3 years ago

Profile.MetaTagsUpdated [ScriptSignal] has been added. Thank you for your contribution!

See documentation here: https://madstudioroblox.github.io/ProfileService/api/#profilemetatagsupdated