-
Notifications
You must be signed in to change notification settings - Fork 61
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
[3981] Display the diagram palette tools and tool sections in a list #4016
Conversation
f9529be
to
040b113
Compare
99c2415
to
4588262
Compare
fd2f293
to
91107b5
Compare
94f08d8
to
3b4833f
Compare
3b4833f
to
4b42883
Compare
packages/diagrams/frontend/sirius-components-diagrams/package.json
Outdated
Show resolved
Hide resolved
packages/diagrams/frontend/sirius-components-diagrams/package.json
Outdated
Show resolved
Hide resolved
.../eclipse/sirius/components/compatibility/services/diagrams/CompatibilityPaletteProvider.java
Outdated
Show resolved
Hide resolved
...ms/src/main/java/org/eclipse/sirius/components/collaborative/diagrams/dto/IPaletteEntry.java
Show resolved
Hide resolved
...nd/sirius-components-diagrams/src/renderer/palette/tool-list/PaletteToolSectionList.types.ts
Outdated
Show resolved
Hide resolved
...nd/sirius-components-diagrams/src/renderer/palette/tool/DiagramPaletteToolExtensionPoints.ts
Show resolved
Hide resolved
break; | ||
} | ||
}; | ||
return { handleToolClick, palette }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's nice to extract this code from the palette but all these various concerns shouldn't be grouped together.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It could be better but the idea is to make it easier to distinguish the business part from the ui part
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We might want to have a dedicated usePalette hook that would return the palette and another useTool that would return the handleToolclick function.
This is would require handling the direct edit differently, I'll make the change later.
* Obeo - initial API and implementation | ||
*******************************************************************************/ | ||
|
||
import { GQLMessage } from '../Tool.types'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could separate the part necessary to provide the palette it self from the mutations
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We might want to have a dedicated usePalette
hook that would return the palette and another useTool
that would return the handleToolclick
function.
This is would require handling the direct edit differently, I'll make the change later.
...rc/main/java/org/eclipse/sirius/components/view/emf/diagram/PaletteDefaultToolsProvider.java
Outdated
Show resolved
Hide resolved
4b42883
to
c24950d
Compare
4553fae
to
15b365c
Compare
Bug: #3990 Signed-off-by: Florian Barbin <florian.barbin@obeo.fr>
0673622
to
293413a
Compare
We had too much files on the same directory so I moved some of them in dedicated ones. I did not : |
71155dc
to
7be68fe
Compare
Bug: #3981 Signed-off-by: Florian Barbin <florian.barbin@obeo.fr> Signed-off-by: Michaël Charfadi <michael.charfadi@obeosoft.com>
7be68fe
to
7f7f71c
Compare
Pull request template
General purpose
What is the main goal of this pull request?
Project management
priority:
andpr:
labels been added to the pull request? (In case of doubt, start with the labelspriority: low
andpr: to review later
)area:
,difficulty:
,type:
)CHANGELOG.adoc
been updated to reference the relevant issues?CHANGELOG.adoc
? (Including changes in the GraphQL API)CHANGELOG.adoc
? For example indoc/screenshots/2022.5.0-my-new-feature.png
Architectural decision records (ADR)
[doc]
?CHANGELOG.adoc
?Dependencies
CHANGELOG.adoc
?CHANGELOG.adoc
?Frontend
This section is not relevant if your contribution does not come with changes to the frontend.
General purpose
Typing
We need to improve the typing of our code, as such, we require every contribution to come with proper TypeScript typing for both changes contributing new files and those modifying existing files.
Please ensure that the following statements are true for each file created or modified (this may require you to improve code outside of your contribution).
useMutation<DATA_TYPE, VARIABLE_TYPE>(…)
useQuery<DATA_TYPE, VARIABLE_TYPE>(…)
useSubscription<DATA_TYPE, VARIABLE_TYPE>(…)
useMachine<CONTEXT_TYPE, EVENTS_TYPE>(…)
useState<STATE_TYPE>(…)
?.
(if the GraphQL API specifies that a field cannot benull
, do not treat it has potentiallynull
for example)let diagram: Diagram | null = null;
)Backend
This section is not relevant if your contribution does not come with changes to the backend.
General purpose
Architecture
Review
How to test this PR?
paletteAsList.webm