Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UHF-3810 TODOs #734

Merged
merged 31 commits into from
Aug 14, 2023
Merged
Show file tree
Hide file tree
Changes from 28 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
24b50d8
UHF-3810: Add ticket number to TODO about branding-mobile.js
teroelonen Aug 8, 2023
b151715
UHF-3810: Remove old TODO that is likely not required
teroelonen Aug 8, 2023
25ddde2
UHF-3810: Merge branch 'UHF-X_css_declaration_sorter_fix' of https://…
teroelonen Aug 8, 2023
01e3196
UHF-3810: Add ticket number to TODO about variables not working in hd…
teroelonen Aug 8, 2023
a1c612a
UHF-3810: Add ticket number to TODO about javascript not finding items
teroelonen Aug 8, 2023
6585d9e
UHF-3810: Convert TODO into a regular comment since it can't be turne…
teroelonen Aug 10, 2023
3b48c67
UHF-3810: Merge branch 'main' of https://github.com/City-of-Helsinki/…
teroelonen Aug 10, 2023
6369201
UHF-3810: Add ticket id for comment about ambiguous menu element
teroelonen Aug 10, 2023
ad549ea
UHF-3810: Checked TODO comment about language check. The language che…
teroelonen Aug 10, 2023
cb24921
UHF-3810: Remove old TODO from ResultsList.tsx that was not valid any…
teroelonen Aug 10, 2023
f7e41a6
UHF-3810: Add hds-refactoring related ticket numbers to hds-related T…
teroelonen Aug 10, 2023
2739073
UHF-3810: Add hds-refactoring related ticket number to hds-related TODOs
teroelonen Aug 10, 2023
6633d7b
UHF-3810: Remove two TODO comments that were no longer valid
teroelonen Aug 10, 2023
6ab471a
UHF-3810: Add hds-refactoring related ticket number to hds-related TODO
teroelonen Aug 10, 2023
ec941cc
UHF-3810: Add hds-refactoring related ticket number to hds-related TODO
teroelonen Aug 10, 2023
2a1446f
UHF-3810: Add ticket number to flex-gap mixin TODO
teroelonen Aug 10, 2023
e331ac9
UHF-3810: Add ticket to comment about refactoring the hds-checkbox to…
teroelonen Aug 10, 2023
9aaec78
UHF-3810: Remove old TODO that was not clear
teroelonen Aug 10, 2023
af3fa73
UHF-3810: Add hds-refactoring related ticket numbers to hds-related T…
teroelonen Aug 10, 2023
5ab5f36
UHF-3810: Removed TODOs about component spacing and code with it sinc…
teroelonen Aug 10, 2023
4cb40b9
UHF-3810: Reformatted TODO about focuses/hovers
teroelonen Aug 10, 2023
72e6bd6
UHF-3810: Removed old TODO that wasn't clear
teroelonen Aug 10, 2023
06466e4
UHF-3810: Add ticket id for comment about local tasks not scaling to …
teroelonen Aug 10, 2023
7f85ccc
UHF-3810: Removed TODO comment and selector that was referred in the …
teroelonen Aug 10, 2023
5800727
UHF-3810: Add links to the TODO issues so that they can be viewed easier
teroelonen Aug 10, 2023
0cd642b
UHF-3810: Converted aspect-ratio function to native
teroelonen Aug 11, 2023
cc01f70
UHF-3810: Fix maps being height:0 after aspect-ratio change
teroelonen Aug 11, 2023
c272f8b
UHF-3810: Fix remote video being height:0 after aspect-ratio change
teroelonen Aug 11, 2023
168ed4d
UHF-3810: Updated TODO about header height hardcoding to include tick…
teroelonen Aug 14, 2023
4c670a9
UHF-3810: Updated caniuse version
teroelonen Aug 14, 2023
647ce36
UHF-3810: Removed parenthesis around variables that weren't needed
teroelonen Aug 14, 2023
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
2 changes: 1 addition & 1 deletion dist/css/styles.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion hdbt.libraries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ global-styling:
- hdbt/color-palette
- hdbt/hdbt-icons

