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

feat(stark-ui): implementation of minimap component #824

Merged
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions packages/stark-core/src/modules/settings/settings.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@ import { STARK_SETTINGS_SERVICE, StarkSettingsServiceImpl } from "./services";
import { StarkSettingsEffects } from "./effects";

@NgModule({
imports: [
StoreModule.forFeature("StarkSettings", starkSettingsReducers),
EffectsModule.forFeature([StarkSettingsEffects])
]
imports: [StoreModule.forFeature("StarkSettings", starkSettingsReducers), EffectsModule.forFeature([StarkSettingsEffects])]
})
export class StarkSettingsModule {
/**
Expand Down
3 changes: 3 additions & 0 deletions packages/stark-ui/assets/styles/_old-variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ $md-primary-100: #b2d5ee; /* rgb(178, 213, 238) */
$md-primary: mat-color(map-get($base-theme, primary-palette));
$md-primary-600: mat-color(map-get($base-theme, primary-palette), 600); /* rgb(0, 106, 180) */
$md-primary-700: mat-color(map-get($base-theme, primary-palette), 700); /* rgb(0, 94, 160) */
$md-primary-alpha-05: rgba(0, 118, 200, 0.05);
$md-primary-alpha-10: rgba(0, 118, 200, 0.1);
$md-primary-alpha-26: rgba(0, 118, 200, 0.26);
$md-primary-alpha-50: rgba(0, 118, 200, 0.5);
Expand Down Expand Up @@ -77,3 +78,5 @@ $md-warn-alpha-87: rgba(255, 87, 34, 0.87);
$md-warn-200-alpha-38: rgba(255, 171, 145, 0.38);

$cash2-offwhite: #f6f9fa;

$checkbox-size: 15px;
1 change: 1 addition & 0 deletions packages/stark-ui/src/modules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export * from "./modules/date-range-picker";
export * from "./modules/dropdown";
export * from "./modules/keyboard-directives";
export * from "./modules/language-selector";
export * from "./modules/minimap";
export * from "./modules/pagination";
export * from "./modules/pretty-print";
export * from "./modules/session-ui";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@
}
}

/* END stark-ui: src/modules/dropdown/components/dropdown/_dropdown.component.scss */
/* END stark-ui: src/modules/dropdown/components/app-menu/_app-menu.component.scss */
2 changes: 2 additions & 0 deletions packages/stark-ui/src/modules/minimap.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export * from "./minimap/minimap.module";
export * from "./minimap/components";
3 changes: 3 additions & 0 deletions packages/stark-ui/src/modules/minimap/components.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export * from "./components/minimap.component";
export * from "./components/item-properties.intf";
export * from "./components/item-visibility.intf";
118 changes: 118 additions & 0 deletions packages/stark-ui/src/modules/minimap/components/_minimap-theme.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
/* ============================================================================== */
/* S t a r k M i n i m a p */
/* ============================================================================== */
/* stark-ui: src/modules/minimap/components/minimap-theme.scss */
Copy link
Collaborator

Choose a reason for hiding this comment

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

The theme.scss file should contain only "themable" properties, meaning that only colors, backgrounds, fill colors, foregrounds, etc should be defined in this file

So let's move all the other CSS rules like top, left, right, etc to the _minimap.component.scss file ;)

Copy link
Collaborator

@christophercr christophercr Nov 6, 2018

Choose a reason for hiding this comment

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

Now the pop-up div with the different checkboxes has no border and even its background is different, it is not white anymore so it is hard to distinguish it from the page background 😕

minimap popup background


.compact-minimap {
& .stark-minimap-dots {
& i {
background-color: $secondary-dark-text-color;
opacity: 0.2;
}
& li.selected i {
opacity: 1;
}
}
& .stark-minimap-dropdown-toggle {
& .stark-minimap-dropdown-toggle-menu {
box-shadow: $elevation-4;
& mat-checkbox.mat-checked .mat-icon {
background-color: $md-accent;
}
}
& .mat-button.mat-icon-button {
& svg {
fill: #000;
}
border: 1px solid mat-color($grey-palette, 300);
background-color: $md-primary-alpha-05;
}
& mat-icon {
fill: $md-primary;
}
& .stark-minimap-dropdown-toggle-menu {
border-color: mat-color($grey-palette, 500);
box-shadow: 0 1px 2px mat-color($grey-palette, 300);
background-color: #FFF;
& mat-checkbox {
&:hover {
background: $md-primary-alpha-05;
}
& ._mat-icon {
&::after {
border-color: mat-color($grey-palette, 50);
}
}
& .stark-minimap-dropdown {
& mat-checkbox.stark-minimap-column-checkbox {
&.mat-checked ._mat-icon {
background-color: $md-primary-200-alpha-38;
}
}
}
}
}
}
}

.full-minimap {
& .stark-minimap-dots {
& i {
background-color: $secondary-dark-text-color;
opacity: 0.2;
}
& li.selected i {
opacity: 1;
}
}
& .stark-minimap-dropdown-toggle {
& .stark-minimap-dropdown-toggle-menu {
box-shadow: $elevation-4;
& mat-checkbox.mat-checked .mat-icon {
background-color: $md-accent;
}
}
& .mat-button.mat-icon-button {
& svg {
fill: #000;
}
border: 1px solid mat-color($grey-palette, 300);
background-color: $md-primary-alpha-05;
}
& mat-icon {
fill: $md-primary;
}
& .stark-minimap-dropdown-toggle-menu {
border-color: mat-color($grey-palette, 500);
box-shadow: 0 1px 2px mat-color($grey-palette, 300);
background-color: #FFF;
& mat-checkbox {
&:hover {
background: $md-primary-alpha-05;
}
& ._mat-icon {
&::after {
border-color: mat-color($grey-palette, 50);
}
}
& .stark-minimap-dropdown {
& mat-checkbox.stark-minimap-column-checkbox {
&.mat-checked ._mat-icon {
background-color: $md-primary-200-alpha-38;
}
}
}
}
}
}
}

.stark-table {
& .stark-minimap {
& .stark-minimap-dropdown-toggle .stark-minimap-dropdown-toggle-menu {
box-shadow: $elevation-2;
}
}
}

/* End stark-ui: src/modules/minimap/components/minimap-theme.scss */
Loading