Skip to content

Commit

Permalink
Add tooltips (#2407)
Browse files Browse the repository at this point in the history
  • Loading branch information
bastianjoel authored Nov 29, 2023
1 parent 5f03e1b commit 068bf13
Show file tree
Hide file tree
Showing 22 changed files with 73 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
</div>
<div *osScrollingTableCell="'voted'; row as entry; config: { width: 24 }">
<div *osScrollingTableCellLabel>{{ 'Voted' | translate }}</div>
<mat-icon *ngIf="entry.voted">how_to_vote</mat-icon>
<mat-icon *ngIf="entry.voted" [matTooltip]="'Vote submittet' | translate">how_to_vote</mat-icon>
</div>
</os-list>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { MatLegacyInputModule as MatInputModule } from '@angular/material/legacy
import { MatLegacyProgressBarModule as MatProgressBarModule } from '@angular/material/legacy-progress-bar';
import { MatLegacySelectModule as MatSelectModule } from '@angular/material/legacy-select';
import { MatRadioModule } from '@angular/material/radio';
import { MatTooltipModule } from '@angular/material/tooltip';
import { NgChartsModule } from 'ng2-charts';
import { OpenSlidesTranslationModule } from 'src/app/site/modules/translations';
import { DirectivesModule } from 'src/app/ui/directives';
Expand Down Expand Up @@ -49,6 +50,7 @@ const COMPONENTS = [
MatCheckboxModule,
MatRadioModule,
ReactiveFormsModule,
MatTooltipModule,
IconContainerModule,
FormsModule,
VotingPrivacyDialogModule,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<os-head-bar
[hasMainButton]="isAllowed('edit') && !!topic"
mainButtonIcon="edit"
[mainActionTooltip]="'Edit topic' | translate"
[nav]="false"
[goBack]="true"
[editMode]="editTopic"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
<os-head-bar [hasMainButton]="canManage" (mainEvent)="onPlusButton()" [multiSelectMode]="isMultiSelect">
<os-head-bar
[hasMainButton]="canManage"
[mainActionTooltip]="'Create new topic' | translate"
(mainEvent)="onPlusButton()"
[multiSelectMode]="isMultiSelect"
>
<!-- Title -->
<div class="title-slot">
<h2>{{ 'Agenda' | translate }}</h2>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<os-head-bar
[hasMainButton]="hasPerms('manage') && !!assignment"
mainButtonIcon="edit"
[mainActionTooltip]="'Edit election' | translate"
[nav]="false"
[editMode]="isEditing"
[isSaveButtonEnabled]="assignmentForm.valid"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
<os-head-bar [hasMainButton]="hasMainButton" (mainEvent)="createChatGroup()">
<os-head-bar
[mainActionTooltip]="'Create new chat group' | translate"
[hasMainButton]="hasMainButton"
(mainEvent)="createChatGroup()"
>
<!-- Title -->
<div class="title-slot">
{{ 'Chat' | translate }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
[hasMainButton]="canManage()"
[editMode]="isEditing"
[mainButtonIcon]="'edit'"
[mainActionTooltip]="'Edit home page' | translate"
[isSaveButtonEnabled]="startForm.valid"
(mainEvent)="editStartPage()"
(saveEvent)="saveChanges()"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
<os-head-bar [hasMainButton]="canEdit" [multiSelectMode]="isMultiSelect" (mainEvent)="onMainEvent()">
<os-head-bar
[hasMainButton]="canEdit"
[mainActionTooltip]="'Upload files' | translate"
[multiSelectMode]="isMultiSelect"
(mainEvent)="onMainEvent()"
>
<!-- Title -->
<div class="title-slot">
<h2>{{ 'Files' | translate }}</h2>
Expand All @@ -9,6 +14,7 @@ <h2>{{ 'Files' | translate }}</h2>
<button
type="button"
mat-icon-button
[matTooltip]="'Create new folder' | translate"
(click)="createNewFolder(newFolderDialog)"
*osPerms="permission.mediafileCanManage; and: !isMultiSelect"
>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
<os-head-bar [hasMainButton]="perms.isAllowed('create')" (mainEvent)="onPlusButton()" [multiSelectMode]="isMultiSelect">
<os-head-bar
[hasMainButton]="perms.isAllowed('create')"
[mainActionTooltip]="'Create new motion' | translate"
(mainEvent)="onPlusButton()"
[multiSelectMode]="isMultiSelect"
>
<!-- Title -->
<div class="title-slot">
<h2>{{ 'Motions' | translate }}</h2>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<os-head-bar
[hasMainButton]="isAllowed('changePersonal') && !!user"
mainButtonIcon="edit"
[mainActionTooltip]="'Edit participant' | translate"
[nav]="false"
[goBack]="!isAllowed('seeOtherUsers')"
[editMode]="isEditingSubject.value"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
[nav]="false"
[hasMainButton]="canManage()"
mainButtonIcon="edit"
[mainActionTooltip]="'Edit projector' | translate"
[goBack]="true"
(mainEvent)="editProjector()"
>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
<os-head-bar [nav]="true" [hasMainButton]="canManage" (mainEvent)="createNewProjector(projectorDialog)">
<os-head-bar
[nav]="true"
[hasMainButton]="canManage"
[mainActionTooltip]="'Create new projector' | translate"
(mainEvent)="createNewProjector(projectorDialog)"
>
<!-- Title -->
<div class="title-slot">
<h2>{{ 'Projectors' | translate }}</h2>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<os-head-bar
[hasMainButton]="true"
mainButtonIcon="edit"
[mainActionTooltip]="'Edit account' | translate"
(mainEvent)="editMember()"
[goBack]="false"
[nav]="false"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
<os-head-bar [hasMainButton]="true" (mainEvent)="createNewMember()" [multiSelectMode]="isMultiSelect">
<os-head-bar
[hasMainButton]="true"
[mainActionTooltip]="'Create new account' | translate"
(mainEvent)="createNewMember()"
[multiSelectMode]="isMultiSelect"
>
<!-- Title -->
<div class="title-slot">
<h2>{{ 'Accounts' | translate }}</h2>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
[customMenu]="true"
[nav]="false"
[hasMainButton]="canManageMeetingsInCommittee"
[mainActionTooltip]="'Create new meeting' | translate"
(mainEvent)="onCreateMeeting()"
>
<!-- Title -->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<os-head-bar
[hasMainButton]="operator.hasOrganizationPermissions(OML.can_manage_organization)"
[multiSelectMode]="isMultiSelect"
[mainActionTooltip]="'Create new committee' | translate"
(mainEvent)="createNewCommittee()"
>
<!-- Title -->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
<os-head-bar [hasMainButton]="true" (mainEvent)="openThemeBuilderDialog()">
<os-head-bar
[hasMainButton]="true"
[mainActionTooltip]="'Create new design' | translate"
(mainEvent)="openThemeBuilderDialog()"
>
<!-- Title -->
<div class="title-slot">
<h2>{{ 'Design' | translate }}</h2>
Expand Down Expand Up @@ -28,7 +32,7 @@ <h2>{{ 'Design' | translate }}</h2>
class="cell-slot fill pointer"
(click)="openThemeBuilderDialog(theme)"
>
<div class="button-group">
<div class="button-group" [matTooltip]="'Modify design' | translate">
<div class="fake-button-no-touch" [ngStyle]="{ background: theme.primary_500 }"></div>
<div class="fake-button-no-touch" [ngStyle]="{ background: theme.accent_500 }"></div>
<div class="fake-button-no-touch" [ngStyle]="{ background: theme.warn_500 }"></div>
Expand All @@ -39,6 +43,7 @@ <h2>{{ 'Design' | translate }}</h2>
[checked]="isThemeUsed(theme)"
[disabled]="isThemeUsed(theme)"
[title]="'Change color set' | translate"
[matTooltip]="'Activate design' | translate"
[content]="
'Are you sure you want to activate this color set? This will change the colors in all meetings.'
| translate
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
<os-head-bar [hasMainButton]="canEdit" [multiSelectMode]="isMultiSelect" (mainEvent)="onMainEvent()">
<os-head-bar
[hasMainButton]="canEdit"
[mainActionTooltip]="'Upload files' | translate"
[multiSelectMode]="isMultiSelect"
(mainEvent)="onMainEvent()"
>
<!-- Title -->
<div class="title-slot">
<h2>{{ 'Files' | translate }}</h2>
Expand All @@ -9,6 +14,7 @@ <h2>{{ 'Files' | translate }}</h2>
<button
type="button"
mat-icon-button
[matTooltip]="'Create new folder' | translate"
(click)="createNewFolder(newFolderDialog)"
*osOmlPerms="OML.can_manage_organization; and: !isMultiSelect"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { MatLegacyDialogModule as MatDialogModule } from '@angular/material/lega
import { MatLegacyFormFieldModule as MatFormFieldModule } from '@angular/material/legacy-form-field';
import { MatLegacyInputModule as MatInputModule } from '@angular/material/legacy-input';
import { MatLegacyMenuModule as MatMenuModule } from '@angular/material/legacy-menu';
import { MatTooltipModule } from '@angular/material/tooltip';
import { OpenSlidesTranslationModule } from 'src/app/site/modules/translations';
import { MediafileListServiceModule } from 'src/app/site/pages/meetings/pages/mediafiles/modules/mediafile-list/services/mediafile-list-service.module';
import { MediafileCommonServiceModule } from 'src/app/site/pages/meetings/pages/mediafiles/services/mediafile-common-service.module';
Expand Down Expand Up @@ -36,7 +37,8 @@ import { OrganizationMediafileListRoutingModule } from './organization-mediafile
MediafileCommonServiceModule,
MediafileListServiceModule,
PromptDialogModule,
DirectivesModule
DirectivesModule,
MatTooltipModule
]
})
export class OrganizationMediafileListModule {}
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
<os-head-bar [hasMainButton]="true" (mainEvent)="createOrganizationTag()" [multiSelectMode]="isMultiSelect">
<os-head-bar
[hasMainButton]="true"
[mainActionTooltip]="'Create new tag' | translate"
(mainEvent)="createOrganizationTag()"
[multiSelectMode]="isMultiSelect"
>
<!-- Title -->
<div class="title-slot">
<h2>{{ 'Tags' | translate }}</h2>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
mat-raised-button
(click)="toggle()"
class="nav-toggle-button"
[matTooltip]="(isOpen ? 'Hide main menu' : 'Show main menu') | translate"
[ngClass]="{ left: isOpen, right: !isOpen }"
>
<mat-icon>{{ isOpen ? 'arrow_back_ios' : 'arrow_forward_ios' }}</mat-icon>
Expand Down
2 changes: 2 additions & 0 deletions client/src/app/ui/modules/sidenav/sidenav.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { MatLegacyDialogModule as MatDialogModule } from '@angular/material/lega
import { MatLegacyMenuModule as MatMenuModule } from '@angular/material/legacy-menu';
import { MatLegacyProgressSpinnerModule as MatProgressSpinnerModule } from '@angular/material/legacy-progress-spinner';
import { MatSidenavModule } from '@angular/material/sidenav';
import { MatTooltipModule } from '@angular/material/tooltip';
import { RouterModule } from '@angular/router';
import { OpenSlidesTranslationModule } from 'src/app/site/modules/translations';

Expand All @@ -32,6 +33,7 @@ const EXPORTS = [SidenavComponent, SidenavMainContentDirective, SidenavDrawerCon
MatDialogModule,
MatMenuModule,
MatButtonModule,
MatTooltipModule,
EasterEggModule,
PipesModule,
OpenSlidesTranslationModule.forChild()
Expand Down

0 comments on commit 068bf13

Please sign in to comment.