ironmansoftware / issues

Public Issue tracker for Ironman Software products.
https://ironmansoftware.com
31 stars 2 forks source link

$page: does not retain the page variable when you hit F5 #3425

Open Omzig opened 1 week ago

Omzig commented 1 week ago

Version

4.3.0

Severity

Low

Environment

Nested IIS

Steps to Reproduce

when i am on a page, using $page:something, and i press the F5 key my variable goes back to $null

Expected behavior

$page:something is 'bob'

Actual behavior

$page:something is $null

Additional Environment data

No response

Screenshots/Animations

No response

Omzig commented 1 week ago

if i use $session, i can hit refresh and it will remember, however when i open another tab, it is there also, so it would be nice to have $page persist the same was as $session

adamdriscoll commented 1 week ago

This is actually by design. It probably should have a been a different name. This makes it even more interesting: https://github.com/ironmansoftware/issues/issues/2713

What it should have been was something like:

$Session $Tab ($Window?) <- Current $Page implementation. When you get a fresh tab\window it is a new set of variables. $Page - What you are suggesting.

I'm happy to implement something like this but need to think about backwards compatibility. We could also consider a breaking changing v5 with some sort of analyzer that change suggest a code fix.

Omzig commented 1 week ago

This is actually by design. It probably should have a been a different name. This makes it even more interesting: #2713

What it should have been was something like:

$Session $Tab ($Window?) <- Current $Page implementation. When you get a fresh tab\window it is a new set of variables. $Page - What you are suggesting.

I'm happy to implement something like this but need to think about backwards compatibility. We could also consider a breaking changing v5 with some sort of analyzer that change suggest a code fix.

Goal

The new behavior need to allow me to save variables on a tab and not lose them during a refresh. I should be able to open 2 tabs of the same page, and be able to set distinct variables for said tabs.

MikeShepard commented 1 week ago

I drew up a couple of diagrams of current and potential future states: PSU_Cache_Scopes.pdf