structurizr / lite

Structurizr Lite
https://docs.structurizr.com/lite
MIT License
258 stars 31 forks source link

«Hide this introduction» checkbox is not persisted #15

Closed nawok closed 1 year ago

nawok commented 1 year ago

Probably, because of the hardcoded date for the cookie. I can suggest that for such user data the Local Storage might be a better fit.

$('#hideDiagramEditorIntroductionCheckbox').click(function() {
  if ($('#hideDiagramEditorIntroductionCheckbox').is(':checked')) {
    document.cookie = "structurizr.hideDiagramEditorIntroduction=true; expires=31 Dec 2022 23:59:59 UTC; path=/";
  } else {
    document.cookie = "structurizr.hideDiagramEditorIntroduction=; expires=01 Jan 1970 00:00:00 UTC; path=/";
  }
});
simonbrowndotje commented 1 year ago

Are you running the latest version of Lite?

nawok commented 1 year ago

Yes, I am using the latest structurizr/lite Docker image.

nawok commented 1 year ago

Oh, I’m sorry. I did an explicit docker pull structurizr/lite and now I have the latest one with a new date.

Before:

Build: 2881
Built: 2022-12-21T15:08:12Z
structurizr-java: v1.16.1
structurizr-dsl: v1.21.0

After:

Build: 2888
Built: 2023-01-02T13:43:53Z
structurizr-java: v1.16.1
structurizr-dsl: v1.21.0

Thanks for the hint!

I see the actual software and DSL versions didn’t change. Still would be nice to avoid yearly «Cookie-Y2K» :)