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

1.4.7 #67

Merged
merged 24 commits into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
86f75d6
Fix Image component fallback class output
piqusy Dec 3, 2024
59b0360
Update changelog
piqusy Dec 3, 2024
03288c5
Update version
piqusy Dec 3, 2024
35428ae
Merge pull request #65 from infinum/fix/image-component-class-output
piqusy Dec 3, 2024
53608b5
Update dependencies
piqusy Dec 3, 2024
563b577
Merge pull request #66 from infinum/update/dependencies-1.4.7
piqusy Dec 3, 2024
d85bfc9
Fix Image component responsive output
piqusy Dec 3, 2024
b1d702f
Move $isDesktopFirst conditional of Image component few lines up
piqusy Dec 4, 2024
a32b28a
Merge pull request #68 from infinum/fix/image-component-resposiveness
piqusy Dec 4, 2024
95fce3b
Update changelog
piqusy Dec 4, 2024
ba5a429
Merge pull request #69 from infinum/fix/image-component-resposiveness
piqusy Dec 4, 2024
e4f3a3c
Add "Auto" width to wrapperContent and set is as default
piqusy Dec 5, 2024
1877c1e
Update changelog
piqusy Dec 5, 2024
3407b33
Merge pull request #70 from infinum/feature/wrapper-width---auto
piqusy Dec 5, 2024
53848f7
Add a buttonType attribute to Button component
piqusy Dec 5, 2024
8eb3192
Update changelog
piqusy Dec 5, 2024
cb36884
Set buttonType to empty by default
piqusy Dec 5, 2024
1a56577
Merge pull request #71 from infinum/feature/button-type
piqusy Dec 5, 2024
a29d6ea
Remove an empty manifest default attribute for buttonType
piqusy Dec 5, 2024
3129455
Implement a11y for Icon component
piqusy Dec 5, 2024
54eaac2
Remove labelledby from Icon and set its aria-hidden to be the default
piqusy Dec 6, 2024
f3b2de1
Merge pull request #72 from infinum/feature/a11y-icons
piqusy Dec 6, 2024
cb3a6b1
Update Node dependencies
piqusy Dec 18, 2024
867456e
Merge pull request #73 from infinum/update/node-dependencies-18122024
piqusy Dec 18, 2024
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: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ This projects adheres to [Semantic Versioning](https://semver.org/) and [Keep a
- Fixed Image component "image" part tailwind class output if not set.
- Fix Image component responsive output Co-authored-by: [email protected]
- Add "Auto" width to wrapperContent and set is as defaults
- Add a buttonType attribute to Button component
- Updated dependencies.

## [1.4.6]
Expand Down
5 changes: 5 additions & 0 deletions blocks/init/src/Blocks/components/button/button.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
$additionalClass = $attributes['additionalClass'] ?? '';
$additionalAttributes = $attributes['additionalAttributes'] ?? [];
$buttonId = Helpers::checkAttr('buttonId', $attributes, $manifest);
$buttonType = Helpers::checkAttr('buttonType', $attributes, $manifest);

$buttonUrl = Helpers::checkAttr('buttonUrl', $attributes, $manifest);
$buttonIsNewTab = Helpers::checkAttr('buttonIsNewTab', $attributes, $manifest);
Expand Down Expand Up @@ -59,6 +60,10 @@
$buttonAttrs['class'] = Helpers::tailwindClasses('base', $attributes, $manifest, 'button', $additionalClass);

$buttonTag = !empty($buttonUrl) ? 'a' : 'button';

if (empty($buttonUrl) && !empty($buttonType)) {
$buttonAttrs['type'] = $buttonType;
}
?>

<<?php echo $buttonTag; // phpcs:ignore Eightshift.Security.HelpersEscape.OutputNotEscaped ?>
Expand Down
4 changes: 4 additions & 0 deletions blocks/init/src/Blocks/components/button/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
"buttonId": {
"type": "string"
},
"buttonType": {
"type": "string",
"default": ""

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a need for this "" ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really, could be omitted... pushed a commit

},
"buttonColor": {
"type": "string",
"default": "navy-500"
Expand Down
Loading