Guide on how to use the flags for v4.0.4

35 views
Skip to first unread message

nsms

unread,
Jun 14, 2024, 2:05:27 PM (6 days ago) Jun 14
to Session Buddy Discussion
AS:  Thanks for the latest release!

Hi! A set of flags were introduced with v4.0.4, as it can be seen on:

https://sessionbuddy.com/release-4-0-4/

Flags:

– collection-fetch-count-initial (number of collection tiles to display on app start; default 50, min 50)
– collection-fetch-count-lazy (number of additional collection tiles to fetch on scroll; default 30, min 30)
– collection-fetch-all disables lazy loading if set to true

– history-fetch-count-initial (number of history tiles to display on app start; default 50, min 50)
– history-fetch-count-lazy (number of additional history tiles to fetch on scroll; default 30, min 30)
– history-fetch-all disables lazy loading if set to true



To enable these, for Chrome, click the Session Buddy icon to open its interface, then press F12 to open Dev Tools. Once it's open, head over to the Console tab and paste this into the console:

// Setting the specified flags
localStorage.setItem("nxs.experiment.collection-fetch-count-initial", JSON.stringify(50));
localStorage.setItem("nxs.experiment.collection-fetch-count-lazy", JSON.stringify(30));
localStorage.setItem("nxs.experiment.collection-fetch-all", JSON.stringify(false));
localStorage.setItem("nxs.experiment.history-fetch-count-initial", JSON.stringify(50));
localStorage.setItem("nxs.experiment.history-fetch-count-lazy", JSON.stringify(30));
localStorage.setItem("nxs.experiment.history-fetch-all", JSON.stringify(false));

// Verify setting the specified flags
console.log("collection-fetch-count-initial:", JSON.parse(localStorage.getItem("nxs.experiment.collection-fetch-count-initial")));
console.log("collection-fetch-count-lazy:", JSON.parse(localStorage.getItem("nxs.experiment.collection-fetch-count-lazy")));
console.log("collection-fetch-all:", JSON.parse(localStorage.getItem("nxs.experiment.collection-fetch-all")));
console.log("history-fetch-count-initial:", JSON.parse(localStorage.getItem("nxs.experiment.history-fetch-count-initial")));
console.log("history-fetch-count-lazy:", JSON.parse(localStorage.getItem("nxs.experiment.history-fetch-count-lazy")));
console.log("history-fetch-all:", JSON.parse(localStorage.getItem("nxs.experiment.history-fetch-all")));


Press Enter, then refresh the page by either clicking the reload page icon or by pressing the F5 key.

From my understanding, the flags set above should be the flags with their default values. Please correct me if I'm wrong.

To repeat what it was mentioned for the flags, the numerical value in the parentheses is the minimum value. As for where false is specified in the parentheses, it can be turned into true.

If you want to remove these flags, paste this into the Console while the Session Buddy interface is open:

// Removing the specified flags
localStorage.removeItem("nxs.experiment.collection-fetch-count-initial");
localStorage.removeItem("nxs.experiment.collection-fetch-count-lazy");
localStorage.removeItem("nxs.experiment.collection-fetch-all");
localStorage.removeItem("nxs.experiment.history-fetch-count-initial");
localStorage.removeItem("nxs.experiment.history-fetch-count-lazy");
localStorage.removeItem("nxs.experiment.history-fetch-all");

// Verifying the removal
console.log("collection-fetch-count-initial:", localStorage.getItem("nxs.experiment.collection-fetch-count-initial"));
console.log("collection-fetch-count-lazy:", localStorage.getItem("nxs.experiment.collection-fetch-count-lazy"));
console.log("collection-fetch-all:", localStorage.getItem("nxs.experiment.collection-fetch-all"));
console.log("history-fetch-count-initial:", localStorage.getItem("nxs.experiment.history-fetch-count-initial"));
console.log("history-fetch-count-lazy:", localStorage.getItem("nxs.experiment.history-fetch-count-lazy"));
console.log("history-fetch-all:", localStorage.getItem("nxs.experiment.history-fetch-all"));


Press Enter, then refresh the page by either clicking the reload page icon or by pressing the F5 key.


Reply all
Reply to author
Forward
0 new messages