-
Notifications
You must be signed in to change notification settings - Fork 32
Smart Connector UIExtension #308
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
Closed
Closed
Changes from 8 commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
0307ab8
added smart connector UIExtension and Actions for data request
yentelmanero 7efe329
added possibility to set position for smart connector containers (lef…
yentelmanero 522284b
Merge remote-tracking branch 'upstream/master'
yentelmanero b41978d
added search, keyboard navigation and customization options to smart …
yentelmanero 7a0e67a
fixed keyboard, width and click event when invisible bugs in smart co…
yentelmanero 3c3bcad
Merge remote-tracking branch 'upstream/master'
yentelmanero 99fc2d4
addressed lint issues
yentelmanero 68a3430
moved HTMLElement extension methods from smart-connector to html-utils
yentelmanero 6c811fc
Implemented suggested changes from PR
yentelmanero c4de64b
Merge remote-tracking branch 'upstream/master'
yentelmanero fae839d
added index file for smart connector
yentelmanero 3405a06
fixed lint issues
yentelmanero c9ae88e
Merge pull request #1 from eclipse-glsp/master
yentelmanero 238cec9
Implemented PR changes, moved HTMLElement extensions, added Action to…
yentelmanero 221602b
Merge branch 'eclipse-glsp:master' into master
yentelmanero 8732697
Added escape key to exit smart connector, applied prettier formatting…
yentelmanero 001a16e
removed comment
yentelmanero 12a1f77
fixed bug where top and bottom containers would not align with relate…
yentelmanero f7bafea
fixed issue where icons could not be used for tool buttons
yentelmanero defec53
changed line to use display:flex instead of block after searching
yentelmanero 1bcc513
renamed smart connector to selection palette, removed open and close …
yentelmanero c88f126
Merge branch 'master' of https://github.com/yentelmanero/glsp-client
yentelmanero b0774d7
fixed merge issues happening due to name change
yentelmanero 3cc4e58
selection palette expand button does not close when panning and zoomi…
yentelmanero 152a9ff
fixed lint problems
yentelmanero b3ad8c7
fixed bug where edge selection would also bring up selection palette
yentelmanero b470530
selection palette now moves when resizing and moving node instead of …
yentelmanero File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
.smart-connector { | ||
position: absolute; | ||
z-index: 1; | ||
} | ||
|
||
/* combined container */ | ||
|
||
#smart-connector-container { | ||
position: absolute; | ||
visibility: hidden; | ||
} | ||
|
||
/* expand button */ | ||
|
||
#smart-connector-expand-button { | ||
height: 32px; | ||
width: 32px; | ||
border-radius: 50%; | ||
border: 1px solid black; | ||
z-index: 9999; | ||
display: flex; /* or inline-flex */ | ||
align-items: center; | ||
justify-content: center; | ||
position: absolute; | ||
background: #cccccc; | ||
visibility: hidden; | ||
} | ||
|
||
/* search bar */ | ||
|
||
.smart-connector-search { | ||
background: #dfdfdf; | ||
color: black; | ||
border: #bddaef; | ||
padding-left: 3px; | ||
width: 100%; | ||
box-sizing: border-box; | ||
} | ||
|
||
.smart-connector-submenu-search-container { | ||
max-height: 0; | ||
overflow: hidden; | ||
} | ||
|
||
.smart-connector-search-container { | ||
max-height: 50px; | ||
} | ||
|
||
/* header */ | ||
|
||
.header-title { | ||
display: flex; | ||
align-items: center; | ||
padding-right: 8px; | ||
} | ||
|
||
.smart-connector-group-header { | ||
justify-content: space-between; | ||
width: 100px; | ||
} | ||
|
||
/* seperated containers */ | ||
|
||
.smart-connector-group-container { | ||
border-left: 1px solid black; | ||
border-right: 1px solid black; | ||
background-color:rgba(1, 1, 1, 0.6); | ||
max-width: 200px; | ||
/* display: flex; */ | ||
} | ||
|
||
.smart-connector-group-container:hover, .smart-connector-group-container:focus-within { | ||
z-index: 10000; | ||
} | ||
|
||
.smart-connector-group-container div:first-child { | ||
border-top: 0; | ||
} | ||
|
||
/* container items */ | ||
|
||
.smart-connector-group { | ||
overflow-y: scroll; | ||
-ms-overflow-style: none; /* IE and Edge */ | ||
scrollbar-width: none; /* Firefox */ | ||
max-height: 150px; | ||
} | ||
|
||
/* scrollbar */ | ||
.smart-connector-group::-webkit-scrollbar { | ||
display: none; | ||
} | ||
|
||
.collapsable-group { | ||
max-height: 0; | ||
/* transition: max-height 0.2s ease-out; */ | ||
} | ||
|
||
/* single item */ | ||
|
||
.smart-connector-button { | ||
border-top: 1px solid black; | ||
margin: 0 4px; | ||
padding: 8px 0; | ||
z-index: 9998; | ||
cursor: pointer; | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
packages/client/src/features/smart-connector/smart-connector-module.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/******************************************************************************** | ||
* Copyright (c) 2023 EclipseSource and others. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License v. 2.0 which is available at | ||
* http://www.eclipse.org/legal/epl-2.0. | ||
* | ||
* This Source Code may also be made available under the following Secondary | ||
* Licenses when the conditions for such availability set forth in the Eclipse | ||
* Public License v. 2.0 are satisfied: GNU General Public License, version 2 | ||
* with the GNU Classpath Exception which is available at | ||
* https://www.gnu.org/software/classpath/license.html. | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 | ||
********************************************************************************/ | ||
yentelmanero marked this conversation as resolved.
Show resolved
Hide resolved
|
||
import { FeatureModule, TYPES, bindAsService, configureActionHandler, OpenSmartConnectorAction, | ||
CloseSmartConnectorAction, MoveAction, SetBoundsAction, SetViewportAction, | ||
DeleteElementOperation } from '@eclipse-glsp/sprotty'; | ||
import '../../../css/smart-connector.css'; | ||
import { SmartConnector, SmartConnectorKeyListener } from './smart-connector'; | ||
|
||
export const smartConnectorModule = new FeatureModule((bind, unbind, isBound, rebind) => { | ||
const context = { bind, unbind, isBound, rebind }; | ||
bindAsService(context, TYPES.IUIExtension, SmartConnector); | ||
bind(TYPES.IDiagramStartup).toService(SmartConnector); | ||
configureActionHandler(context, OpenSmartConnectorAction.KIND, SmartConnector); | ||
configureActionHandler(context, CloseSmartConnectorAction.KIND, SmartConnector); | ||
configureActionHandler(context, MoveAction.KIND, SmartConnector); | ||
configureActionHandler(context, SetBoundsAction.KIND, SmartConnector); | ||
configureActionHandler(context, SetViewportAction.KIND, SmartConnector); | ||
configureActionHandler(context, DeleteElementOperation.KIND, SmartConnector); | ||
bindAsService(bind, TYPES.KeyListener, SmartConnectorKeyListener); | ||
}); |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.