-
Notifications
You must be signed in to change notification settings - Fork 3
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
Development
: Enhance Share Modal of Apollon standalone
#34
Conversation
…into enhancement/change-share-modal
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.
Works now 👍 Well done |
packages/webapp/src/main/components/modals/share-modal/share-modal.tsx
Outdated
Show resolved
Hide resolved
…om declaration type
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.
Tested on Apollon-TS1, works as expected. Nice improvement
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.
Tested on Apollon test server on the testing session. The new share modal is much more convenient in my opinion. Nicely done!
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.
Tested on test server 1 during testing session, new modal seems good and simple. We talked about improving the error message saying "Are you sure it contains a diagram.json?" when and empty model is shared but it is decided that this is outside of the scope of this PR.
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.
Tested on Apollon-TS1, works as described. Very nice improvement.
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 seems like the icon is not centered - i am not sure if this is intended or not 🤔
And you define colors in multiple files e.g. in packages/webapp/src/main/styles.css
and in packages/webapp/src/main/themings.json
- i guess it would be better to define those colors only at one place (as part of another PR).
You can also think about to extract the text into an additional file - e.g. to support multiple languages in the future.
But thanks for incorporating my suggestions 👍
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.
Seems like this has already been tested by enough people, so I had a look at the code and got a few remarks:
packages/webapp/src/main/components/modals/share-modal/share-modal.tsx
Outdated
Show resolved
Hide resolved
@@ -70,16 +91,16 @@ body { | |||
cursor: pointer; | |||
} | |||
|
|||
.theme-toggle.dark .sun-and-moon > .sun-beams { | |||
.theme-toggle.dark [class$='sun-and-moon'] > [class$='sun-beams'] { |
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.
That looks weird. Why can't we keep the normal class selector?
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.
…odal.tsx Co-authored-by: Patrick Bassner <[email protected]>
Co-authored-by: Patrick Bassner <[email protected]>
@@ -47,6 +47,10 @@ module.exports = { | |||
test: /\.css$/, | |||
use: ['style-loader', 'css-loader'], | |||
}, | |||
{ | |||
test: /\.svg$/, |
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.
Is that really necessary?
why don't we just include the svg as the src of a normal img tag. I think svgr/webpack is just an unnessecary additional dependency
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.
or including the svgs via the < use >
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 would then not be able to style it via an external CSS file, which is needed for theme-switcher icon.
@@ -35,6 +35,7 @@ | |||
"websocket": "1.0.34" | |||
}, | |||
"devDependencies": { | |||
"@svgr/webpack": "^6.2.1", |
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.
see my comment in the webpack config
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.
Code looks good overall. My remarks regarding svgr are optional in my opinion.
Motivation and Context
This PR enhances the currently existing share modal of Apollon Standalone.
The current version of the Share modal requires 4 clicks to be done before sharing a link, which is a time-consuming task.
This proposed share modal reduces the number of clicks to 2.
Steps for Testing
To test locally:
enhancement/change-share-modal
branchyarn install && yarn start
To test in test server:
Screenshot:
Before:

After:

Todo: