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

Promote Aura in community edition #1321

Closed
wants to merge 6 commits into from
Closed
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: 4 additions & 1 deletion e2e_tests/integration/play-command.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ describe('Play command', () => {
.should('contain', 'Getting started with Neo4j Browser')

// Click a guide button
frame.contains('Get started').click()
frame
.get('.teasers')
.contains('Get started')
.click()

frame = cy.getFrames()

Expand Down
33 changes: 33 additions & 0 deletions src/browser/components/drawer/Drawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
*/

import styled from 'styled-components'
import linkIcon from 'icons/external-link.svg'

export const Drawer = styled.div`
width: 290px;
Expand Down Expand Up @@ -76,3 +77,35 @@ export const DrawerFooter = styled.div`
margin-bottom: 20px;
text-align: center;
`

export const DrawerExternalLink = styled.a`
cursor: pointer;
text-decoration: none;
color: #68bdf4;

&:active {
text-decoration: none;
}

&:before {
display: inline-block;
content: ' ';
background-image: url("data:image/svg+xml;utf8,${linkIcon}");
height: 12px;
width: 12px;
margin-right: 7px;
}
`

export const DrawerBrowserCommand = styled.span`
background-color: #2a2c33;
border-radius: 2px;
padding: 3px;

color: #e36962;
font-family: Fira Code;

overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
`
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ import {
DrawerSection,
DrawerSectionBody,
DrawerToppedHeader,
DrawerFooter
DrawerFooter,
DrawerExternalLink,
DrawerBrowserCommand
} from './Drawer'

export {
Expand All @@ -37,5 +39,7 @@ export {
DrawerSection,
DrawerSectionBody,
DrawerToppedHeader,
DrawerFooter
DrawerFooter,
DrawerExternalLink,
DrawerBrowserCommand
}
5 changes: 5 additions & 0 deletions src/browser/icons/external-link.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,19 @@ exports[`LabelItems renders labels 1`] = `
class="sc-EHOje fyzZhj"
>
<div
class="sc-dnqmqq sc-iwsKbI kcQYkx"
class="sc-gZMcBi sc-gqjmRU bqcHTp"
data-testid="sidebarMetaItem"
>
*
</div>
<div
class="sc-dnqmqq sc-iwsKbI kcQYkx"
class="sc-gZMcBi sc-gqjmRU bqcHTp"
data-testid="sidebarMetaItem"
>
MyLabel
</div>
<div
class="sc-dnqmqq sc-iwsKbI kcQYkx"
class="sc-gZMcBi sc-gqjmRU bqcHTp"
data-testid="sidebarMetaItem"
>
MyLabel2
Expand Down Expand Up @@ -92,13 +92,13 @@ exports[`PropertyItems renders properties 1`] = `
class="sc-EHOje fyzZhj"
>
<div
class="sc-dnqmqq sc-gqjmRU afICD"
class="sc-gZMcBi sc-jTzLTM qJGnO"
data-testid="sidebarMetaItem"
>
prop1
</div>
<div
class="sc-dnqmqq sc-gqjmRU afICD"
class="sc-gZMcBi sc-jTzLTM qJGnO"
data-testid="sidebarMetaItem"
>
prop2
Expand Down Expand Up @@ -143,19 +143,19 @@ exports[`RelationshipItems renders relationshipTypes 1`] = `
class="sc-EHOje fyzZhj"
>
<div
class="sc-dnqmqq sc-gZMcBi hmKQnQ"
class="sc-gZMcBi sc-VigVT iGFmRz"
data-testid="sidebarMetaItem"
>
*
</div>
<div
class="sc-dnqmqq sc-gZMcBi hmKQnQ"
class="sc-gZMcBi sc-VigVT iGFmRz"
data-testid="sidebarMetaItem"
>
MY_TYPE
</div>
<div
class="sc-dnqmqq sc-gZMcBi hmKQnQ"
class="sc-gZMcBi sc-VigVT iGFmRz"
data-testid="sidebarMetaItem"
>
MY_TYPE2
Expand Down
8 changes: 4 additions & 4 deletions src/browser/modules/Sidebar/DocumentItems.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ import { Action } from 'redux'
import {
DrawerSubHeader,
DrawerSection,
DrawerSectionBody
DrawerSectionBody,
DrawerExternalLink
} from 'browser-components/drawer'
import {
StyledHelpLink,
StyledHelpItem,
StyledCommandListItem,
StyledCommandNamePair,
Expand Down Expand Up @@ -78,9 +78,9 @@ export const DocumentItems = ({
const listOfItems = items.map(item =>
'url' in item ? (
<StyledHelpItem key={item.url}>
<StyledHelpLink href={item.url} target="_blank" rel="noreferrer">
<DrawerExternalLink href={item.url} target="_blank" rel="noreferrer">
{item.name}
</StyledHelpLink>
</DrawerExternalLink>
</StyledHelpItem>
) : (
<CommandItem
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ exports[`Settings renders with strange characters in display name 1`] = `
Test åäö settings
</h5>
<div
class="sc-kAzzGY fnYWtX"
class="sc-kgoBCf jJtDAS"
>
<label
class="sc-chPdSV jsUXtn"
class="sc-kGXeez FHsms"
title=""
>
åäö üüü
<input
class="sc-kGXeez khypDc testSetting"
class="sc-dxgOiQ gZZHfZ testSetting"
title=""
value="true"
/>
Expand Down
39 changes: 5 additions & 34 deletions src/browser/modules/Sidebar/styled.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*/
import { Button } from 'semantic-ui-react'
import styled from 'styled-components'
import { DrawerBody } from 'browser-components/drawer'
import { DrawerBody, DrawerBrowserCommand } from 'browser-components/drawer'

export const StyledSetting = styled.div`
padding-bottom: 15px;
Expand All @@ -45,24 +45,6 @@ export const StyledSettingTextInput = styled.input`
width: 192px;
`

export const StyledHelpLink = styled.a`
cursor: pointer;
text-decoration: none;
color: #68bdf4;

&:active {
text-decoration: none;
}

&:before {
display: inline-block;
content: ' ';
background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'> <path d='M14.3524 4.42834L2.53033 16.2504C2.23744 16.5433 1.76256 16.5433 1.46967 16.2504C1.17678 15.9575 1.17678 15.4826 1.46967 15.1897L13.2917 3.36768H2.74941C2.3352 3.36768 1.99941 3.03189 1.99941 2.61768C1.99941 2.20346 2.3352 1.86768 2.74941 1.86768H15.1022H15.1024C15.204 1.86768 15.301 1.88792 15.3894 1.92458C15.4759 1.96035 15.557 2.01298 15.6278 2.08247C15.6311 2.08571 15.6343 2.08897 15.6376 2.09226C15.707 2.16302 15.7597 2.24414 15.7954 2.33059C15.8321 2.41902 15.8524 2.51598 15.8524 2.61768V14.9706C15.8524 15.3848 15.5166 15.7206 15.1024 15.7206C14.6881 15.7206 14.3524 15.3848 14.3524 14.9706V4.42834Z' fill='%2368BDF4'/></svg>");
height: 12px;
width: 12px;
margin-right: 7px;
}
`
export const StyledHelpItem = styled.li`
list-style-type: none;
margin: 8px 24px 0 24px;
Expand Down Expand Up @@ -100,21 +82,6 @@ export const StyledName = styled.div`
margin-right: 5%;
`

export const StyledCommand = styled.div`
background-color: #2a2c33;
border-radius: 2px;
padding: 3px;

color: #e36962;
font-family: Fira Code;

overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;

max-width: 45%;
`

export const StyledFullSizeDrawerBody = styled(DrawerBody)`
padding: 0;
`
Expand Down Expand Up @@ -149,3 +116,7 @@ export const StyledFeedbackButton = styled(Button)`
margin: 0 0 25px 25px !important;
min-height: fit-content !important;
`

export const StyledCommand = styled(DrawerBrowserCommand)`
max-width: 45%;
`
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
exports[`AsciiViews AsciiStatusbar displays statusBarMessage if no rows 1`] = `
<div>
<div
class="sc-jKJlTe ldyqSs"
class="sc-brqgnP dzoIro"
>
<div
class="sc-bdVaJa kwzqrW"
Expand All @@ -17,17 +17,17 @@ exports[`AsciiViews AsciiStatusbar displays statusBarMessage if no rows 1`] = `
exports[`AsciiViews AsciiStatusbar displays statusBarMessage if no rows 2`] = `
<div>
<div
class="sc-jKJlTe ldyqSs"
class="sc-brqgnP dzoIro"
>
<div
class="sc-jAaTju HNQcN"
class="sc-jhAzac lbnAwQ"
>
<div
class="sc-gPEVay cCneIg"
class="sc-fMiknA dHODfP"
>
Max column width:
<input
class="sc-iRbamj CdawG"
class="sc-dVhcbM jSEKgL"
max="3"
min="3"
type="range"
Expand All @@ -42,10 +42,10 @@ exports[`AsciiViews AsciiStatusbar displays statusBarMessage if no rows 2`] = `
exports[`AsciiViews AsciiView displays bodyMessage if no rows 1`] = `
<div>
<div
class="sc-bxivhb hvMtW"
class="sc-VigVT cFrzpB"
>
<div
class="sc-iAyFgw dSavTh"
class="sc-iRbamj fUfKqK"
>
(no changes, no records)
</div>
Expand All @@ -56,10 +56,10 @@ exports[`AsciiViews AsciiView displays bodyMessage if no rows 1`] = `
exports[`AsciiViews AsciiView does not display bodyMessage if rows 1`] = `
<div>
<div
class="sc-bxivhb hvMtW"
class="sc-VigVT cFrzpB"
>
<pre
class="sc-eNQAEJ gACFMe"
class="sc-cMljjf eZjnjT"
>
╒═══╕
│"x"│
Expand Down
Loading