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

Correct positioning and coloring of button groups in modals #1612

Merged
merged 5 commits into from Apr 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/de/user/repo/assets/repository-code-changeset-with-tag.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/en/user/repo/assets/repository-code-changeset-with-tag.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions gradle/changelog/correct_button_groups.yaml
@@ -0,0 +1,2 @@
- type: fixed
description: Correct positioning and coloring of button groups in modals ([#1612](https://github.com/scm-manager/scm-manager/pull/1612))
39 changes: 34 additions & 5 deletions scm-ui/ui-styles/public/index.html
Expand Up @@ -1238,8 +1238,36 @@ <h4 class="subtitle is-5">Button Addon</h4>
<br>
<h4 class="subtitle is-5">Button Group</h4>
<div class="field is-grouped">
<p class="control"><a class="button is-default">Cancel</a></p>
<p class="control"><a class="button is-primary">Submit</a></p>
<div class="control">
<button type="button" disabled="" class="button is-info">
<span class="icon is-medium"><i class="fas fa-download has-text-inherit"></i></span>
<span>Download Export </span>
</button>
</div>
<div class="control">
<button type="button" class="button is-primary">
<span class="icon is-medium"><i class="fas fa-file-export has-text-inherit"></i></span>
<span>Create new Export </span>
</button>
</div>
</div>

<div class="field is-grouped">
<div class="control">
<span class="tooltip has-tooltip-top" data-tooltip="Switch to side-by-side view">
<a aria-label="Switch to side-by-side view" class="button" style="width: 50px; cursor: pointer;"><i class="fas fa-columns"></i></a>
</span>
</div>
<div class="control">
<span class="tooltip has-tooltip-top" data-tooltip="Open in Fullscreen">
<a class="button" style="width: 50px; cursor: pointer;"><i class="fas fa-search-plus"></i></a>
</span>
</div>
<div class="control">
<span class="tooltip has-tooltip-top" data-tooltip="Jump to source file">
<a aria-label="Jump to source file" class="button" style="width: 50px; cursor: pointer;"><i class="fas fa-file-code has-text-inherit"></i></a>
</span>
</div>
</div>
</div>
<div class="sg-sub-section">
Expand Down Expand Up @@ -1694,7 +1722,7 @@ <h3 class="subtitle is-4">Checkbox</h3>
<label class="checkbox">
<span tabindex="0" class="gwt-Anchor"><i class="is-outlined fa-minus-square has-text-link far"></i> </span>
Indeterminate
</label>
</label>
</div>
</div>
</div>
Expand Down Expand Up @@ -2160,8 +2188,9 @@ <h3 class="subtitle is-4">Modals</h3>
class <code>.modal-card</code> to ensure a constant layout.
</li>
<li>Buttons inside the modals should use the standard button formats.</li>
<li>Normal modals have a gray header. Otherwise the main colors with 25-75% opacity should be used.</li>
<li>If a modal footer contains two action buttons, the critical one should be on the left. In addition, they should differ in color.</li>
<li>Modals without actions do not require a footer.</li>
<li>Normal modals have a gray header. Otherwise the main colors with 25-75% opacity should be used.</li>
</ul>
</div>
<div class="modal-card"
Expand All @@ -2174,7 +2203,7 @@ <h3 class="subtitle is-4">Modals</h3>
<footer class="modal-card-foot">
<div class="field is-grouped">
<p class="control">
<button class="button is-info">Yes</button>
<button class="button is-info is-outlined">Yes</button>
</p>
<p class="control">
<button class="button is-info">No</button>
Expand Down
Expand Up @@ -79,7 +79,7 @@ const CreateTagModal: FC<Props> = ({ repository, changeset, onClose }) => {
validationError={!!validationError}
errorMessage={t(validationError)}
/>
<div className="mt-6">{t("tags.create.hint")}</div>
<div className="mt-5">{t("tags.create.hint")}</div>
</>
);
}
Expand All @@ -91,15 +91,15 @@ const CreateTagModal: FC<Props> = ({ repository, changeset, onClose }) => {
body={body}
footer={
<>
<Button action={onClose}>{t("tags.create.cancel")}</Button>
<Button
color="success"
color="primary"
action={() => create(newTagName)}
loading={isLoadingCreate}
disabled={isLoading || isLoadingCreate || !!validationError || newTagName.length === 0}
>
{t("tags.create.confirm")}
</Button>
<Button action={onClose}>{t("tags.create.cancel")}</Button>
</>
}
closeFunction={onClose}
Expand Down
2 changes: 1 addition & 1 deletion scm-ui/ui-webapp/src/repos/containers/ExportRepository.tsx
Expand Up @@ -158,7 +158,7 @@ const ExportRepository: FC<Props> = ({ repository }) => {
<Level
right={
<ButtonGroup>
<a color="info" href={(exportInfo?._links.download as Link)?.href}>
<a href={(exportInfo?._links.download as Link)?.href}>
<Button
color="info"
disabled={isLoadingInfo || isLoadingExport || !exportInfo?._links.download}
Expand Down