okay, thanks Keith- yes, I imagine it will take a while to get caught up for such a powerful tool. When you say “reference the values you need”, does that mean that the values have to be stored in Floppy somehow? I tried referencing bubble things but they don’t seem to get recognised.
TWO QUICK THINGS: (1) I made a new video talking about Floppy’s RAM List and showing how we might take a common Bubble design pattern (moving items from one list to another) and “Floppy-ize” it. Along the way, I also discovered a little Floppy bug, so I fixed that (not in the live video) and have pushed update 1.6.3 to Floppy!
So, (2) if you’re already a Floppy user (thank you, early adopters!) upgrade your Floppy to the latest version! (The bug fixed here is one that relates to the “prohibit duplicates” feature in the “Add RAM List Values” action. )
Here’s the new video (also added to the original post in this thread – I’m going to try and remember to do that with all new videos)… In this one, I say that I’m going to talk about the SHIFT functions, but we don’t quite get there. We’ll do those in the next video… There’s a lot to learn, know and share about Floppy’s RAM List, I guess!
Let’s explore more of Floppy’s features in this new video (also added to the original post in this thread). In this one, I do more app futzing with Floppy, including the Write Any Key action, sort a RAM List by setting it to a sorted version, SHIFT Actions explained (Move, Reverse, Swap, Rotate), and how to make a Repeating Group drag-sortable using the “SORTABLE RG OPTIONS”:
In case you want to jump right to the SHIFT Actions, here’s just the last half of the video above:
UPDATE TIME: Yep, as I’m doing my video demos I am occasionally finding little bugs that I’m fixing as I find them. So, Floppy users, please update your Floppy to new version 1.6.5 which fixes a bug whereby the Remove RAM List Values action wasn’t removing the correct items in certain instances.
@keith are you able to build in a detect offline/online function in to floppy pretty please?? I know there are plugins available, but it would be nice to not have to add another one in
Though note, your hopes of a fully offline app may not be achievable (I mean, Floppy depends on a CDN to load the code for localForage or Dexie, so like how would fully offline mode even work, right?)
Hmm does this work if say a mobile device can’t access mobile data? Just seeing as it only talks about LAN or router.
Obvs user would have to be online at some point to download data to indexedDB, but then should be able to go offline and use the app. Does the code need connection to run or just load first time?
Hey @JohnMark - oh it’s pretty tiny. The Floppy element is about 26 KB minified (Floppy Reader is 7 KB minified). The external libraries that Floppy loads are both small as well (localforage is about 10kb (used in Floppy and Floppy Reader) and sortablejs (used in Floppy) is about 15kb over the wire). It’s not a big deal at all.
In actuality, it’s smaller than List Shifter, even with the libraries. It’s WAY smaller than something like Calendar Grid Pro [which uses the gigantic version of moment with full locales support].
Keep in mind that once a user’s browser hits a page that includes a certain plugin once, it won’t have to reload library dependencies as those are cached. When you see me waiting for page reloads in my video, that’s just Bubble being stingy with shared server time. Most of that waiting is just waiting for Bubble to even start serving you anything.
@gnelson and @equibodyapp - Well, unfortunately, I don’t know a lot about PWA development and especially don’t know about PWA development in Bubble. We’d probably need to hear from folks who have successfully built PWAs in Bubble. (Anyone who has, feel free to chime in.)
What I meant by my previous comments is that I don’t really know how that works in the PWA context. It seems like things such as the CacheStorage API are used and I don’t really know much about those. Could be that Bubble’s own caching is sufficient to create PWAs, but I just don’t really know. (Obviously there are examples of folks having done PWAs by installing the minimum set of stuff one needs to do to get an “install” going.)
Services like Turning your Bubble app into a PWA | Progressier look somewhat promising (and that’s one that explicitly supports Bubble). And of course there’s @gaurav’s https://thebdk.com/ BDK Native Apps and associated plugins (though I don’t fully understand if his stuff enables PWAs though I think it does?).
(What I do know is that plenty of things get cached by the browser – including external scripts – and Bubble caches production plugin code. It’s just with PWAs I don’t really know to what extent all of this stuff is automatic and what needs extra help.)
UPDATE TIME (yes, once again): I just pushed Floppy version 1.6.8, which adds another new element (Floppy Expression Watcher) which I’ll explain in future. This version also adds various code optimizations that aren’t present in earlier versions.
NOTE: In your plugin update menu for Floppy, you’ll see that I occasionally publish versions marked DEBUG VERSION - DO NOT USE). I really mean it – don’t use them – those versions are versions where I’m fixing bugs or they have known bugs and they might do weird things (they also often have all sorts of logging going on and they are not maximally performant).
Although, if you ever see one of those, at the top of the list, you’ll know that there’s a new version of Floppy coming soon.
NEW VIDEO TIME: I also added this to the original post in this thread, but here’s a new educational video about FLOPPY where: ANOTHER new FLOPPY video! We talk about Repeating Groups (and the “computation trap” of Repeating Groups), talk about how to randomly-access values in Floppy’s RAM List and change them, via the “Change RAM List Value(s)” Action, and introduce Floppy’s “List Math” action (which lets you do math operations on all the values in a numeric list:
Great to hear it! Yeah, it’s like a weird little application of the default Bubble plugin behavior. (Changes to plugin fields trigger the element’s Update function. So all the update function does in this case is trigger the Initialized/Updated event again and now you know that — whatever that expression is — it has changed and you can do something.)
Edit: you can optionally publish the results of the expression(s) and use it kind of like a List Shifter/custom state, but if that option is turned off, I don’t even bother to fetch the values cuz there’s no point in it… we just trigger the event, so it can be very very speedy and efficient.
The main intent of this is to enable you to treat Floppy’s RAM List as a live query if you want/need. (Since RAM List is set by a workflow Action, there’s no “automagic” connection to the data source (the RAM List is a COPY of the source items). The data only changes WHEN YOU TELL IT TO. This is what allows us to do things like easily add, remove and change items in the RAM List. But there are likely cases where one want List Shifter-like behavior. Expression Watcher provides that when u need it.