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

Add "collapsibleTitle" field to modal config #2155

Closed
wants to merge 31 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
79cd3ef
:recycle: Change logic of 'getEmbeddedComponentElement'
MadsBuchmann Mar 8, 2022
26055db
:sparkles: Make it possible to toggle condensed title
MadsBuchmann Mar 14, 2022
55e4953
:sparkles: Allow use of list in elementToParentMap
MadsBuchmann Mar 14, 2022
769a53a
:sparkles: Let modal config control title collapse setting
MadsBuchmann Mar 17, 2022
a9d9045
:recycle: Redo getEmbeddedComponentElement to avoid flakey test
MadsBuchmann Mar 17, 2022
6cdb87f
:white_check_mark: Refresh test builder for each test
MadsBuchmann Mar 22, 2022
2836c1f
:bug: Handle warnings when no embedded component is found
MadsBuchmann Mar 23, 2022
ee5b65d
:memo: Add 'collapse title' toggle to modal configurator
MadsBuchmann Mar 23, 2022
8ede6b8
:memo: Add 'collapseTitle' to api documentation
MadsBuchmann Mar 23, 2022
6ca36cd
:memo: Make is possible to display footer as inline
MadsBuchmann Mar 23, 2022
dc1f595
:lipstick: Remove padding & make collapsed title a h3
MadsBuchmann Mar 31, 2022
058d56d
:fire: Remove accidentally left in span element
MadsBuchmann Mar 31, 2022
c1c9ae4
:rotating_light: Run prettier to solve tslint errors
MadsBuchmann Mar 31, 2022
07ea45f
:rotating_light: Fix prettier errors
MadsBuchmann Mar 31, 2022
0a26c3d
:white_check_mark: Add 'no top padding' test for collapsible title
MadsBuchmann Apr 1, 2022
b1b5e7a
:white_check_mark: Add tests checking if title is placed correctly
MadsBuchmann Apr 4, 2022
2a526a3
:recycle: Pass test title as input property
MadsBuchmann Apr 4, 2022
14aad05
Merge branch 'main' into enhancement/843-collapsible-title
MadsBuchmann Apr 4, 2022
d16c9d4
:white_check_mark: Change units to satisfy prettier
MadsBuchmann Apr 4, 2022
a4522ca
Revert ":white_check_mark: Change units to satisfy prettier"
MadsBuchmann Apr 4, 2022
3f0c494
Revert "Merge branch 'main' into enhancement/843-collapsible-title"
MadsBuchmann Apr 4, 2022
f3367fc
:white_check_mark: make test actually check if title is rendered
MadsBuchmann Apr 4, 2022
83fe28f
:white_check_mark: Remove usage of ModalConfig.title
MadsBuchmann Apr 4, 2022
b8aa466
:label: Remove usage of ModalConfig.title
MadsBuchmann Apr 4, 2022
ea2cdbe
:fire: Remove unused title argument from 'openModal'
MadsBuchmann Apr 4, 2022
869ebe0
:fire: Remove 'title' from ModalConfig interface
MadsBuchmann Apr 4, 2022
98639c7
:lipstick: Change font to 'P - bold;
MadsBuchmann Apr 4, 2022
309be7f
:fire: Remove accidentally left in fdescribe
MadsBuchmann Apr 4, 2022
ac57d57
Merge branch 'release/v6.0.0' into enhancement/843-collapsible-title
MadsBuchmann Apr 19, 2022
76284b2
:recycle: Remove unnecessary instatiation of TestBuilder
MadsBuchmann Apr 20, 2022
c7caa33
:recycle: Change 'e' to 'element'
MadsBuchmann Apr 20, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 2 additions & 3 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
/src/kirby/scss/base/_include-media.scss
/.github/
/libs/designsystem/src/lib/components/web-component-proxies.component.ts
/libs/designsystem/src/lib/components/angular-component-lib/**
/libs/core/scss/**
/libs/core/dist/**
/libs/core/loader/**
/libs/core/component-docs.d.ts
/libs/core/component-docs.json
/libs/core/src/components.d.ts
/libs/**/readme.md
/node_modules/
/libs/**/readme.md
13 changes: 1 addition & 12 deletions .stylelintignore
Original file line number Diff line number Diff line change
@@ -1,12 +1 @@
libs/core/scss/**
/.github/
/libs/designsystem/src/lib/components/web-component-proxies.component.ts
/libs/designsystem/src/lib/components/angular-component-lib/**
/libs/core/scss/**
/libs/core/dist/**
/libs/core/loader/**
/libs/core/component-docs.d.ts
/libs/core/component-docs.json
/libs/core/src/components.d.ts
/libs/**/readme.md
/node_modules/
/src/kirby/scss/base/_include-media.scss
3 changes: 2 additions & 1 deletion .stylelintrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"extends": ["stylelint-config-standard-scss", "stylelint-config-prettier-scss"],
"plugins": ["stylelint-prettier"],
"extends": ["stylelint-prettier/recommended"],
"rules": {
"scss/at-mixin-pattern": [
"^(-?_?[a-z][a-z0-9]*)(-[a-z0-9]+)*$",
Expand Down
2 changes: 1 addition & 1 deletion apps/cookbook/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
const { join } = require('path');
const getBaseKarmaConfig = require('../../karma.conf');

module.exports = function (config) {
module.exports = function(config) {
const baseConfig = getBaseKarmaConfig();
config.set({
...baseConfig,
Expand Down
20 changes: 15 additions & 5 deletions apps/cookbook/src/app/accessibility/accessibility-guidelines.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
<h1>Accessibility in Kirby</h1>

<h2>Can Kirby make an application accessible?</h2>
<p>The short answer is no.</p>
<p>
The short answer is no.
</p>
<p>
The accessibility of an application largely depends on its markup. In other words, it depends on
how the components in Kirby are used. The role of the components is to allow for developers to
Expand Down Expand Up @@ -30,7 +32,9 @@ <h2>Can Kirby make an application accessible?</h2>
>exploring new ways of improving your product for everyone</a
>.
</p>
<p>So where do you begin? Our suggestion is to read on!</p>
<p>
So where do you begin? Our suggestion is to read on!
</p>

<h3>Mindset - what is accessibility?</h3>
<p>
Expand All @@ -39,7 +43,9 @@ <h3>Mindset - what is accessibility?</h3>
</p>

<h4>Accessibility is not a feature</h4>
<p>Accessibility is not something that is tagged onto an application like a feature.</p>
<p>
Accessibility is not something that is tagged onto an application like a feature.
</p>
<p>
<strong>All</strong> applications have some degree of accessibility, whether it is considered or
not. If it is not actively prioritized, the accessibility of an application is most likely poor.
Expand Down Expand Up @@ -128,7 +134,9 @@ <h3>Do not be in the way</h3>
allows for accessibility. On the contrary, it is also possible to use them in a lot of
completely inaccessible ways.
</p>
<p>But the components in Kirby should never be in the way of making an application accessible.</p>
<p>
But the components in Kirby should never be in the way of making an application accessible.
</p>
<p>
If a developer ever experiences that a Kirby component causes problems when working with
accessibility; do not hesitate to create an issue in the
Expand Down Expand Up @@ -223,7 +231,9 @@ <h3>Topics for exploration</h3>
<h3>Resources</h3>
<p>
While a11y.coffee has a
<a target="blank" href="https://a11y.coffee/dig-in/"> list of resources </a>
<a target="blank" href="https://a11y.coffee/dig-in/">
list of resources
</a>
to further explore the field of accessibility, we would like to supplement that with some of our
own resources:
</p>
Expand Down
Empty file.
1 change: 1 addition & 0 deletions apps/cookbook/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Component } from '@angular/core';
@Component({
selector: 'cookbook-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss'],
})
export class AppComponent {
title = 'Kirby design system';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

.github-error {
font-style: italic;

ion-icon[name='alert'] {
font-size: 24px;
vertical-align: text-bottom;
Expand Down Expand Up @@ -45,7 +44,6 @@
tr {
&.component {
vertical-align: middle;
border-top: 0.1rem solid utils.get-color('medium');

.component {
ion-icon {
Expand All @@ -68,6 +66,10 @@
}
}

&.component {
border-top: 0.1rem solid utils.get-color('medium');
}

&.subcomponent,
&.enhancement {
vertical-align: middle;
Expand Down Expand Up @@ -99,7 +101,6 @@
&-subcomponent td:first-child {
padding-left: 2rem;
}

ion-icon[name='add-circle'] {
font-size: 16px;
vertical-align: sub;
Expand All @@ -125,7 +126,7 @@
}
}

a[href^='https:\/\/'] ion-icon {
a[href^="https://"] ion-icon {
vertical-align: sub;
font-size: 18px;

Expand All @@ -139,7 +140,6 @@

&.version {
margin-left: 0.5rem;

--ion-color-base: #{utils.get-color('semi-dark')};
--ion-color-contrast: #{utils.get-color('white')};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,7 @@ export class ComponentStatusComponent implements OnInit, OnDestroy {
// https://app.zeplin.io/project/5e1f27f01ffb15bd95efc426/screen/5e46809806041da857a4bf49
// https://app.zeplin.io/styleguide/5e7094006caa6013a71590b8/components?seid=5e466bc4394e31b73d693e4e
// https://app.zeplin.io/styleguide/5e734ec04ee3d6bac20654e2/components?cseid=5fa2b58acbcb0e8512f515ee
const regex =
/(https:\/\/(app\.zeplin|zpl)\.io\/)((project\/[a-z,0-9]{24}\/screen\/[a-z,0-9]{24})|(\b(?!project)[a-z,0-9]{7}\b)|(styleguide\/[a-z,0-9]{24}\/components\?(seid|cseid)\=[a-z,0-9]{24}))/i;
const regex = /(https:\/\/(app\.zeplin|zpl)\.io\/)((project\/[a-z,0-9]{24}\/screen\/[a-z,0-9]{24})|(\b(?!project)[a-z,0-9]{7}\b)|(styleguide\/[a-z,0-9]{24}\/components\?(seid|cseid)\=[a-z,0-9]{24}))/i;
let matches = issue.body.match(regex);
const url = matches ? matches[0] : null;
return url;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,16 @@ cookbook-card-example {
display: inline-block;
width: 257px;
height: 362px;

--kirby-card-background-image: url('/assets/kirby/backgrounds/kirby-card.png');

&.show-background {
--kirby-example-wireframe-color: rgb(255 0 0 / 50%);

--kirby-example-wireframe-color: rgba(255, 0, 0, 0.5);
background-image: var(--kirby-card-background-image);
background-position: -1px -1px;
background-repeat: no-repeat;
background-size: 257px;

&.dim-background {
--kirby-example-wireframe-color: red;

background-image: linear-gradient(rgb(255 255 255 / 50%), rgb(255 255 255 / 50%)),
background-image: linear-gradient(rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.5)),
var(--kirby-card-background-image);

footer kirby-button {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@use 'avatar-examples.shared.scss';
@use '~@kirbydesign/core/src/scss/utils';
@use "~@kirbydesign/core/src/scss/utils";

:host {
padding: utils.size('l');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@use 'sass:map';
@use "sass:map";
@use '~@kirbydesign/core/src/scss/utils';

:host {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@ <h2>Sizes</h2>
*ngFor="let size of buttonSizes"
value="{{ size.value }}"
[attr.selected]="buttonSize === size.value ? true : null"
>{{ size.text }}</option
>
{{ size.text }}
</option>
</select>
</fieldset>

Expand Down Expand Up @@ -97,7 +96,9 @@ <h3>Custom Icon</h3>
<label>Disabled</label>
</div>

<h2>Button with icon and text</h2>
<h2>
Button with icon and text
</h2>
<button kirby-button [size]="buttonSize">
<kirby-icon name="edit"></kirby-icon>
Icon Left
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@use 'sass:map';
@use "sass:map";
@use '~@kirbydesign/core/src/scss/utils';

kirby-card {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
kirby-card {
z-index: 3; // Ensure dropdown opens over configuration checkboxes
overflow: visible; // Ensure dropdown isn't cut off

width: 320px;
margin-bottom: 20px;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ kirby-card.show-size {
&::before {
background-color: #ccc;
color: white;
content: '-'; // "\00a0";
content: '-'; //"\00a0";
font-size: 0.8em;
font-weight: 700;
letter-spacing: 0.1em;
Expand All @@ -45,26 +45,23 @@ kirby-card.show-size {
width: 6em;
border-top-left-radius: 25%;
border-top-right-radius: 25%;
box-shadow: 0 6px 8px rgb(0 0 0 / 30%);
box-shadow: 0px 6px 8px rgba(0, 0, 0, 0.3);
}

--card-small-background-color: #8dabee;
--card-medium-background-color: #d2a2ee;
--card-large-background-color: #d8b280;

--cardSmallBackgroundColor: #8dabee;
--cardMediumBackgroundColor: #d2a2ee;
--cardLargeBackgroundColor: #d8b280;
&[size='<small']::before,
&[size='small']::before {
content: 'SM';
background-color: var(--card-small-background-color);
background-color: var(--cardSmallBackgroundColor);
}

&[size='medium']::before {
content: 'MD';
background-color: var(--card-medium-background-color);
background-color: var(--cardMediumBackgroundColor);
}

&[size='large']::before {
content: 'LG';
background-color: var(--card-large-background-color);
background-color: var(--cardLargeBackgroundColor);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,18 @@
kirby-card {
--kirby-card-background-image: linear-gradient(
0deg,
rgb(255 255 255 / 0%) 0%,
rgb(0 0 0 / 60%) 100%
rgba(255, 255, 255, 0) 0%,
rgba(0, 0, 0, 0.6) 100%
),
url('https://images.unsplash.com/photo-1512917774080-9991f1c4c750');

@include utils.media('>=medium') {
--kirby-card-background-image: linear-gradient(
0deg,
rgb(255 255 255 / 0%) 0%,
rgb(0 0 0 / 40%) 100%
rgba(255, 255, 255, 0) 0%,
rgba(0, 0, 0, 0.4) 100%
),
url('https://images.unsplash.com/photo-1560840067-ddcaeb7831d2');
}

min-height: 300px;
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,29 @@ export class ChartDeprecatedExampleAreasplineComponent {
template = config.template;

data = [
1600.9, 1710.5, 1060.4, 1290.2, 1440.0, 1460.0, 1350.6, 1480.5, 1800.4, 1940.1, 1950.6, 1700.4,
1600.9, 1710.5, 1060.4, 1290.2, 1440.0, 1460.0, 1350.6, 1480.5, 1800.4, 1940.1, 1950.6, 1700.4,
1600.9,
1710.5,
1060.4,
1290.2,
1440.0,
1460.0,
1350.6,
1480.5,
1800.4,
1940.1,
1950.6,
1700.4,
1600.9,
1710.5,
1060.4,
1290.2,
1440.0,
1460.0,
1350.6,
1480.5,
1800.4,
1940.1,
1950.6,
1700.4,
];
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { DesignTokenHelper, ModalController } from '@kirbydesign/designsystem';
const getColor = DesignTokenHelper.getColor;

function colorPoints(selectedYear: string) {
return function () {
return function() {
var series = this.series;
for (var i = 0, ie = series.length; i < ie; ++i) {
var points = series[i].data;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { DesignTokenHelper, ModalController } from '@kirbydesign/designsystem';

const getColor = DesignTokenHelper.getColor;
function colorPoints(selectedIdx) {
return function () {
return function() {
var series = this.series;
for (var i = 0, ie = series.length; i < ie; ++i) {
var points = series[i].data;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@use 'sass:map';
@use "sass:map";
@use '~@kirbydesign/core/src/scss/utils';

$height-measure-width: 80px;
Expand Down Expand Up @@ -54,7 +54,6 @@ kirby-radio::after {
}
}

/* stylelint-disable selector-pseudo-element-no-unknown */
kirby-checkbox ::ng-deep .wrapper,
kirby-radio ::ng-deep .wrapper {
background-color: #f7e0f0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { ThemeColor } from '@kirbydesign/designsystem';
@Component({
selector: 'cookbook-divider-example',
templateUrl: './divider-example.component.html',
styleUrls: ['./divider-example.component.scss'],
})
export class DividerExampleComponent {
@Input() themeColor: ThemeColor = 'white';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ import { Component } from '@angular/core';
@Component({
selector: 'cookbook-empty-state-example',
templateUrl: './empty-state-example.component.html',
styleUrls: ['./empty-state-example.component.scss'],
})
export class EmptyStateExampleComponent {}
Loading