# TODO Convert branding mobile to its own library.
# TODO: UHF-8773 Convert branding mobile to its own library (https://helsinkisolutionoffice.atlassian.net/browse/UHF-8773).
global-scripting:
version: 1.x
js:
Expand Down
1 change: 0 additions & 1 deletion hdbt.theme
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ function hdbt_preprocess(&$variables): void {
$variables['#attached']['drupalSettings']['hdbt']['global_menu'] = \Drupal::moduleHandler()
->moduleExists('helfi_navigation');

// @todo Fix this to be independent block as well.
$variables['#attached']['drupalSettings']['hdbt']['search_dropdown'] = \Drupal::moduleHandler()
->moduleExists('helfi_navigation');

Expand Down
2 changes: 1 addition & 1 deletion src/js/accordion/accordion-item.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default class AccordionItem {
this.setHidden();
this.addEventListeners();
// Open accordion element by anchor link.
// TODO: Figure out why javascript cannot find elements at this point.
// TODO: UHF-8775 Figure out why javascript cannot find elements at this point (https://helsinkisolutionoffice.atlassian.net/browse/UHF-8775).
// Possibly due to other timeouts
setTimeout(()=>{
this.handleLinkAnchor();
Expand Down
2 changes: 1 addition & 1 deletion src/js/calculator/helfi_calculator.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class HelfiCalculator {
return index(obj[is[0]], is.slice(1), value);
}

const lang = drupalSettings.path.currentLanguage || 'fi'; // TODO: Is this lang check ok?
const lang = drupalSettings.path.currentLanguage || 'fi';
const translation = this.translations[key] ? this.translations[key][lang] : null;
if (translation) {
return translation.replace(/\$\{.+?\}/g, (match) => {
Expand Down
2 changes: 1 addition & 1 deletion src/js/nav-global/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ const MobilePanel = {
if (!this.toggleButton) {
throw new Error('No toggle button for JS menu.');
}
// TODO Where is this #menu coming from Maybe name it better?
// TODO: UHF-8791 Where is this #menu coming from? Maybe name it better (https://helsinkisolutionoffice.atlassian.net/browse/UHF-8791).
this.menu = document.querySelector('#menu');
if (!this.menu) {
// eslint-disable-next-line no-console
Expand Down
5 changes: 2 additions & 3 deletions src/js/react/apps/school-search/components/ResultsList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ const ResultsList = ({ data, error, isLoading, isValidating, page, updatePage }:
return <LoadingSpinner />;
}

// @todo: Implement no results message
if (!data?.hits?.hits.length || error) {
return (
<div className='react-search__no-results'>
Expand All @@ -46,7 +45,7 @@ const ResultsList = ({ data, error, isLoading, isValidating, page, updatePage }:
<div className='react-search__results-stats'>
<div className='react-search__count-container'>
{!Number.isNaN(total) &&
<>
<>
<span className='react-search__count'>{total}</span>
<span> {Drupal.t('schools', {}, {context: 'School search: results statline'})}</span>
</>
Expand Down Expand Up @@ -86,7 +85,7 @@ const ResultsList = ({ data, error, isLoading, isValidating, page, updatePage }:
updatePage={(e: SyntheticEvent, nextPage: number) => {
e.preventDefault();
updatePage(nextPage);
}}
}}
/>
}
</div>
Expand Down
1 change: 0 additions & 1 deletion src/scss/00_functions/__index.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
@import 'deep-map-merge';
@import 'get';
@import 'aspect-ratio';
@import 'icon';
@import 'unit';
@import 'typography_functions';
5 changes: 0 additions & 5 deletions src/scss/00_functions/_aspect-ratio.scss

This file was deleted.

2 changes: 1 addition & 1 deletion src/scss/02_mixins/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
white-space: nowrap;
}

// TODO: replace with native flex gap once enough users have moved to > ios 14.4
// TODO: UHF-8796 replace with native flex gap once enough users have moved to > ios 14.4 (https://helsinkisolutionoffice.atlassian.net/browse/UHF-8796).
@mixin flex-gap($gap, $parent-base-margin: 0) {
margin-left: $parent-base-margin - $gap * 0.5;
margin-right: $parent-base-margin - $gap * 0.5;
Expand Down
2 changes: 1 addition & 1 deletion src/scss/03_generic/_hds_base.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Notice, this was stipped from hds-core/lib/base.css, as it's not available elsewhere

// TODO: We're not really using these, we should get rid of these as we're most likely overriding these with our own code.
// TODO: UHF-8794 We're not really using these, we should get rid of these as we're most likely overriding these with our own code (https://helsinkisolutionoffice.atlassian.net/browse/UHF-8794).
:root {
--breakpoint-xs: 320px;
--breakpoint-s: 576px;
Expand Down
2 changes: 1 addition & 1 deletion src/scss/05_objects/_button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ input[type='submit'].hds-button {
}

// Content fron HDS button.css ends
// TODO: Refactor hds-button.
// TODO: UHF-8793 Refactor hds-button (https://helsinkisolutionoffice.atlassian.net/browse/UHF-8793).
// Fix for button margins when using hel-icon.
.hds-button {

Expand Down
2 changes: 1 addition & 1 deletion src/scss/05_objects/icons/_hel-icon.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
background-color: currentColor;
display: inline-block;
height: var(--icon-size, var(--fallback));
mask-image: var(--url); // TODO: add fallback icon when webpack allows it
mask-image: var(--url);
mask-position: center center;
mask-repeat: no-repeat;
vertical-align: text-bottom;
Expand Down
2 changes: 1 addition & 1 deletion src/scss/06_components/forms/_checkbox.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
--focus-outline-color: #{$color-black}; // We should use hdbt color theme instead of hds

> label {
@extend .hds-checkbox__label !optional; // TODO: we should refactor to get rid of this extend
@extend .hds-checkbox__label !optional; // TODO: UHF-8797 we should refactor to get rid of this extend (https://helsinkisolutionoffice.atlassian.net/browse/UHF-8797).
}

.hds-checkbox__input:focus {
Expand Down
2 changes: 0 additions & 2 deletions src/scss/06_components/layout/_component.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
// Margins between components
* ~ .components,
.service__units + .component, // TODO: .service__units should be stripped from extra wrapping divs, so that .component element would be sibling to other components. service page margins were broken otherwise
.unit__services + .component, // TODO: same as above for unit page where accessibility sentences accordion needs this
.component ~ .component {
@include component-margin-top;
}
Expand Down
7 changes: 1 addition & 6 deletions src/scss/06_components/media/_image-placeholder.scss
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
@use "sass:math";

$-placeholder-aspect-ratio: math.div(16, 9);

// TODO: Move under correct component when correct component is done.
.image-placeholder {
aspect-ratio: 16/9;
background-color: var(--hdbt-color-palette--primary);
padding-bottom: aspect-ratio-padding($-placeholder-aspect-ratio);
position: relative;
width: 100%;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,6 @@ $-main-nav-dropdown-padding: $-main-nav-spacing;
transform: rotate(180deg);
}

.menu__item--nolink {
@include font('body'); // TODO: is this whole selector unnecessary?
padding: $spacing-and-half 0;
text-decoration: none;
}

.menu__link-wrapper {
align-items: center;
display: flex;
Expand Down
2 changes: 1 addition & 1 deletion src/scss/06_components/navigation/_local-tasks.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.local-tasks__wrapper {
// TODO: Local tasks are hidden in smaller devices since the design doesn't scale.
// TODO: UHF-8798 Local tasks are hidden in smaller devices since the design doesn't scale (https://helsinkisolutionoffice.atlassian.net/browse/UHF-8798).
display: none;

@include breakpoint($breakpoint-m) {
Expand Down
3 changes: 1 addition & 2 deletions src/scss/06_components/navigation/_table-of-contents.scss
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@
position: relative;
text-decoration: underline;

// TODO: Unify focuses/hovers and other link styles once UHF-643 is being
// developed. https://helsinkisolutionoffice.atlassian.net/browse/UHF-643
// TODO: UHF-643 Unify focuses/hovers and other link styles (https://helsinkisolutionoffice.atlassian.net/browse/UHF-643).
&:focus {
outline: none;

Expand Down
9 changes: 1 addition & 8 deletions src/scss/06_components/pages/_news-page.scss
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
@use 'sass:math';

// Fix sidebar width when there are only short news titles
// TODO: REGIONS Clean this up with other region things
$-card-teaser-img-aspect-ratio: math.div(3, 2);
$-card-teaser-min-width: 280px;

.page-type--news-item .sidebar-first {
display: block;
}
Expand Down Expand Up @@ -278,7 +271,7 @@ $-card-teaser-min-width: 280px;
}

.image-placeholder {
padding-bottom: aspect-ratio-padding($-card-teaser-img-aspect-ratio);
aspect-ratio: 3/2;
}

.news-listing__text-container {
Expand Down
4 changes: 2 additions & 2 deletions src/scss/06_components/paragraphs/_content-liftup.scss
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ $-info-row-icon-size: $spacing-and-half;
}

.content-liftup__image .image-placeholder {
padding-bottom: aspect-ratio-padding($-content-liftup-aspect-ratio-mobile);
aspect-ratio: ($-content-liftup-aspect-ratio-mobile);
teroelonen marked this conversation as resolved.
Show resolved Hide resolved

@include breakpoint($breakpoint-m) {
padding-bottom: aspect-ratio-padding($-content-liftup-aspect-ratio-desktop);
aspect-ratio: ($-content-liftup-aspect-ratio-desktop);
teroelonen marked this conversation as resolved.
Show resolved Hide resolved
}

@include breakpoint($breakpoint-l) {
Expand Down
10 changes: 2 additions & 8 deletions src/scss/06_components/paragraphs/_map.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
@use 'sass:math';

$-map-aspect-ratio-desktop: math.div(16, 9);
$-map-aspect-ratio-mobile: 1;

.component--map {
background-color: $color-silver-light;
}
Expand Down Expand Up @@ -45,12 +40,11 @@ $-map-aspect-ratio-mobile: 1;
position: relative;

.responsive-map-container {
height: 0;
padding-bottom: aspect-ratio-padding($-map-aspect-ratio-mobile);
aspect-ratio: 1;
position: relative;

@include breakpoint($breakpoint-s) {
padding-bottom: aspect-ratio-padding($-map-aspect-ratio-desktop);
aspect-ratio: 16/9;
}
}

Expand Down
7 changes: 1 addition & 6 deletions src/scss/06_components/paragraphs/_remote-video.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
@use "sass:math";

$-video-aspect-ratio: math.div(16, 9);

.component--remote-video {
@include hds-button-colors-on-dark-bg;
@include component-side-padding;
Expand Down Expand Up @@ -34,10 +30,9 @@ $-video-aspect-ratio: math.div(16, 9);
position: relative;

.responsive-video-container {
aspect-ratio: 16/9;
background-color: $color-black-10; // Add color to show a "placeholder" while the video is loading.
height: 0;
overflow: hidden;
padding-bottom: aspect-ratio-padding($-video-aspect-ratio);

iframe {
border: 0;
Expand Down
2 changes: 1 addition & 1 deletion src/scss/_hds.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// This file includes Helsinki Design System core packages.
// These contents have been stripped to bare minimum that we use.

// TODO: We should clean all these codes and move them to our own codebase
// TODO: UHF-8792 We need improve this integration so that it is easier to keep up-to-date (https://helsinkisolutionoffice.atlassian.net/browse/UHF-8792).

// Rows below strip only used bits from @import 'xx_external/hds-core/lib/components/all.min.css';

Expand Down
10 changes: 5 additions & 5 deletions src/scss/environment-indicator.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
.toolbar .toolbar-menu,
.toolbar-horizontal .toolbar-tray .toolbar-menu-administration > ul > .menu-item--expanded,
.toolbar-lining {
// TODO: Get spacing variable to work in hdbt_admin as well
// TODO: UHF-8774 Get spacing variable to work in hdbt_admin as well (https://helsinkisolutionoffice.atlassian.net/browse/UHF-8774).
box-shadow: inset 0 -8px 0 var(--bg);
}

Expand All @@ -24,16 +24,16 @@
color: var(--color);
content: var(--name);
display: block;
font-size: 14px; // TODO: Get fontsize variable to work in hdbt_admin as well
line-height: 1.5; // TODO: Get lineheight variable to work in hdbt_admin as well
padding: 4px 16px; // TODO: Get spacing variable to work in hdbt_admin as well
font-size: 14px; // TODO: UHF-8774 Get fontsize variable to work in hdbt_admin as well (https://helsinkisolutionoffice.atlassian.net/browse/UHF-8774).
line-height: 1.5; // TODO: UHF-8774 Get lineheight variable to work in hdbt_admin as well (https://helsinkisolutionoffice.atlassian.net/browse/UHF-8774).
padding: 4px 16px; // TODO: UHF-8774 Get spacing variable to work in hdbt_admin as well (https://helsinkisolutionoffice.atlassian.net/browse/UHF-8774).
z-index: 3;
}

.toolbar-tray-horizontal .toolbar-lining::after {
position: absolute;
right: 0;
top: 24px; // TODO: Get spacing variable to work in hdbt_admin as well
top: 24px; // TODO: UHF-8774 Get spacing variable to work in hdbt_admin as well (https://helsinkisolutionoffice.atlassian.net/browse/UHF-8774).
}

.env-local {
Expand Down
2 changes: 1 addition & 1 deletion src/scss/styles.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// This file includes all imports

// TODO: hds content should be cleaned
// TODO: UHF-8792 The current hds integration of styles needs improving (https://helsinkisolutionoffice.atlassian.net/browse/UHF-8792).
@import 'hds';

// Breakpoint helpers
Expand Down
4 changes: 0 additions & 4 deletions templates/content/node--teaser.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,6 @@
* is an administrator.
*
* @see template_preprocess_node()
*
* @todo Remove the id attribute (or make it a class), because if that gets
* rendered twice on a page this is invalid CSS for example: two lists
* in different view modes.
*/
#}

Expand Down
4 changes: 0 additions & 4 deletions templates/content/node.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,6 @@
* is an administrator.
*
* @see template_preprocess_node()
*
* @todo Remove the id attribute (or make it a class), because if that gets
* rendered twice on a page this is invalid CSS for example: two lists
* in different view modes.
*/
#}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<head>
<css-placeholder token="{{ placeholder_token }}">
</head>
{# TODO: Fix "right: -15px" once embedded video is returned without scrollbars. #}
{# The "right: -15px" is added to the video because it is returned with scrollbars. Once they are removed this can also be removed. #}
<body style="margin: 0; height: 100%; left: 0; right: -15px; position: absolute; top: 0; width: auto; overflow: hidden;">
{{ media|raw }}
</body>
Expand Down
2 changes: 1 addition & 1 deletion templates/navigation/link-button.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* open_in_a_new_window: true,
* } %}
*
* TODO: Refactor hds-button.
* TODO: UHF-8793 Refactor hds-button (https://helsinkisolutionoffice.atlassian.net/browse/UHF-8793).
*/
#}

Expand Down
6 changes: 3 additions & 3 deletions webpack.svgToSprite.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class svgToSprite {
// SVG to CSS.
// Create styles for the icons.
compiler.hooks.emit.tapAsync('svgToCss', (compilation, callback) => {
let useOldClass = true; // TODO: Remove once hdbt-icon class has been removed.
let useOldClass = true; // TODO: UHF-8792 If sensible lets try to get rid of the hdbt-icon class. If that can be done, remove this (https://helsinkisolutionoffice.atlassian.net/browse/UHF-8792).

// Create --hel-icon--{icon name} CSS variables.
let cssVariables = [];
Expand All @@ -112,7 +112,7 @@ class svgToSprite {
let name = filename.split('.');
cssClasses += `.${this.iconClass}-icon--${name[0]}{--url:var(--${this.iconClass}-icon--${name[0]})}`;

// TODO: Remove once hdbt-icon class has been removed.
// TODO: UHF-8792 If sensible lets try to get rid of the hdbt-icon class. If that can be done, remove this (https://helsinkisolutionoffice.atlassian.net/browse/UHF-8792).
if (useOldClass) {
cssClasses += `.hdbt-icon--${name[0]}{--url:var(--${this.iconClass}-icon--${name[0]})}`;
}
Expand All @@ -126,7 +126,7 @@ class svgToSprite {
`mask-image:var(--url)` +
`}`;

// TODO: Remove once hdbt-icon class has been removed.
// TODO: UHF-8792 If sensible lets try to get rid of the hdbt-icon class. If that can be done, remove this (https://helsinkisolutionoffice.atlassian.net/browse/UHF-8792).
if (useOldClass) {
hdbtIconUrl += `.hdbt-icon::before{` +
`-webkit-mask-image:var(--url);` +
Expand Down