Closed ribalnasr closed 5 years ago
hi, this is a nice one :)
I can see your use case and it makes total sense to me. I'll have to give a bit more thought as to how we need to handle it in the SDK to resemble what happens in the app as close as possible.
The app works like this:
If we want to stick to this flow, we would need to ensure that the SDK checks the available locales as well as whether the current one is the default or not.
Hi @ribalnasr just letting you know, I haven't forgotten about this issue, I've been travelling and focusing on other features within the app, but I am going to try and make time this week to look at this one.
great to hear! this will be very useful.
(on another note, i'm planing on working soon on some functions for firestore rules to automatically implement the rules from the fl_permissions collection. unless your team already started working on something similar)
That sounds great! I still have an outstanding task to write some documentation around how to do that for Firestore (have a similar article for the Realtime DB), but I haven't gotten to it. Would be great to see your work on this.
Hello! Concerning the rules, please check this issue https://github.com/flamelink/flamelink-js-sdk/issues/86,
As for the initial topic of this thread, any update on this?
Hi @ribalnasr
Apologies that it took me so long to give this attention. I've made some changes in v1.0.0-alpha.22
that will handling adding and updating of content in the SDK to be similar to how it is handled in-app at the moment, namely:
_fl_meta_.fl_id
.entryId
(this was not previously kept)When you get a moment, can you please check this release to see if it works for your needs?
This now works as expected.
hi,
here's my issue for the day :)
i have a case where users can create announcements, and they can add translations to them. so the process goes as follows:
this will add the announcement to her/his announcements list with these buttons for each one: Edit English and Edit Arabic
when the user clicks on Edit Arabic, we change the locale:
settings.setLocale('ar')
and then take the user to a form to update the content.the user will update the form and hit save which will run
in this case the Arabic version was still not present on update, so we get the following warning:
and the new document created in arabic is not related to the english version.
What i expect to happen in this case, is that the newly created document should have an __flmeta\.flid equal to the entryId sent with the content.update(...).