Skip to content

Commit 034f3c4

Browse files
rejasveeckKristjanESPERANTO
authored
[newsfeed] fix header layout issue (#3946)
... fixes #3944 introduced with prettier njk linting --------- Co-authored-by: veeck <[email protected]> Co-authored-by: Kristjan ESPERANTO <[email protected]>
1 parent 9d713ff commit 034f3c4

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ planned for 2026-01-01
3333
- [core] refactor: replace `express-ipfilter` with lightweight custom middleware (#3917) - This fixes security issue [CVE-2023-42282](https://github.com/advisories/GHSA-78xj-cgh5-2h22), which is not very likely to be exploitable in MagicMirror² setups, but still should be fixed.
3434
- fixed the Environment Canada weather URL (#3912) and now converts a windspeed of 'calm' to 0
3535
- fixed problems with daylight-saving-time in weather provider `openmeto` (#3930, #3931)
36+
- [newsfeed] fixed header layout issue introduced with prettier njk linting (#3946)
3637

3738
### Updated
3839

modules/default/newsfeed/newsfeed.njk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
{% if (config.showSourceTitle and item.sourceTitle) or config.showPublishDate %}
4141
<div class="newsfeed-source light small dimmed">
4242
{% if item.sourceTitle and config.showSourceTitle %}
43-
{{ item.sourceTitle }}{% if config.showPublishDate %},{% else %}:{% endif %}
43+
{{ item.sourceTitle }}{% if config.showPublishDate %},&nbsp;{% else %}:{% endif %}
4444
{% endif %}
4545
{% if config.showPublishDate %}{{ item.publishDate }}:{% endif %}
4646
</div>
@@ -63,7 +63,7 @@
6363
{% if (config.showSourceTitle and sourceTitle) or config.showPublishDate %}
6464
<div class="newsfeed-source light small dimmed">
6565
{% if sourceTitle and config.showSourceTitle %}
66-
{{ escapeText(sourceTitle, config.dangerouslyDisableAutoEscaping) }}{% if config.showPublishDate %},{% else %}:{% endif %}
66+
{{ escapeText(sourceTitle, config.dangerouslyDisableAutoEscaping) }}{% if config.showPublishDate %},&nbsp;{% else %}:{% endif %}
6767
{% endif %}
6868
{% if config.showPublishDate %}{{ publishDate }}:{% endif %}
6969
</div>

tests/electron/env_spec.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@ describe("Electron app environment", () => {
1111
});
1212

1313
it("should open browserwindow", async () => {
14-
const module = await helpers.getElement("#module_0_helloworld");
15-
await expect(module.textContent()).resolves.toContain("Test Display Header");
14+
// Wait for module content to be rendered, not just the module wrapper
15+
const moduleContent = await helpers.getElement("#module_0_helloworld .module-content");
16+
await expect(moduleContent.textContent()).resolves.toContain("Test Display Header");
1617
expect(global.electronApp.windows()).toHaveLength(1);
1718
});
1819
});

0 commit comments

Comments
 (0)