@iyulab/modern-app 0.33.2 → 0.33.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.33.3] - 2026-10-05
4
+
5
+ ### Fixed
6
+
7
+ - **The sidebar stays on screen while a long screen scrolls.** The shell is now capped at the
8
+ viewport height (`max-height: 100dvh`), so route content always scrolls inside `part="main"`.
9
+ Before, a shell whose parent gave it no height grew to the length of the route content; the
10
+ document scrolled instead of `part="main"`, and the navigation and the sidebar footer scrolled off
11
+ the top with the content (the mobile header too). A parent that gives the shell a height lower
12
+ than the viewport still sets it.
13
+
3
14
  ## [0.33.2] - 2026-10-03
4
15
 
5
16
  ### Changed
@@ -7,6 +7,11 @@ var t = e`
7
7
  flex-direction: row;
8
8
  width: 100%;
9
9
  height: 100%;
10
+ /* 셸은 뷰포트보다 커지지 않는다 — 부모에 높이가 없으면 height: 100% 가 걸릴 곳이 없어 셸이
11
+ 본문 길이로 커지고, 그러면 .main 대신 문서가 스크롤해 사이드바가 본문과 함께 밀려 나간다.
12
+ 상한을 두면 본문은 언제나 .main 안에서 스크롤하고 크롬은 제자리에 있다. 부모가 뷰포트보다
13
+ 낮은 높이를 주면 그 높이가 그대로 이긴다. */
14
+ max-height: 100dvh;
10
15
  font-family: var(--u-font-base);
11
16
  overflow: hidden;
12
17
  }
@@ -225,11 +230,17 @@ var t = e`
225
230
  뷰포트 밖으로 밀어 오른쪽 열이 잘리고 가로 스크롤도 생기지 않는다. */
226
231
  min-height: 0;
227
232
  min-width: 0;
233
+ /* .main 의 높이를 백분율이 아니라 flex 로 준다 — 셸의 높이가 «부모의 확정 높이» 가 아니라
234
+ max-height 상한에서 나올 때 백분율은 풀리지 않는다(auto 로 떨어져 .main 이 본문 길이가 된다).
235
+ 늘어난(stretch) 항목의 크기는 그 경우에도 이 래퍼에 정해진다. */
236
+ display: flex;
237
+ flex-direction: column;
228
238
  }
229
239
 
230
240
  .main {
231
241
  position: relative;
232
- height: 100%;
242
+ flex: 1 1 auto;
243
+ min-height: 0;
233
244
  padding: var(--u-space-3xl, 32px);
234
245
  background: var(--u-bg-color, #FFFFFF);
235
246
  overflow: auto;
@@ -377,6 +388,7 @@ var t = e`
377
388
  :host {
378
389
  display: block;
379
390
  height: auto;
391
+ max-height: none;
380
392
  overflow: visible;
381
393
  }
382
394
  .sidebar,
@@ -385,7 +397,10 @@ var t = e`
385
397
  .main u-progress-bar {
386
398
  display: none;
387
399
  }
400
+ /* block 으로 되돌린다 — flex 컨테이너는 자식의 여백 접힘을 막아, 화면 마지막 블록의 아래
401
+ 여백이 종이 위에서 셸을 뚫고 접히지 못한다. */
388
402
  .main-region {
403
+ display: block;
389
404
  height: auto;
390
405
  }
391
406
  .main {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@iyulab/modern-app",
3
3
  "description": "web-framework by iyulab based on lit-element",
4
- "version": "0.33.2",
4
+ "version": "0.33.3",
5
5
  "keywords": [
6
6
  "iyulab",
7
7
  "web-framework",
@@ -275,7 +275,10 @@ Parts available for `styles` overrides on the root layout:
275
275
  ## Sizing
276
276
 
277
277
  `<u-sidebar-layout>` is a shell: `:host` is `height: 100%` with `overflow: hidden`, so **its
278
- height comes from the parent** — it never sizes itself. `app.load()` covers the default case: when
278
+ height comes from the parent** — it never sizes itself. It is also capped at `max-height: 100dvh`:
279
+ whatever the parent does, the shell is never taller than the viewport, so the route content always
280
+ scrolls inside `part="main"` and the sidebar (navigation and footer) stays on screen. A parent
281
+ shorter than the viewport still wins. `app.load()` covers the default case: when
279
282
  `root` is `document.body` it gives the body `margin: 0`, and on screen `width: 100vw; height: 100vh`.
280
283
  These come from a document stylesheet at zero specificity, not inline styles — any `body { … }`
281
284
  rule of your own wins.
@@ -283,7 +286,8 @@ rule of your own wins.
283
286
  ⚠ **A custom `root` receives no styling.** Hand it a container with no height of its own and
284
287
  `height: 100%` has nothing to resolve against: the shell renders at whatever its own chrome
285
288
  resolves to (measured: about 133px) instead of filling the screen — with no error and nothing in
286
- the console. Give that container a height — for screen only, so printing is not cut at one page:
289
+ the console. (With a long screen the shell grows to the viewport cap instead, so the
290
+ symptom only shows on short screens.) Give that container a height — for screen only, so printing is not cut at one page:
287
291
 
288
292
  ```css
289
293
  @media screen {