cosmos-explorer/less/Common/Constants.less

337 lines
8.6 KiB
Plaintext
Raw Permalink Normal View History

/******************************************************************************
FONTS
/******************************************************************************/
@font-face {
font-family: wf_segoe-ui_normal;
Fix bug publish screenshot (#762) [Preview this branch](https://cosmos-explorer-preview.azurewebsites.net/pull/762?feature.someFeatureFlagYouMightNeed=true) The main change in this PR fixes the snapshot functionality in the Publish pane-related components. Because the code cell outputs are now rendered in their own iframes for security reasons, a single snapshot of the notebook is no longer possible: each cell output takes its own snapshot and the snapshots are collated on the main notebook snapshot. - Move the snapshot functionality to notebook components: this removes the reference of the notebook DOM node that we must pass to the Publish pane via explorer. - Add slice in the state and actions in notebook redux for notebook snapshot requests and result - Add post robot message to take snapshots and receive results - Add logic in `NotebookRenderer` to wait for all output snapshots done before taking the main one collating. - Use `zustand` to share snapshot between Redux world and React world. This solves the issue of keeping the `PanelContainer` component generic, while being able to update its children (`PublishPanel` component) with the new snapshot. Additional changes: - Add `local()` in `@font-face` to check if font is already installed before downloading the font (must be done for Safari, but not Edge/Chrome) - Add "Export output to image" menu item in notebook cell, since each cell output can take its own snapshot (which can be downloaded) ![image](https://user-images.githubusercontent.com/21954022/117454706-b5f16600-af46-11eb-8535-6bf99f3d9170.png)
2021-05-11 19:24:05 +01:00
src: local("Segoe UI"), url("../../fonts/segoe-ui/west-european/normal/latest.woff");
}
@DataExplorerFont: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif;
@SemiboldFont: "Segoe UI Semibold", "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif;
@GrayScale: "grayscale()";
Initial Fabric support (#1607) * Add Platform.Fabric to run in context of Fabric * Use separate StyleConstants We want to have more flexibility with Styles at runtime but Constants depend on ConfigContext and therefore get loaded very early at startup. * Add Fabric specific styles and Fluent theme documentDBFabric.less contains all styles for Fabric. We use React.lazy to import them conditionally at runtime preventing webpack from preprocessing them into main.css. * Restyle CommandBar for Fabric with more roundness and native colors. * Disable Notebooks when running in Fabric * Disable Synapse and Scripts commands for Fabric * Fix code formatting issues * Fetch encrypted token from sessionStorage for fabric platform * Fix Tabs style * Dark refresh icons for Fabric * Use new ResourceTree2 for Fabric * Fluent tree should have a fixed width otherwise the action buttons jump around on hover. * Disable remaining Script actions in Fabric * Revert accidentally committed change which broke a test * Fix cross-origin error second try * Adjust @FabrixBoxMargin css * Hide Database Scale node on Fabric * Remove all Collection child nodes on Fabric * Add a comment about why we need FabricPlatform.tsx * Fix equality checks * Fix more Colors for Fabric * Switch resource tree to "medium" size * Fix formatting again * Fix formatting again * Disable no-var-requires error on some intended var import. * Increase memory limit for build * Use standard Segoe UI font for Fabric * Improve Tabs design for Fabric * Fix active Tab style bug in Portal introduced with 39a7765aef807de5c1e7c82b094765072a10924c --------- Co-authored-by: Laurent Nguyen <laurent.nguyen@microsoft.com>
2023-09-15 16:33:27 +01:00
@NoColor: "brightness(0) saturate(100%)";
@xSmallFontSize: 4px;
@smallFontSize: 8px;
@mediumFontSize: 12px;
@DefaultFontSize: 14px;
@largeFontSize: 16px;
/******************************************************************************
COLORS
/******************************************************************************/
@AccentMediumHigh: #0058ad;
@AccentMedium: #004e87;
@AccentHigh: #1ebaed;
@AccentExtraHigh: #55b3ff;
@AccentLow: #edf6ff;
@AccentMediumLow: #ddeefe;
@AccentLight: #eef7ff;
@AccentExtra: #ddf0ff;
@SelectionHigh: #b91f26;
@BaseLight: #ffffff;
@BaseDark: #000000;
@NotificationLow: #fff4ce;
@NotificationHigh: #f9e9b0;
@Purple1: #8a2da5;
Refactored Settings Tab (#161) * added SettingsV2 Tab * lint changes * foxed failing test * Addressed PR comments - removed dangerouslySetInnerHtml - removed underscore dependency - added AccessibleElement - removed unnecesary exceptions to linting * split render into separate functions - removed sinon in test - Added some enums to replace constant strings - removed dangerously set inner html - made autopilot input as StatefulValue * add settingscomponent snapshot * fixed linting errors * fixed errors * addressed PR comments - Moved StatefulValue to new class - Split render to more functions for throughputInputComponents * Added sub components - Added tests for SettingsRenderUtls - Added empty test files for adding tests later * Moved all inputs to fluent UI - removed rupm - added reusable styles * Added Tabs - Added ToolTipLabel component - Removed toggleables for individual components - Removed accessible elements - Added IndexingPolicyComponent * Added more tests * Addressed PR comments * Moved Label radio buttons to choicegroup * fixed lint errors * Removed StatefulValue - Moved conflict res tab to the end - Added styling for autpilot radiobuttons * fixed linting errors * fix bugs from merge to master * fixed formatting issue * Addressed PR comments - Added unit tests for smaller methods within each component * fixed linting errors * removed redundant snapshots * removed empty line * made separate props objects for subcomponents * Moved dirty checks to sub components * Made indesing policy component height = 80% of view port - modified auto pilot v3 messages - Added Fluent UI tolltip - * Moved warning messages inline * moved conflict res helpers out * fixed bugs * added stack style for message * fixed tests * Added tests * fixed linting and format errors * undid changes * more edits * fixed compile errors * fixed compile errors * fixed errors * fixed bug with save and discard buttons * fixed compile errors * addressed PR comments
2020-09-30 20:34:39 +01:00
@Dirty: #9b4f96;
@BaseLow: #f2f2f2;
@BaseMediumLow: #e6e6e6;
@BaseMedium: #cccccc;
@BaseMediumHigh: #767676;
@BaseHigh: #393939;
@BoxShadow: rgba(118, 118, 118, 0.65);
@GreyOutOpacity: 0.65;
@DefaultFontColor: @BaseHigh;
@DividerColor: @BaseMedium;
@InfoPointerColor: #3b3b3b;
@ErrorColor: @SelectionHigh;
@SelectionColor: #3074b0;
@FocusColor: #605e5c;
2020-06-26 15:52:28 +01:00
@GalleryBackgroundColor: #fdfdfd;
//Icons
@InfoIconColor: #0072c6;
@WarningIconColor: #db7500;
@ErrorIconColor: #b91f26;
/******************************************************************************
METRICS
/******************************************************************************/
@SmallSpace: 4px;
@DefaultSpace: 8px;
@MediumSpace: 12px;
@LargeSpace: 16px;
@ButtonBorderWidth: 1px;
@RightPaneWidth: 440px;
@RightPaneMinHeight: 565px;
@PaneLoaderWidth: 110px;
@PaneLoaderHeight: 10px;
@ButtonIconHeight: 18px;
@ScaleFormWidth: 280px;
@ImgWidth: 14px;
@ImgHeight: 14px;
@toggleFontWeight: 700;
//Resource Tree
@TreeLineHeight: 17px;
//top command bar height
@topcommandbarheight: 36px;
//Global Loader
@LoaderHeight: 6px;
@LoaderWidth: 24px;
//HDE constants
@HdeAccountSplitterHeight: 20px;
@AccountNavigationImgWidth: 350px;
@AccountNavigationImgHeight: 190px;
@AccountNavigationExpandCollapseSize: 12px;
// Query Stats
@IETableDataWidth: 650px;
//New Colleciton Pane textbox width
@newCollectionPaneInputWidth: 300px;
@tooltipTextWidth: 280px;
@sharedCollectionThroughputTooltipTextWidth: 150px;
@mongoWildcardIndexTooltipWidth: 150px;
@addContainerPaneThroughputInfoWidth: 370px;
@optionsInfoWidth: 210px;
@noFixedCollectionsTooltipWidth: 196px;
@ThroughputInfoWidth: 215px;
@ThroughputRuInfoWidth: 175px;
@RenewAccessInfoWidth: 115px;
@ErrorDetailsInfowidth: 145px;
@AccessKeyInputWidth: 370px;
@provisionDatabaseThroughputInfo: 200px;
//tabs container
@ActiveTabHeight: 31px;
@ActiveTabWidth: 141px;
@TabsHeight: 30px;
@TabsWidth: 140px;
@StatusIconContainerSize: 18px;
@LoadingErrorIconSize: 14px;
@ErrorIconContainer: 16px;
@ErrorIconWidth: 3px;
//form errors
@FormErrorWidth: 320px;
@WarningErrorIconSize: 32px;
// z-index
@Loader_z-index: 5; //this should be higher than that of the splitter to disable it
@NotificationConsole_z-index: 2;
@screen: screen\0;
// CommandBar
@CommandBarButtonHeight: 40px;
@FabricCommandBarButtonHeight: 34px;
Initial Fabric support (#1607) * Add Platform.Fabric to run in context of Fabric * Use separate StyleConstants We want to have more flexibility with Styles at runtime but Constants depend on ConfigContext and therefore get loaded very early at startup. * Add Fabric specific styles and Fluent theme documentDBFabric.less contains all styles for Fabric. We use React.lazy to import them conditionally at runtime preventing webpack from preprocessing them into main.css. * Restyle CommandBar for Fabric with more roundness and native colors. * Disable Notebooks when running in Fabric * Disable Synapse and Scripts commands for Fabric * Fix code formatting issues * Fetch encrypted token from sessionStorage for fabric platform * Fix Tabs style * Dark refresh icons for Fabric * Use new ResourceTree2 for Fabric * Fluent tree should have a fixed width otherwise the action buttons jump around on hover. * Disable remaining Script actions in Fabric * Revert accidentally committed change which broke a test * Fix cross-origin error second try * Adjust @FabrixBoxMargin css * Hide Database Scale node on Fabric * Remove all Collection child nodes on Fabric * Add a comment about why we need FabricPlatform.tsx * Fix equality checks * Fix more Colors for Fabric * Switch resource tree to "medium" size * Fix formatting again * Fix formatting again * Disable no-var-requires error on some intended var import. * Increase memory limit for build * Use standard Segoe UI font for Fabric * Improve Tabs design for Fabric * Fix active Tab style bug in Portal introduced with 39a7765aef807de5c1e7c82b094765072a10924c --------- Co-authored-by: Laurent Nguyen <laurent.nguyen@microsoft.com>
2023-09-15 16:33:27 +01:00
/**********************************************************************************
Portal Consts
/**********************************************************************************/
@PortalAccentMediumHigh: #0058ad;
@PortalAccentMedium: #004e87;
@PortalAccentLight: #eef7ff;
@PortalAccentAccentExtra: #ddf0ff;
/**********************************************************************************
Fabric Consts
/**********************************************************************************/
@FabricFont: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif;
@FabricBoxBorderRadius: 8px;
@FabricBoxBorderShadow: rgba(0, 0, 0, 0.133) 0px 1.6px 3.6px 0px, rgba(0, 0, 0, 0.11) 0px 0.3px 0.9px 0px;
Initial Fabric support (#1607) * Add Platform.Fabric to run in context of Fabric * Use separate StyleConstants We want to have more flexibility with Styles at runtime but Constants depend on ConfigContext and therefore get loaded very early at startup. * Add Fabric specific styles and Fluent theme documentDBFabric.less contains all styles for Fabric. We use React.lazy to import them conditionally at runtime preventing webpack from preprocessing them into main.css. * Restyle CommandBar for Fabric with more roundness and native colors. * Disable Notebooks when running in Fabric * Disable Synapse and Scripts commands for Fabric * Fix code formatting issues * Fetch encrypted token from sessionStorage for fabric platform * Fix Tabs style * Dark refresh icons for Fabric * Use new ResourceTree2 for Fabric * Fluent tree should have a fixed width otherwise the action buttons jump around on hover. * Disable remaining Script actions in Fabric * Revert accidentally committed change which broke a test * Fix cross-origin error second try * Adjust @FabrixBoxMargin css * Hide Database Scale node on Fabric * Remove all Collection child nodes on Fabric * Add a comment about why we need FabricPlatform.tsx * Fix equality checks * Fix more Colors for Fabric * Switch resource tree to "medium" size * Fix formatting again * Fix formatting again * Disable no-var-requires error on some intended var import. * Increase memory limit for build * Use standard Segoe UI font for Fabric * Improve Tabs design for Fabric * Fix active Tab style bug in Portal introduced with 39a7765aef807de5c1e7c82b094765072a10924c --------- Co-authored-by: Laurent Nguyen <laurent.nguyen@microsoft.com>
2023-09-15 16:33:27 +01:00
@FabricBoxMargin: 4px 3px 4px 3px;
@FabricAccentMediumHigh: #0c695a;
@FabricAccentMedium: #117865;
@FabricAccentLight: #f5f5f5;
@FabricAccentExtra: #ebebeb;
@FabricButtonBorderRadius: 4px;
/**********************************************************************************
Common Flex Property
/**********************************************************************************/
.flex-display(@display: flex) {
Initial Fabric support (#1607) * Add Platform.Fabric to run in context of Fabric * Use separate StyleConstants We want to have more flexibility with Styles at runtime but Constants depend on ConfigContext and therefore get loaded very early at startup. * Add Fabric specific styles and Fluent theme documentDBFabric.less contains all styles for Fabric. We use React.lazy to import them conditionally at runtime preventing webpack from preprocessing them into main.css. * Restyle CommandBar for Fabric with more roundness and native colors. * Disable Notebooks when running in Fabric * Disable Synapse and Scripts commands for Fabric * Fix code formatting issues * Fetch encrypted token from sessionStorage for fabric platform * Fix Tabs style * Dark refresh icons for Fabric * Use new ResourceTree2 for Fabric * Fluent tree should have a fixed width otherwise the action buttons jump around on hover. * Disable remaining Script actions in Fabric * Revert accidentally committed change which broke a test * Fix cross-origin error second try * Adjust @FabrixBoxMargin css * Hide Database Scale node on Fabric * Remove all Collection child nodes on Fabric * Add a comment about why we need FabricPlatform.tsx * Fix equality checks * Fix more Colors for Fabric * Switch resource tree to "medium" size * Fix formatting again * Fix formatting again * Disable no-var-requires error on some intended var import. * Increase memory limit for build * Use standard Segoe UI font for Fabric * Improve Tabs design for Fabric * Fix active Tab style bug in Portal introduced with 39a7765aef807de5c1e7c82b094765072a10924c --------- Co-authored-by: Laurent Nguyen <laurent.nguyen@microsoft.com>
2023-09-15 16:33:27 +01:00
display:~"-webkit-@{display}";
display:~"-ms-@{display}box"; // IE10 uses -ms-flexbox
display:~"-ms-@{display}"; // IE11
display: @display;
}
.flex-direction(@direction: column) {
-webkit-flex-direction: @direction;
-ms-flex-direction: @direction;
flex-direction: @direction;
}
/*************************************************************************************
High contrast mode active
**************************************************************************************/
Initial Fabric support (#1607) * Add Platform.Fabric to run in context of Fabric * Use separate StyleConstants We want to have more flexibility with Styles at runtime but Constants depend on ConfigContext and therefore get loaded very early at startup. * Add Fabric specific styles and Fluent theme documentDBFabric.less contains all styles for Fabric. We use React.lazy to import them conditionally at runtime preventing webpack from preprocessing them into main.css. * Restyle CommandBar for Fabric with more roundness and native colors. * Disable Notebooks when running in Fabric * Disable Synapse and Scripts commands for Fabric * Fix code formatting issues * Fetch encrypted token from sessionStorage for fabric platform * Fix Tabs style * Dark refresh icons for Fabric * Use new ResourceTree2 for Fabric * Fluent tree should have a fixed width otherwise the action buttons jump around on hover. * Disable remaining Script actions in Fabric * Revert accidentally committed change which broke a test * Fix cross-origin error second try * Adjust @FabrixBoxMargin css * Hide Database Scale node on Fabric * Remove all Collection child nodes on Fabric * Add a comment about why we need FabricPlatform.tsx * Fix equality checks * Fix more Colors for Fabric * Switch resource tree to "medium" size * Fix formatting again * Fix formatting again * Disable no-var-requires error on some intended var import. * Increase memory limit for build * Use standard Segoe UI font for Fabric * Improve Tabs design for Fabric * Fix active Tab style bug in Portal introduced with 39a7765aef807de5c1e7c82b094765072a10924c --------- Co-authored-by: Laurent Nguyen <laurent.nguyen@microsoft.com>
2023-09-15 16:33:27 +01:00
@media all and (-ms-high-contrast: none),
(-ms-high-contrast: active) {
.selectedRadio,
.selectedRadio:hover,
.selectedRadio:active,
.selectedRadio.dirty,
Initial Fabric support (#1607) * Add Platform.Fabric to run in context of Fabric * Use separate StyleConstants We want to have more flexibility with Styles at runtime but Constants depend on ConfigContext and therefore get loaded very early at startup. * Add Fabric specific styles and Fluent theme documentDBFabric.less contains all styles for Fabric. We use React.lazy to import them conditionally at runtime preventing webpack from preprocessing them into main.css. * Restyle CommandBar for Fabric with more roundness and native colors. * Disable Notebooks when running in Fabric * Disable Synapse and Scripts commands for Fabric * Fix code formatting issues * Fetch encrypted token from sessionStorage for fabric platform * Fix Tabs style * Dark refresh icons for Fabric * Use new ResourceTree2 for Fabric * Fluent tree should have a fixed width otherwise the action buttons jump around on hover. * Disable remaining Script actions in Fabric * Revert accidentally committed change which broke a test * Fix cross-origin error second try * Adjust @FabrixBoxMargin css * Hide Database Scale node on Fabric * Remove all Collection child nodes on Fabric * Add a comment about why we need FabricPlatform.tsx * Fix equality checks * Fix more Colors for Fabric * Switch resource tree to "medium" size * Fix formatting again * Fix formatting again * Disable no-var-requires error on some intended var import. * Increase memory limit for build * Use standard Segoe UI font for Fabric * Improve Tabs design for Fabric * Fix active Tab style bug in Portal introduced with 39a7765aef807de5c1e7c82b094765072a10924c --------- Co-authored-by: Laurent Nguyen <laurent.nguyen@microsoft.com>
2023-09-15 16:33:27 +01:00
.tab [type="radio"]:checked~label,
.tab [type="radio"]:checked~label:hover {
-ms-high-contrast-adjust: none;
-webkit-text-fill-color: HighlightText;
color: HighlightText;
border-color: HighlightText;
background-color: Highlight;
}
.queryMetricsSummaryTuple {
Initial Fabric support (#1607) * Add Platform.Fabric to run in context of Fabric * Use separate StyleConstants We want to have more flexibility with Styles at runtime but Constants depend on ConfigContext and therefore get loaded very early at startup. * Add Fabric specific styles and Fluent theme documentDBFabric.less contains all styles for Fabric. We use React.lazy to import them conditionally at runtime preventing webpack from preprocessing them into main.css. * Restyle CommandBar for Fabric with more roundness and native colors. * Disable Notebooks when running in Fabric * Disable Synapse and Scripts commands for Fabric * Fix code formatting issues * Fetch encrypted token from sessionStorage for fabric platform * Fix Tabs style * Dark refresh icons for Fabric * Use new ResourceTree2 for Fabric * Fluent tree should have a fixed width otherwise the action buttons jump around on hover. * Disable remaining Script actions in Fabric * Revert accidentally committed change which broke a test * Fix cross-origin error second try * Adjust @FabrixBoxMargin css * Hide Database Scale node on Fabric * Remove all Collection child nodes on Fabric * Add a comment about why we need FabricPlatform.tsx * Fix equality checks * Fix more Colors for Fabric * Switch resource tree to "medium" size * Fix formatting again * Fix formatting again * Disable no-var-requires error on some intended var import. * Increase memory limit for build * Use standard Segoe UI font for Fabric * Improve Tabs design for Fabric * Fix active Tab style bug in Portal introduced with 39a7765aef807de5c1e7c82b094765072a10924c --------- Co-authored-by: Laurent Nguyen <laurent.nguyen@microsoft.com>
2023-09-15 16:33:27 +01:00
th,
td {
&:nth-child(2) {
width: @IETableDataWidth;
}
&:nth-child(3) {
width: 50%;
}
}
}
}
/********************************************************************************************
Common Hover and Active color
*********************************************************************************************/
.hover() {
background-color: @AccentLight;
}
.active() {
background-color: @AccentExtra;
}
.focus() {
outline: 1px dashed @FocusColor;
}
/************************************************************************************************
Common Toggle Switch
*************************************************************************************************/
@ToggleHeight: 30px;
@ToggleWidth: 180px;
.toggleSwitch() {
max-width: 100%;
margin-bottom: @SmallSpace;
padding: @SmallSpace;
cursor: pointer;
color: @BaseHigh;
font-weight: 400;
font-size: @mediumFontSize;
font-family: @DataExplorerFont;
}
.selectedToggle() {
border-bottom: 2px solid @BaseHigh;
}
.unselectedToggle() {
color: @AccentMediumHigh;
}
/********************************************************************************************************
Common Data Explorer Icons
*********************************************************************************************************/
.dataExplorerIcons() {
cursor: pointer;
width: @ImgWidth;
height: @ImgHeight;
}
/*********************************************************************************************************
Info Tooltip
**********************************************************************************************************/
.infoTooltip() {
position: relative;
display: inline-block;
}
.tooltipText(@textColor: @BaseLight, @backgroundColor: @BaseHigh) {
visibility: hidden;
background-color: @backgroundColor;
color: @textColor;
position: absolute;
z-index: 1;
left: @MediumSpace;
padding: @MediumSpace;
}
.tooltipTextAfter(@color: @BaseDark) {
content: "";
position: absolute;
right: 100%;
border-style: solid;
border-color: transparent @color transparent transparent;
left: 0px;
width: 0;
height: 0;
border-color: @InfoPointerColor transparent;
}
.tooltipVisible() {
visibility: visible;
}
.inputTooltip() {
position: relative;
}
.inputTooltipText(@textColor: @BaseLight, @backgroundColor: @BaseHigh) {
background-color: @backgroundColor;
color: @textColor;
position: absolute;
z-index: 1;
padding: @MediumSpace;
}
.inputTooltipTextAfter(@color: @BaseDark) {
content: "";
position: absolute;
right: 100%;
border-style: solid;
border-color: transparent @color transparent transparent;
left: 10px;
width: 0;
height: 0;
border-color: @InfoPointerColor transparent;
Initial Fabric support (#1607) * Add Platform.Fabric to run in context of Fabric * Use separate StyleConstants We want to have more flexibility with Styles at runtime but Constants depend on ConfigContext and therefore get loaded very early at startup. * Add Fabric specific styles and Fluent theme documentDBFabric.less contains all styles for Fabric. We use React.lazy to import them conditionally at runtime preventing webpack from preprocessing them into main.css. * Restyle CommandBar for Fabric with more roundness and native colors. * Disable Notebooks when running in Fabric * Disable Synapse and Scripts commands for Fabric * Fix code formatting issues * Fetch encrypted token from sessionStorage for fabric platform * Fix Tabs style * Dark refresh icons for Fabric * Use new ResourceTree2 for Fabric * Fluent tree should have a fixed width otherwise the action buttons jump around on hover. * Disable remaining Script actions in Fabric * Revert accidentally committed change which broke a test * Fix cross-origin error second try * Adjust @FabrixBoxMargin css * Hide Database Scale node on Fabric * Remove all Collection child nodes on Fabric * Add a comment about why we need FabricPlatform.tsx * Fix equality checks * Fix more Colors for Fabric * Switch resource tree to "medium" size * Fix formatting again * Fix formatting again * Disable no-var-requires error on some intended var import. * Increase memory limit for build * Use standard Segoe UI font for Fabric * Improve Tabs design for Fabric * Fix active Tab style bug in Portal introduced with 39a7765aef807de5c1e7c82b094765072a10924c --------- Co-authored-by: Laurent Nguyen <laurent.nguyen@microsoft.com>
2023-09-15 16:33:27 +01:00
}