Cleaned and refactored app buttons #269
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello all,
Description
This pull request introduces the first approach to refactoring the app buttons. The objective is to unify the HTML and CSS code throughout the app. In order to achieve this, a new CSS class,
wazuh-button
, was created in order to store the customizations from the original AngularJS Material.This work involves removing old CSS classes and styles, who were creating incompatibilities not only between the different buttons but also with different components such as the navbar. Now we have less CSS code with the same effect as before, and with unified buttons.
Example screenshots
Description of new HTML code
In order to prevent the same HTML code when new buttons are added to the app, I'll show an example HTML code describing the structure:
Important things:
div
element helps to organize the button on the layout. Not all the buttons have this structure, and more future work will be needed to clean this. The flex attribute defines the width, which is better than define a custom CSS class with hard-coded pixel width.wazuh-button md-raised md-primary
classes are mandatory in every new button. Some buttons have one more class defining some custom width or height, but in the future, this should be removed too.fa-fw
class to align the icon with the text, and not use other classes, (exceptfa
andfa-<icon_name>
).aria-label
is mandatory, no button shouldn't miss this attribute. This should describe the button and its action (for example, "Decoders table button").Hoping this likes, any feedback or suggestions are welcome.
Regards,
Juanjo