Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion demo/symfony8/config/packages/doctrine.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@ doctrine:
is_bundle: false
dir: '%kernel.project_dir%/src/Entity'
prefix: 'App\Entity'
alias: App
4 changes: 4 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Changed

- My open questions: the empty list is one sentence through UiKit's `empty` partial. The page passed the sentence as the empty state's *title*, so UiKit printed its default "No items found." as a second line under it; it is now the message, alone. The dashboard component (`manage/_my_questions.html.twig`) renders its empty list through the same partial instead of a muted paragraph. Texts are unchanged.

## [2.29.1] - 2026-11-21

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion docs/USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -1994,7 +1994,7 @@ tenants the resolver opens to the viewer by key count; every row needs `canViewT
A dashboard includes the same list:

```twig
{{ include('@NowoTaskBoardBundle/manage/_my_questions.html.twig', {limit: 5}) }} {# tab: 'asked' for the other list #}
{{ include('@NowoTaskBoardBundle/manage/_my_questions.html.twig', {limit: 5}) }} {# tab: 'asked' for the other list; an empty list is UiKit's `empty` (one sentence), on the page and in the component #}
```

Twig functions: `nowo_task_board_questions_enabled()`, `nowo_task_board_questions(task)`,
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/TaskQuestionController.php
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ public function mine(Request $request): Response
],
array_slice($rows, ($page - 1) * $perPage, $perPage),
pagination: $total > 0 ? Pagination::fromTotal($total, $page, $perPage, Pagination::ALLOWED_PER_PAGE, $this->perPage, $route, ($tab === TaskQuestionView::TAB_ASKED ? ['tab' => $tab] : []) + ['per_page' => (string) $perPage], $params) : null,
empty: new EmptyState(TaskBoardPages::label('task_board.question.mine.empty.' . $tab)),
empty: new EmptyState(message: TaskBoardPages::label('task_board.question.mine.empty.' . $tab)),
caption: TaskBoardPages::label('task_board.question.mine.title'),
bundle: TaskBoardPages::BUNDLE,
layout: $twig instanceof Environment ? $this->pages->layout($twig) : null,
Expand Down
6 changes: 4 additions & 2 deletions src/Resources/views/manage/_my_questions.html.twig
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{#
Since 2.23.0 (Beacon spec 242): the viewer's open questions as a dashboard component —
{{ include('@NowoTaskBoardBundle/manage/_my_questions.html.twig', {limit: 5}) }}. Variables: limit (default 5), tab
(to_answer | asked, default to_answer). Renders nothing with task_questions.enabled: false.
(to_answer | asked, default to_answer). Renders nothing with task_questions.enabled: false. 2.30: an empty list is
UiKit's `empty` (one sentence).
#}
{% set _b = 'NowoTaskBoardBundle' %}
{% if nowo_task_board_questions_enabled() %}
Expand All @@ -15,7 +16,8 @@
<li class="nowo-task-my-questions__item"><a href="{{ path(nowo_task_board_route('task'), {taskId: question.task.id, _fragment: 'nowo-task-question-' ~ question.id}) }}">{{ question.text }}</a> <span class="{{ nowo_ui_class('muted', _b) }}">{{ question.task.title }}{% if question.dueOn %} · <time datetime="{{ question.dueOn|date('Y-m-d') }}">{{ question.dueOn|date('Y-m-d') }}</time>{% endif %}</span></li>
{% if loop.last %}</ul>{% endif %}
{% else %}
<p class="{{ nowo_ui_class('muted', _b) }}">{{ ('task_board.question.mine.empty.' ~ _tab)|trans({}, _b) }}</p>
{# 2.30: UiKit `empty`, one sentence (no bordered paragraph, no default second line). #}
{{ include(nowo_ui_partial('empty', _b), {empty: {title: null, message: ('task_board.question.mine.empty.' ~ _tab)|trans({}, _b), action: null}, bundle: _b, region: 'empty'}, false) }}
{% endfor %}
<a class="{{ nowo_ui_class('btn_sm', _b) }} {{ nowo_ui_class('btn_link', _b) }}" href="{{ path(nowo_task_board_route('my_questions'), _tab == 'asked' ? {tab: 'asked'} : {}) }}">{{ 'task_board.question.mine.see_all'|trans({}, _b) }}</a>
</div>
Expand Down
5 changes: 5 additions & 0 deletions tests/Functional/Question/TaskQuestionPagesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,11 @@ public function testMyOpenQuestions(): void
$crawler = $this->client->request('GET', '/tools/task-board/questions?tab=asked&per_page=7&page=0');
self::assertResponseIsSuccessful();
self::assertCount(0, $crawler->filter('[data-testid="nowo-task-my-question-row"]'));
// 2.30: the empty list is UiKit's `empty`: one sentence, no default second line.
self::assertCount(1, $crawler->filter('.nowo-ui-empty__message'));
self::assertSame('None of your questions is waiting for an answer.', $crawler->filter('.nowo-ui-empty__message')->text());
self::assertCount(0, $crawler->filter('.nowo-ui-empty__title'));
self::assertStringNotContainsString('No items found', (string) $this->client->getResponse()->getContent());

$this->login($this->owner);
$crawler = $this->client->request('GET', '/tools/task-board/questions?tab=asked');
Expand Down
2 changes: 2 additions & 0 deletions tests/Functional/Question/TaskQuestionPortsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,8 @@ public function testTheViewWithoutASignedInUser(): void
self::assertStringContainsString('nowo-task-question-' . $question->getId(), $html);
$html = $twig->render('@NowoTaskBoardBundle/manage/_my_questions.html.twig', ['tab' => 'asked']);
self::assertStringContainsString('None of your questions is waiting for an answer.', $html);
self::assertStringContainsString('nowo-ui-empty__message', $html, 'The dashboard component empty list is UiKit\'s `empty`.');
self::assertStringNotContainsString('No items found', $html);
self::assertInstanceOf(TaskQuestion::class, $this->manager()->find($question->getId()));
}

Expand Down
6 changes: 6 additions & 0 deletions tests/Unit/DependencyInjection/TaskBoardExtensionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,12 @@ public function testPrependRegistersFrameworkAssetsAndDoctrineMapping(): void

self::assertNotEmpty($container->getExtensionConfig('framework'));
self::assertNotEmpty($container->getExtensionConfig('doctrine'));
// DoctrineBundle 3.4 deprecates the mapping `alias`: no prepended mapping carries one.
foreach ($container->getExtensionConfig('doctrine') as $config) {
foreach ($config['orm']['mappings'] ?? [] as $mapping) {
self::assertArrayNotHasKey('alias', $mapping);
}
}
}

public function testPrependNoOpWithoutOptionalExtensions(): void
Expand Down
Loading