Skip to content

Commit

Permalink
MVP
Browse files Browse the repository at this point in the history
  • Loading branch information
gosteev committed Jan 12, 2025
1 parent c00bbe3 commit 2521d5e
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 31 deletions.
2 changes: 1 addition & 1 deletion Block/Adminhtml/Form/Field/Yesno.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function setInputName(string $value): mixed
}

/**
* Render block HTML
* Render HTML block
*
* @return string
*/
Expand Down
2 changes: 1 addition & 1 deletion Model/ConfigProviderInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
namespace AcidUnit\Admin\Model;

/**
* Exact copy of \Magento\Checkout\Model\ConfigProviderInterface implementation but for Acid modules
* Exact copy of \Magento\Checkout\Model\ConfigProviderInterface implementation but for Acid Unit modules
*/
interface ConfigProviderInterface
{
Expand Down
37 changes: 11 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,16 @@
The README.md file content is generated automatically, see [Magento module README.md](https://github.com/magento/devdocs/wiki/Magento-module-README.md) for more information.
# About

# AcidUnit_Admin module
This is a helper module for [🧪Acid Unit](https://acid.7prism.com/)
<span title="Magento 2">Adobe Commerce</span> extensions to provide
admin panel configuration, menu item and styles.

Admin
There is no need to install it explicitly, it will be pulled up automatically
as a dependency to other packages.

## Installation details
But in case you still have to have it for some reason in your root `composer.json` file,
you can install it with `composer require acid-unit/module-admin` command.

For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html).
# Requirements

## Extensibility

Extension developers can interact with the AcidUnit_Admin module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html).

[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the AcidUnit_Admin module.

### Layouts

The module introduces layout handles in the `view/adminhtml/layout` directory.

For more information about a layout in Magento 2, see the [Layout documentation](https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/layouts/layout-overview.html).

### UI components

You can extend product and category updates using the UI components located in the `view/adminhtml/ui_component` directory.

For information about a UI component in Magento 2, see [Overview of UI components](https://devdocs.magento.com/guides/v2.4/ui_comp_guide/bk-ui_comps.html).

## Additional information

For information about significant changes in patch releases, see [Release information](https://devdocs.magento.com/guides/v2.4/release-notes/bk-release-notes.html).
As long as you have at least `Adobe Commerce 2.4.4` with running `PHP 8.1` or newer,
everything should be fine.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "acid-unit/module-admin",
"version": "0.1.0",
"description": "Admin Magento 2 module",
"version": "0.1.1",
"description": "Admin panel configuration provider for [\uD83E\uDDEAAcid Unit] extensions",
"type": "magento2-module",
"require": {
"php": ">=8.1",
Expand Down
3 changes: 2 additions & 1 deletion etc/adminhtml/menu.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Backend:etc/menu.xsd">
<menu>
<!-- root menu item -->
<add id="AcidUnit_Admin::acid_menu"
title="Acid Unit 🧪"
title="🧪 Acid Unit"
module="AcidUnit_Admin"
sortOrder="90"
resource="AcidUnit_Admin::acid_menu"
Expand Down
6 changes: 6 additions & 0 deletions view/adminhtml/web/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
--section-menu-icon-size: 18px;
}

/* flask icon */
.admin__menu li.item-acid-menu > a:before {
content: '';
background-image: url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0ndXRmLTgnPz4KPCFET0NUWVBFIHN2ZyBQVUJMSUMgJy0vL1czQy8vRFREIFNWRyAxLjEvL0VOJyAnaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3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62%) sepia(1%) saturate(1319%) hue-rotate(357deg) brightness(108%) contrast(90%);
}

/* flask icon on hover */
.admin__menu li.item-acid-menu:hover > a:before {
/* set SVG color to #f7f3eb */
filter: invert(98%) sepia(84%) saturate(360%) hue-rotate(297deg) brightness(105%) contrast(94%);
}

/* separator */
.admin__menu li.item-acid-menu > a:after {
background-color: #736963;
content: '';
Expand All @@ -39,11 +42,13 @@
width: 68%;
}

/* GTM section */
.section-config > .admin__collapsible-block > a#google_google_tag_manager-head {
display: flex;
align-items: center;
}

/* Order for inner elements to have the correct offset */
.section-config > .admin__collapsible-block > a#google_google_tag_manager-head > span:nth-child(1) {
order: 1;
}
Expand All @@ -60,6 +65,7 @@
order: 4;
}

/* GTM section icon */
.section-config > .admin__collapsible-block > a#google_google_tag_manager-head:after {
content: '';
background-image: url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPCEtLSBVcGxvYWRlZCB0bzogU1ZHIFJlcG8sIHd3dy5zdmdyZXBvLmNvbSwgR2VuZXJhdG9yOiBTVkcgUmVwbyBNaXhlciBUb29scyAtLT4KPHN2ZyB3aWR0aD0iODAwcHgiIGhlaWdodD0iODAwcHgiIHZpZXdCb3g9IjAgMCAyNTYgMjU2IiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHByZXNlcnZlQXNwZWN0UmF0aW89InhNaWRZTWlkIj4KICAgIDxnPgogICAgICAgIDxwb2x5Z29uIGZpbGw9IiM4QUI0RjgiIHBvaW50cz0iMTUwLjI2MTgxOCAyNDUuNTE2MzY0IDEwNS44MjU0NTUgMjAyLjE4NTQ1NSAyMDEuMjU4MTgyIDEwNC43MzA5MDkgMjQ3LjI2NTQ1NSAxNDkuODIxODE4Ij4KDTwvcG9seWdvbj4KICAgICAgICA8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