Skip to content

Commit

Permalink
UHF-9156: fix merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
j-mys committed Jan 19, 2024
2 parents 9424702 + 94eba37 commit fc20809
Show file tree
Hide file tree
Showing 30 changed files with 244 additions and 158 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,8 @@ drush locale:check && drush locale:update && drush cr
```
And then flush all caches from top left drupal admin menu under "Druplicon".

If the translation are still not showing, make sure that your `/public/sites/default/files/translations` has sufficient permissions.

### I have some php linter errors

You can lint or fix php in instance root's shell
Expand Down
2 changes: 1 addition & 1 deletion dist/css/ckeditor.min.css

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/css/styles.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/js/district-and-project-search.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/js/health-station-search.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/js/job-search.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/js/maternity-and-child-health-clinic-search.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/js/school-search.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions hdbt.libraries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ hyphenopoly:
}

job-search:
version: 1.1
version: 1.2
js:
dist/js/job-search.min.js: {
preprocess: false
Expand All @@ -183,7 +183,7 @@ job-search:
- core/drupal

district-and-project-search:
version: 1.0
version: 1.1
js:
dist/js/district-and-project-search.min.js: {
preprocess: false
Expand Down
6 changes: 6 additions & 0 deletions hdbt.theme
Original file line number Diff line number Diff line change
Expand Up @@ -1293,6 +1293,12 @@ function hdbt_preprocess_views_view(&$variables): void {
if ($variables['view']->id() == 'service_list') {
$variables['is_ajax_request'] = \Drupal::request()->isXmlHttpRequest();
}
if ($variables['view']->id() == 'unit_search' && $variables['view']->args[2] != NULL) {
$variables['results_term_singular'] = $variables['view']->args[2];
}
if ($variables['view']->id() == 'unit_search' && $variables['view']->args[3] != NULL) {
$variables['results_term_plural'] = $variables['view']->args[3];
}
}

/**
Expand Down
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const FormContainer = () => {

const handleTitleChange = ({ target: { value } }: { target: { value: string } }) => setTitle(value);
const accordionInitiallyOpen = !!Object.keys(urlParams).find(param => Object.keys(ComponentMap).includes(param) && urlParams?.[param as keyof URLParams]?.length);
const residentialAreaLabel: string = Drupal.t('Select the residential area from the list', {}, { context: 'District and project search form label' });
const residentialAreaLabel: string = Drupal.t('Residential area', {}, { context: 'District and project search form label' });
const projectThemeLabel: string = Drupal.t('Project theme', {}, { context: 'District and project search form label' });
const projectStageLabel: string = Drupal.t('Project stage', {}, { context: 'District and project search form label' });
const projectTypeLabel: string = Drupal.t('Project type', {}, { context: 'District and project search form label' });
Expand All @@ -70,7 +70,7 @@ const FormContainer = () => {
<TextInput
id="district-or-project-name"
label={Drupal.t('Name of residential area or project', {}, { context: 'District and project search form label' })}
placeholder={Drupal.t('Use a search word such as "Pasila"', {}, { context: 'District and project search form label' })}
placeholder={Drupal.t('For example, Pasila', {}, { context: 'District and project search form label' })}
onChange={handleTitleChange}
value={title}
/>
Expand All @@ -83,7 +83,7 @@ const FormContainer = () => {
onChange={setDistrictFilter}
icon={<IconLocation />}
label={residentialAreaLabel}
placeholder={Drupal.t('Select area', {}, { context: 'District and project search form label' })}
placeholder={Drupal.t('All areas', {}, { context: 'District and project search form label' })}
clearButtonAriaLabel={Drupal.t('Clear @label selection', { '@label': residentialAreaLabel }, { context: 'React search clear selection label' })}
selectedItemRemoveButtonAriaLabel={Drupal.t('Remove item', {}, { context: 'React search remove item aria label' })}
toggleButtonAriaLabel={Drupal.t('Open the combobox', {}, { context: 'React search open dropdown aria label' })}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const options: OptionType[] = [
value: sortOptions.newestFirst,
},
{
label: Drupal.t('Closing date', {}, { context: 'Job search' }),
label: Drupal.t('Closing date first', {}, { context: 'Job search' }),
value: sortOptions.closing,
},
];
Expand All @@ -36,7 +36,7 @@ const ResultsSort = () => {
return (
<Select
className='job-listing-search__sort'
label={Drupal.t('Sort by', {}, { context: 'HELfi Rekry job search' })}
label={Drupal.t('Sort search results', {}, { context: 'HELfi Rekry job search' })}
options={options}
onChange={(option: OptionType) => {
setSort(option);
Expand Down
8 changes: 4 additions & 4 deletions src/js/react/apps/job-search/containers/FormContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,17 +101,17 @@ const FormContainer = () => {
employmentSearchIdMap.get(CustomIds.YOUTH_SUMMER_JOBS) || employmentSearchIdMap.get(CustomIds.COOL_SUMMER_PROJECT);
const showCheckboxes = showContinuous || showInternships || showSummerJobs || showYouthSummerJobs;

const areaFilterLabel: string = Drupal.t('Job location', {}, { context: 'Job search: Job location label'});
const areaFilterLabel: string = Drupal.t('Job location', {}, { context: 'Job search: Job location label' });
const taskAreasLabel: string = Drupal.t('Task area', {}, { context: 'Task areas filter label' });
const employmentRelationshipLabel: string = Drupal.t('Type of employment relationship', {}, { context: 'Employment filter label' });
const employmentRelationshipLabel: string = Drupal.t('Type of employment', {}, { context: 'Employment filter label' });
const languageLabel: string = Drupal.t('Language', {}, { context: 'Language filter label' });

return (
<form className='job-search-form' onSubmit={handleSubmit} action={formAction}>
<TextInput
className='job-search-form__filter'
id={SearchComponents.KEYWORD}
label={Drupal.t('Keyword', { context: 'Search keyword label' })}
label={Drupal.t('Search term', {}, { context: 'Search keyword label' })}
name={SearchComponents.KEYWORD}
onChange={handleKeywordChange}
value={keyword}
Expand Down Expand Up @@ -154,7 +154,7 @@ const FormContainer = () => {
{ context: 'Job search remove item aria label' }
)}
placeholder={Drupal.t(
'All employment relationship options',
'All types of employment',
{},
{ context: 'Employment filter placeholder' }
)}
Expand Down
2 changes: 1 addition & 1 deletion src/js/react/common/ResultsMap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const ResultsMap = ({ ids }: ResultsMapProps) => {
</iframe>
</div>
<div className='unit-search__map-actions'>
<ExternalLink href={mapUrl} title={<span>{Drupal.t('Open large version of the map')}</span>} />
<ExternalLink href={mapUrl} title={<span>{Drupal.t('Open large version of the map', {}, {context: 'React search: result display'})}</span>} />
</div>
</div>
);
Expand Down
5 changes: 5 additions & 0 deletions src/scss/04_elements/_typography.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ h5,
h6 {
margin-bottom: 0;
margin-top: $spacing-triple;

// Editors started using strong inside headings, but this is not wanted. This should disable the effect and discourage adding them.
strong {
font-weight: inherit;
}
}

// h1 hyphenation is handled separately
Expand Down
4 changes: 4 additions & 0 deletions src/scss/06_components/block/_social-media.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
list-style: none;
text-decoration: none;

.link__type {
display: none; // Hide link type for social media links.
}

.hel-icon {
--icon-size: #{$spacing-double};
}
Expand Down
39 changes: 5 additions & 34 deletions src/scss/06_components/navigation/_tabs.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,48 +5,19 @@
.tab {
background: transparent;
border: none;
padding: 0;
text-decoration: underline;
display: inline-block;
padding: $spacing;
text-decoration: none;

&[aria-selected='true'] {
font-weight: $font-weight-bold;
border-bottom: $spacing-quarter solid $color-black-90;
}

&:hover {
cursor: pointer;
text-decoration: none;
}
}

.tab--map {
&::before {
@include pseudo-icon('map', 20px);
margin-right: $spacing-half;
}
}

.tab--list {
&::before {
@include pseudo-icon('menu-hamburger', 20px);
margin-right: $spacing-half;
}
}

.tabs--unit-search {
margin-bottom: $spacing-double;
margin-top: $spacing-and-half;

@include breakpoint($breakpoint-m) {
margin-bottom: 0;
margin-top: 0;
}

.tab {
display: block;

&[aria-selected='true'] {
display: none;
font-weight: $font-weight-regular;
}
}
margin-top: $spacing-three-quarters;
}
7 changes: 5 additions & 2 deletions src/scss/06_components/paragraphs/_liftup-with-image.scss
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,9 @@ $breakpoint-design-image-on-left-right: 830px;
color: var(--hdbt-color-palette-text--secondary);
}

a,
a.link {
// Set normal links to same as text color (but not button links)
a:not(.hds-button, [data-hds-component='button']),
a:not(.hds-button, [data-hds-component='button']).link {
color: var(--hdbt-color-palette-text--secondary);
}

Expand Down Expand Up @@ -189,6 +190,7 @@ $breakpoint-design-image-on-left-right: 830px;
@include breakpoint($breakpoint-design-image-on-left-right) {
// Same line-height as the one used in the caption.
--line-height: 1.5;

// Line-height of the caption + spacing above the caption + spacing under the caption.
padding-bottom: calc((var(--line-height) * 1rem) + $spacing + $spacing);
position: relative;
Expand Down Expand Up @@ -300,6 +302,7 @@ $breakpoint-design-image-on-left-right: 830px;
@include breakpoint($breakpoint-l) {
// Same line-height as the one used in the caption.
--line-height: 1.5;

// Line-height of the caption + spacing above the caption + spacing under the caption.
padding-bottom: calc((var(--line-height) * 1rem) + $spacing + $spacing);
position: relative;
Expand Down
20 changes: 10 additions & 10 deletions src/scss/06_components/paragraphs/_react-search.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,16 @@

// Override some fieldset default styles here
.hdbt-search--react__fieldset {
@include breakpoint($breakpoint-l) {
display: flex;
}

border: none;
margin-bottom: $spacing-double;
padding-bottom: 0;
padding-left: 0;
padding-right: 0;
padding-top: 0;

@include breakpoint($breakpoint-l) {
display: flex;
}
}

.hdbt-search--react__legend {
Expand All @@ -58,23 +58,23 @@ fieldset .hdbt-search--react__checkbox:not(:first-of-type) {
}

.hdbt-search--react__result-top-area {
margin-bottom: $spacing;

@include breakpoint($breakpoint-l) {
display: flex;
justify-content: space-between;
}

margin-bottom: $spacing;
}

.hdbt-search--react__results--title {
@include breakpoint($breakpoint-l) {
margin-bottom: 0;
}

align-items: center;
display: flex;
margin-bottom: $spacing-three-quarters;
margin-top: 0;

@include breakpoint($breakpoint-l) {
margin-bottom: 0;
}
}

.hdbt-search--react__results--tablist {
Expand Down
30 changes: 10 additions & 20 deletions src/scss/06_components/paragraphs/_unit-search.scss
Original file line number Diff line number Diff line change
Expand Up @@ -86,22 +86,24 @@
}

.unit-search__results {
border-top: 1px solid $color-black-10;
display: block;
margin-top: $spacing-double;
padding-top: $spacing-double;
margin-top: $spacing-triple;
width: 100%;

@include breakpoint($breakpoint-m) {
margin-top: $spacing-quadruple;
padding-top: $spacing-quadruple;
}

> .views-row + .views-row {
margin-top: $spacing;
}
}

.unit-search__count-container {
margin-top: 0;

&:focus {
outline: 3px solid $color-black;
outline-offset: 2px;
}
}

.unit-search__result-actions {
@include breakpoint($breakpoint-m) {
align-items: center;
Expand All @@ -110,14 +112,6 @@
}
}

.unit-search__count-container {
@include font('lead');

.unit-search__count {
font-weight: $font-weight-bold;
}
}

.unit-search__additional-information {
@include font('body');
display: block;
Expand Down Expand Up @@ -146,10 +140,6 @@
.unit-search__result--list,
.unit-search__result--map {
margin-top: $spacing;

@include breakpoint($breakpoint-m) {
margin-top: $spacing-double;
}
}

.unit-search__result--map {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
card_title: entity.label,
card_url: service_url,
card_description: content.description,
card_description_html: true,
card_tags: content.errand_services[0]['#items'],
} %}
{% endembed %}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{% include '@hdbt/module/helfi_tpr/tpr-unit--minimal.html.twig' %}
Loading

0 comments on commit fc20809

Please sign in to comment.