You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rewrite comments and docs to drop PR #1749 review-process references
Strip finding IDs (B1, M6, m2, ...), hypothetical-rename stories, and
forward/backward "we used to X, now we Y" narrative from comments and
docs. Replace with descriptions of what the code is and what it does.
Copy file name to clipboardExpand all lines: guides/upgrading/v0.19.md
+12-17Lines changed: 12 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -91,17 +91,16 @@ The `BackpexSidebarSections` hook has been replaced by `BackpexSidebar`, which n
91
91
92
92
This version introduces a unified preference system that eliminates UI flickering. User preferences (theme, sidebar state, column visibility, etc.) are now server-rendered from a configurable storage backend on every request.
93
93
94
-
Backpex ships with a Phoenix-session adapter out of the box (matches the legacy behavior — no action needed). Route individual prefixes to a per-user database adapter when you outgrow the ~4KB cookie ceiling or need preferences to follow a user across devices. See the [User Preferences guide](../live_resource/user-preferences.md) for adapter recipes and the opt-in persistence flag for ordering / filters / columns.
94
+
Backpex ships with a Phoenix-session adapter out of the box, so no action is needed to keep preferences in the session. Route individual prefixes to a per-user database adapter when you outgrow the ~4KB cookie ceiling or need preferences to follow a user across devices. See the [User Preferences guide](../live_resource/user-preferences.md) for adapter recipes and the opt-in persistence flag for ordering / filters / columns.
95
95
96
96
### Preferences: adapter architecture
97
97
98
-
-**Terminology.** What was called "cookie-based preferences" is now just
99
-
"preferences," because storage is pluggable (session, ETS, Ecto, ...). The
100
-
JS property `BackpexPreferences.cookiePath` was renamed to `endpointPath`
101
-
— internal to the hook; no change unless you called it directly.
102
-
-**Default behavior is unchanged.** With no config, every key routes to
103
-
`Backpex.Preferences.Adapters.Session` — identical to the pre-release
104
-
branch. Existing apps keep working.
98
+
-**Terminology.** Storage is pluggable (session, ETS, Ecto, ...), so the
99
+
subsystem is called "preferences" rather than "cookie-based preferences."
100
+
The JS property exposed to hooks is `BackpexPreferences.endpointPath`.
101
+
-**Default behavior.** With no config, every key routes to
102
+
`Backpex.Preferences.Adapters.Session`, so existing apps need no changes
103
+
to keep working.
105
104
-**Route a prefix to your database.** Implement
106
105
`Backpex.Preferences.Adapter` and add the route:
107
106
@@ -116,12 +115,9 @@ Backpex ships with a Phoenix-session adapter out of the box (matches the legacy
116
115
117
116
Full walkthrough (migration + schema + adapter module, two table shapes)
118
117
in the [User Preferences guide](../live_resource/user-preferences.md).
119
-
-**Per-resource module keys encoding changed.** The internal
120
-
`resource.<Module>.<suffix>` key now uses `:` as a separator
121
-
(`resource:<Module>:<suffix>`) so module-name dots don't create
122
-
accidental path segments. Any values persisted under the previous shape
123
-
are effectively invalid and will be ignored — no migration is required
124
-
because the previous shape was only written on this unreleased branch.
118
+
-**Per-resource module keys.** Internal
119
+
`resource:<Module>:<suffix>` keys use `:` as a separator so module-name
120
+
dots don't create accidental path segments.
125
121
-**New `persist:` option on `use Backpex.LiveResource`.** Opt in to
126
122
persisting ordering, filters, or column visibility through the
127
123
preferences layer:
@@ -132,9 +128,8 @@ Backpex ships with a Phoenix-session adapter out of the box (matches the legacy
132
128
persist: [:order, :filters, :columns]
133
129
```
134
130
135
-
Not required, not a breaking change — default is `[]`, which preserves
136
-
Backpex's URL-as-source-of-truth behavior for ordering and filters, and
137
-
in-memory column visibility.
131
+
Not required, not a breaking change — default is `[]`, which keeps
132
+
ordering and filters in the URL and column visibility in-memory.
0 commit comments