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

Attempt to improve gui design #434

Merged
merged 63 commits into from
Dec 13, 2023
Merged
Show file tree
Hide file tree
Changes from 59 commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
46d5f70
wip run test page
hannaeko Aug 22, 2023
c5870c2
update ns and ds new row behaviour
hannaeko Aug 22, 2023
52a9747
fix progress bar
hannaeko Aug 22, 2023
6f5c88b
fix secondary buttons on result page
hannaeko Aug 22, 2023
02d7827
move global style
hannaeko Aug 22, 2023
92c3066
add missing images
hannaeko Aug 22, 2023
ffa67e8
fix contrast and improve result page outline
hannaeko Aug 22, 2023
95145e8
wip result page
hannaeko Aug 22, 2023
522ed39
continue work on result controls
hannaeko Aug 23, 2023
d82aee1
change title types in about section
hannaeko Aug 23, 2023
4f6f626
small wording change
hannaeko Aug 23, 2023
e0ecd10
put faq content inside angular app
hannaeko Aug 23, 2023
8cec45f
fix unknown test making templating crash
hannaeko Aug 23, 2023
c6d6790
change default font
hannaeko Aug 24, 2023
b6f3d08
improve footer
hannaeko Aug 24, 2023
c52ea97
improve run domain form
hannaeko Aug 24, 2023
bd1f8ab
finish faq behaviour
hannaeko Aug 24, 2023
f97eb67
small tweaks
hannaeko Aug 24, 2023
778952d
Revert change default font, this need more thoughts
hannaeko Aug 24, 2023
be8422b
keep default font
hannaeko Aug 24, 2023
6ddae89
fix program version trigger with keyboard navigation
hannaeko Aug 24, 2023
b9ee465
tweak margins
hannaeko Aug 24, 2023
04c1c35
fix message banner
hannaeko Aug 24, 2023
b2e0ea4
Update Crowdin configuration file
hannaeko Aug 28, 2023
e3c8a32
fix focus transition duration for advanced switch
hannaeko Aug 28, 2023
7b03f6c
test i18n
hannaeko Aug 28, 2023
aadbd60
update translation source
hannaeko Aug 28, 2023
b2ae3ec
test link localization
hannaeko Aug 28, 2023
53be660
tag string to translate
hannaeko Aug 29, 2023
798e34a
fix i18n strings
hannaeko Aug 29, 2023
1fdc1c6
extract strings
hannaeko Aug 29, 2023
8702d09
some tweaks
hannaeko Aug 29, 2023
adc6d83
try to improve FAQ navigation
hannaeko Aug 29, 2023
cae5609
fix faq
hannaeko Aug 29, 2023
b516218
update some strings in faq
hannaeko Aug 29, 2023
0b6ef46
update french translation
hannaeko Aug 29, 2023
dd13742
i18n extract strings
hannaeko Aug 29, 2023
e34d968
update french translation
hannaeko Aug 29, 2023
7f7bbfb
fix translation
hannaeko Aug 30, 2023
b8b0b16
fix info notice wrapping
hannaeko Aug 30, 2023
4e4e014
adjust buttons colors
hannaeko Aug 30, 2023
9b288bd
tag forgotten strings for translation
hannaeko Aug 30, 2023
dd695f6
update french translation
hannaeko Aug 30, 2023
8ebdd55
add missing space
hannaeko Aug 30, 2023
9c301b1
fix main container not growing
hannaeko Sep 5, 2023
5d7cf87
revert FAQ changes
hannaeko Oct 24, 2023
8e1697d
fix faq heading style
hannaeko Nov 7, 2023
9f8e6d4
fix faq links
hannaeko Nov 7, 2023
8f96111
fix typo in french translation
hannaeko Nov 9, 2023
d28faac
improve form input
hannaeko Nov 23, 2023
c0c4ffe
avoid pixel unit for language icon
hannaeko Nov 23, 2023
60c308a
fix delete button alignment
hannaeko Nov 23, 2023
0194e4e
improve focus outline contrast for filter buttons
hannaeko Nov 27, 2023
a7bdbfd
move submit button and remove switch
hannaeko Nov 27, 2023
e81c51a
remove crowdin config
hannaeko Dec 7, 2023
68ff483
update readme
hannaeko Dec 7, 2023
d1ed139
update default contact address
hannaeko Dec 7, 2023
b2f65a6
remove line under h2
hannaeko Dec 7, 2023
b2b01af
replace article by section
hannaeko Dec 7, 2023
498d48b
update locale files
hannaeko Dec 7, 2023
1001c31
update e2e tests
hannaeko Dec 7, 2023
d06d0dc
update test screenshots
hannaeko Dec 8, 2023
d27b661
revert change of contact address
hannaeko Dec 11, 2023
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
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@ License
This is free software under a 2-clause BSD license. The full text of the license can
be found in the [LICENSE](LICENSE) file included in this respository.

