feat(code-block): added alwaysShowActionbar attribute (#DS-4721) - #1891
feat(code-block): added alwaysShowActionbar attribute (#DS-4721)#1891artembelik wants to merge 1 commit into
Conversation
|
Visit the preview URL for this PR (updated for commit b7dd1ff): https://koobiq-next--prs-1891-4ofsoq9t.web.app (expires Sun, 16 Aug 2026 13:00:55 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: c9e37e518febda70d0317d07e8ceb35ac43c534c |
There was a problem hiding this comment.
Pull request overview
Adds a new alwaysShowActionbar input to the KbqCodeBlock component so consumers can keep the action panel visible even when tabs are hidden (instead of only showing it on hover). The implementation shifts actionbar visibility to a signal-driven computed state and documents the new behavior across docs and examples.
Changes:
- Introduced
alwaysShowActionbarinput and signal-basedactionbarVisiblecomputation to drive thekbq-code-block_show-actionbarhost class. - Updated docs example(s) to demonstrate the new attribute and signal-based toggling.
- Added/updated unit tests and API guard snapshot to cover and expose the new public API surface.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tools/public_api_guard/components/code-block.api.md | Updates public API snapshot to include alwaysShowActionbar (and the new internal visibility signal member). |
| packages/docs-examples/components/code-block/code-block-with-filled/code-block-with-filled-example.ts | Extends the example UI to toggle alwaysShowActionbar and updates bindings to signal-style reads. |
| packages/components/code-block/code-block.ts | Implements the new input and refactors actionbar visibility logic to a computed signal + host class binding. |
| packages/components/code-block/code-block.spec.ts | Adds unit coverage for always-on actionbar behavior and restoring hover-based behavior when disabled. |
| packages/components/code-block/code-block.ru.md | Documents the updated action panel behavior and the new alwaysShowActionbar attribute (RU). |
| packages/components/code-block/code-block.en.md | Documents the updated action panel behavior and the new alwaysShowActionbar attribute (EN). |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| startWith(this._hideTabs()), | ||
| switchMap((hideTabs) => { | ||
| if (!hideTabs) return EMPTY; | ||
| if (!hideTabs) return of(false); |
There was a problem hiding this comment.
Надо добавить проверку на новое свойство, так как при alwaysShow подписка на охвер тоже не нужна
| if (!hideTabs) return of(false); | |
| if (!hideTabs || !this.alwaysShowActionBar()) return of(false); |
|
|
||
| set hideTabs(value: boolean) { | ||
| this._hideTabs = value; | ||
| this._hideTabs.set(value); |
There was a problem hiding this comment.
мы разве не можем сейчас через hideTabs = false ожидаемое поведение сделать?
There was a problem hiding this comment.
нет, при выключении будет отображение по ховеру, при включении будут видны табы, эти флаги отвечают за разные вещи
No description provided.