Images `src/assets/images/person_looking_at_computer.svg` and `src/assets/images/world_connected.svg`
are taken from <https://undraw.co>, [full license](https://undraw.co/license).

Comment on lines +113 to +115
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't this text be in the LICENSE file instead?

Copy link
Member Author

@hannaeko hannaeko Dec 12, 2023

Choose a reason for hiding this comment

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

Honestly I don't know. There was already no need to put a mention of the license in the first place.

Is this blocking or can this PR be merged?

Copy link
Contributor

@matsduf matsduf Dec 13, 2023

Choose a reason for hiding this comment

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

Please note that I have approved. I.e. not blocking at all.

Copy link
Member Author

Choose a reason for hiding this comment

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

Okay thanks, I will merge this so I can move on with the other PRs, and if we see the need we can rewrite this section / move it to the license file.


[Backend Configuration]: https://github.com/zonemaster/zonemaster/blob/master/docs/public/configuration/backend.md
[GUI Configuration]: https://github.com/zonemaster/zonemaster/blob/master/docs/public/configuration/gui.md
Expand Down
4 changes: 4 additions & 0 deletions src/app/app.component.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@ app-root {
display: flex;
flex-direction: column;
}

main {
flex-grow: 1;
}
10 changes: 2 additions & 8 deletions src/app/app.component.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
<app-navigation></app-navigation>
<app-message-banner></app-message-banner>
<app-alert></app-alert>
<main>
<main class="container">
<router-outlet></router-outlet>
</main>
<app-footer></app-footer>







4 changes: 1 addition & 3 deletions src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Component } from '@angular/core';
import {ViewEncapsulation} from '@angular/core';
import { ViewEncapsulation } from '@angular/core';

@Component({
selector: 'app-root',
Expand All @@ -10,6 +10,4 @@ import {ViewEncapsulation} from '@angular/core';
encapsulation: ViewEncapsulation.None
})
export class AppComponent {
title = 'app';
}

6 changes: 5 additions & 1 deletion src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ import { FormComponent } from './components/form/form.component';
import { ResultComponent } from './components/result/result.component';
import { HistoryComponent } from './components/history/history.component';
import { AlertComponent } from './components/alert/alert.component';
import { FaqQuestionComponent } from './components/faq-question/faq-question.component';
import { MessageBannerComponent } from './components/message-banner/message-banner.component';

import { RomanizePipe } from './pipes/romanize.pipe';
import { SafeHtmlPipe } from './pipes/safe-html.pipe';
Expand Down Expand Up @@ -60,7 +62,9 @@ const appRoutes: Routes = [
ResultComponent,
HistoryComponent,
AlertComponent,
HeaderComponent
HeaderComponent,
FaqQuestionComponent,
MessageBannerComponent,
],
imports: [
BrowserModule,
Expand Down
3 changes: 1 addition & 2 deletions src/app/components/alert/alert.component.css
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
.alert-area {
z-index: 999;
position: absolute;
margin-top: 80px;
max-width: inherit;
width: 100%;
padding-top: 20px;
padding-top: 1rem;
}

app-alert {
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/alert/alert.component.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="container">
<div class="row alert-area" [ngStyle]="{'margin-top': navHeight + 'px'}">
<div class="container row alert-area">
<div *ngFor="let alert of alerts" class="{{ cssClass(alert) }} alert-dismissible" role="alert">
{{alert.message}}
<button type="button" class="btn-close" (click)="removeAlert(alert)" i18n-title title="Close" i18n-aria-label aria-label="Close"></button>
Expand Down
18 changes: 3 additions & 15 deletions src/app/components/alert/alert.component.ts
Original file line number Diff line number Diff line change
@@ -1,26 +1,22 @@
import { Component, OnInit, OnDestroy} from '@angular/core';
import {ViewEncapsulation} from '@angular/core';
import { Subscription } from 'rxjs';
import { Component, OnInit } from '@angular/core';
import { ViewEncapsulation } from '@angular/core';

import { Alert, AlertType } from '../../models/index';
import { AlertService } from '../../services/alert.service';
import { NavigationService } from '../../services/navigation.service';

@Component({
selector: 'app-alert',
templateUrl: './alert.component.html',
styleUrls: ['./alert.component.css'],
encapsulation: ViewEncapsulation.None
})
export class AlertComponent implements OnInit, OnDestroy {
export class AlertComponent implements OnInit {

alerts: Alert[] = [];
public navHeight: number;
private navHeightSubscription: Subscription;

constructor(
private alertService: AlertService,
private navigationService: NavigationService
) {

}
Expand All @@ -36,14 +32,6 @@ export class AlertComponent implements OnInit, OnDestroy {

setTimeout(() => this.removeAlert(alert), 5000);
});

this.navHeightSubscription = this.navigationService.height.subscribe((newHeight: number) => {
this.navHeight = newHeight;
});
}

ngOnDestroy() {
this.navHeightSubscription.unsubscribe();
}

removeAlert(alert: Alert) {
Expand Down
47 changes: 45 additions & 2 deletions src/app/components/domain/domain.component.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,50 @@
aside.about article {
.about article {
display: flex;
}

aside.about {
.about {
padding: 0;
}

.about .illustration {
background-size: contain;
background-repeat: no-repeat;
background-position: center;
}

.about #home_illustration1 {
background-image: url('assets/images/person_looking_at_computer.svg');
}

.about #home_illustration2 {
background-image: url('assets/images/world_connected.svg');
}

.about article {
display: flex;
gap: 2rem;
}

.about article:not(:last-of-type) {
margin-bottom: 4rem;
}

.about article > * {
flex: 1;
}

@media(max-width:991px) {
.about .illustration {
flex-basis: 30%;
}

.about .about-content {
flex-basis: 70%;
}
}

@media(max-width: 767px) {
.about .illustration {
display: none;
}
}
65 changes: 36 additions & 29 deletions src/app/components/domain/domain.component.html
Original file line number Diff line number Diff line change
@@ -1,42 +1,49 @@
<app-header>
<app-run-test></app-run-test>
<h1 i18n>Check how your domain is doing</h1>
<app-run-test>
<h2 i18n>Test your domain</h2>
</app-run-test>
</app-header>
<aside class="container-fluid about">
<div class="container about">
<article>
<div class="container">
<h4 i18n>About Zonemaster</h4>
<div class="illustration" id="home_illustration1"></div>
<div class="about-content">
<h2 i18n>What is Zonemaster?</h2>
<h3 i18n>
Give your domain name a complete checkup! <strong>Zonemaster helps you assess how your domain
name is doing.</strong>
</h3>
<p i18n>
Give your domain name a complete checkup! Zonemaster helps you assess how your domain
name is doing. Besides, you can also get a better understanding of how the DNS
(Domain Name System) works. When a domain name is sent to Zonemaster for testing,
the program investigates the state of the domain name (sometimes called 'zone')
from top to bottom of the DNS tree. Specifically, this is usually done by
examining DNS data from the root ('.') to the TLD (Top-Level Domain; e.g., '.net')
for that domain name, and then finally through the DNS servers that contain authoritative
information about the specified domain name (e.g., 'zonemaster.net').
Zonemaster performs many tests, such as checking DNSSEC signatures, or that different
hosts can be accessed and that IP addresses are valid. This is all to make sure that
When a domain name is sent to Zonemaster for testing,
Zonemaster investigates the state of the domain name
from the top to the bottom of the DNS tree. This is usually done by
examining DNS data from the root, '.', to the Top-Level Domain (TLD)
for that domain name, like '.net', and then finally through the DNS servers that contain authoritative
information about the specified domain name.
</p>
<p i18n>
<strong>Zonemaster performs many tests</strong>, such as checking DNSSEC signatures, or that different
hosts can be accessed and that IP addresses are valid. This is all to make sure that
your domain name runs as smoothly as possible.
</p>
</div>
</article>

<article class="pt-2">
<div class="container">
<h4 i18n>About the DNS</h4>
<article>
<div class="about-content">
<h2 i18n>A word about the DNS</h2>
<p i18n>
Most people who use the Internet have never reflected on what actually happens
when one types an address in their web browser and then clicks the 'Enter' button.
In short, the DNS (Domain Name System) is a database that associates domain names
to IP (Internet Protocol) addresses, the same way a phone book associates names
to phone numbers. An IP address is a unique series of numbers that identifies every
computer that is connected to the Internet. It is similar to the way every telephone
has its own number in the telephone network. Such long series of numbers work fine
for computers, but for people it is way more difficult to memorize. Thus, the DNS has
been developed as an extra layer to map between names that we can remember better and
IP addresses used by computers whenever we want to reach a specific website or use
other services on the Internet (e.g., mail).
The Domain Name System (DNS) is a database that associates domain names
to Internet Protocol (IP) addresses, the same way a phone book associates names
to phone numbers. An IP address is a unique series of numbers that identifies every
computer that is connected to the Internet. It is similar to the way every telephone
has its own number in the telephone network. Such long series of numbers work fine
for computers, but for people it is way more difficult to memorize. Thus, the DNS has
been developed as an extra layer to map between names that we can remember better and
IP addresses used by computers whenever we want to reach a specific website or use
other services on the Internet, like e-mail.
</p>
</div>
<div class="illustration" id="home_illustration2"></div>
</article>
</aside>
</div>
17 changes: 17 additions & 0 deletions src/app/components/faq-question/faq-question.component.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
.faq-question {
margin-bottom: 1rem;
}

.faq-question h3 {
display: inline;
font-size: 1.2rem;
}

.faq-question header {
padding: 0;
}

.faq-question header a {
padding: .75em;
width: 100%;
}
11 changes: 11 additions & 0 deletions src/app/components/faq-question/faq-question.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<article class="faq-question" id="{{questionId}}" [class.open]="isOpen" #entry>
<header>
<a class="nav-link" routerLink="/faq" fragment="{{questionId}}" [attr.aria-controls]="'faq-entry-' + questionId" [attr.aria-expanded]="isOpen" (click)="toggleOpenEntry()">
<i class="fa fa-chevron-right control" aria-hidden="true"></i>
<h3 #title><ng-content select="[title]"></ng-content></h3>
</a>
</header>
<div class="faq-content" id="faq-entry-{{ questionId }}">
<ng-content></ng-content>
</div>
</article>
61 changes: 61 additions & 0 deletions src/app/components/faq-question/faq-question.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
import { Component, Input, AfterViewInit, OnInit, OnDestroy, ViewChild } from '@angular/core';
import {ViewEncapsulation} from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { Subscription } from 'rxjs';

@Component({
selector: 'app-faq-question',
templateUrl: './faq-question.component.html',
styleUrls: ['./faq-question.component.css'],
encapsulation: ViewEncapsulation.None
})
export class FaqQuestionComponent implements AfterViewInit, OnInit, OnDestroy {
@Input('questionId') questionId;
@ViewChild('entry') entryElement;
public isOpen: boolean = false;
private fragment: string = null;
private fragmentSub: Subscription;
private clicked: boolean = false;

constructor(private router: Router, private route: ActivatedRoute) {
this.fragment = this.router.getCurrentNavigation().extractedUrl.fragment;
this.fragmentSub = route.fragment.subscribe(this.checkQuestionState.bind(this));
}

ngOnInit() {
this.checkQuestionState(this.fragment);
}

ngOnDestroy() {
this.fragmentSub.unsubscribe();
}

ngAfterViewInit(){
if (this.isOpen) {
this.entryElement.nativeElement.scrollIntoView();
}
}

private checkQuestionState(newFragment) {
if (this.clicked) {
this.clicked = false;
} else if (newFragment === this.questionId) {
this.isOpen = true;
if (this.entryElement) {
this.entryElement.nativeElement.scrollIntoView();
}
}
}

public toggleOpenEntry() {
if (!this.isOpen) {
this.router.navigate(['faq'], { fragment: this.questionId, state: { scroll: false } });
} else {
this.router.navigate(['faq']);
}

this.isOpen = !this.isOpen;
this.clicked = true;
}

}
23 changes: 18 additions & 5 deletions src/app/components/faq/faq.component.css
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
.faq span[id^=q] {
position: relative;
top: -90px;
.faq-header .main h1 {
margin-bottom: 2rem;
}

.faq {
overflow-anchor: none;
.faq-description {
max-width: 30rem;
text-align: center;
margin: auto;
font-size: 1.4em;
}

.faq-contact {
max-width: 45rem;
text-align: center;
margin: auto;
margin-top: 1rem;
}

.faq-category:not(:last-of-type) {
margin-bottom: 4rem;
}
Loading
Loading