commonsdemo's People
Forkers
jpvelsamycommonsdemo's Issues
Hardcoded dependency to Lit 2.5.0
A hardcoded dependency to Lit 2.5.0 was added to SourceCodeViewer
in #25.
It conflicts with Vaadin 24.3 own dependency with Lit 3.x
Add support for just one way of specifying @DemoSource
It would be nice to have one way of specifying the sources so they work in production and development mode.
Reintroduce Twitter Card support
From #40
Use local demo sources in development mode
The demo always loads code snippets from the configured github branch in the repository, even in development mode (when demos are being modified in IDE). Hence, demos do not reflect the modified sources.
Document code viewer features
Add feature for switching light or dark theme
Allow to switch light or dark theme in the demos (based on https://cookbook.vaadin.com/os-light-dark-theme)
Why is TabbedDemoImpl a generic class?
What is the purpose of this type parameter?
Problem with showing route in the sources view
Basically this is not being shown.
@Route(value = "extended-login/login-layout", layout = TestLoginLayout.class)
// show-source @Route("value = "extended-login/login-layout-demo", layout = ExtendedLoginDemoView.class)
Tabs should be bookmarkable
As a user, when I click a tab, I would expect that the URL changes so that I'm able to navigate using the back and forward buttons in the browser.
Replace Gist-it with something else
We need an alternative for displaying the addons source code in the demos because the service at https://gist-it.appspot.com/ is down.
Cleanup @SupressWarnings
It would be great to remove this annotation from the sources view
Add a help icon to tabs
It would be great to add some kind of support for describing the demos, maybe adding a question mark on each tab of each demo that when clicked it would show a popup explaining each demo
Vaadin 14: Parameter 'elem' implicitly has an 'any' type
Compilation with Vaadin 14.10.5 fails:
ERROR in /var/jenkins/workspace/AddonsDemo-v14/node_modules/@vaadin/flow-frontend/code-viewer.ts
[tsl] ERROR in /var/jenkins/workspace/AddonsDemo-v14/node_modules/@vaadin/flow-frontend/code-viewer.ts(452,36)
TS7006: Parameter 'elem' implicitly has an 'any' type.
Branch is hardcoded
@GithubLink
defaults to master
branch. If the demo is based on another branhc, the code snippet is not aligned with the actual sources (which is important, in case the API has breaking changes).
CommonsDemo/src/main/java/com/flowingcode/vaadin/addons/demo/TabbedDemo.java
Lines 187 to 191 in 3beac89
cleanup @Ignore
@ignore annotation appears in the sources, it should be removed
Reintroduce OpenGraph support
From #40
Add support for conditional code
Lines with a // hide-source
comment are not rendered in the code snippet (#37).
Lines with a // show-source
comment are rendered in the code snippet (#42).
What we need now is a way to display "nice" code depending on the framework version.
For instance:
// #if vaadin ge 22
// show-source foo();
// #elif vaadin eq 23
// show-source bar();
// #else
// show-source baz();
// #endif
would be rendered as foo();
in Vaadin 14-22, bar
in Vaadin 23 and baz()
in Vaadin 24.
Add support for show-source
Lines with a // hide-source
comment are not rendered in the code snippet (#37).
What we need now is a way to display "nice" code as replacement for ugly hacks, which would otherwise make the demo hard to understand.
This feature will be helpful in cases where we use reflection in order to circumvent binary compatibility issues.
For instance, if the demo source is
Method m = Foo.class.getMethod("bar");
m.invoke(foo);
I want to be able to write it as
// show-source foo.bar();
Method m = Foo.class.getMethod("bar"); // hide-source
m.invoke(foo); // hide-source
So that it will be displayed as:
foo.bar();
Vaadin 14: NoSuchMethodError Button.addThemeVariants
TabbedDemo uses addThemeVariants
, which is not available in some supported versions of the framework
3.10.0 release failed
Release failed because of https://github.com/FlowingCode/infrastructure/issues/100 (https://jenkins.flowingcode.com/job/CommonsDemo/169/console)
Secondary width defaults to 30% when source position is primary
Steps to reproduce
Code highlighter does not render in Vaadin 21
Allow more than one source to be rendered in SourceCodeViewer
The current implementation of the library allows to display only one source file per demo example. However, there are scenarios where our demo examples may require the inclusion of additional helper classes, such as JavaScript connectors, stylesheets, and other related files. So it would greatly improve the usability and completeness of the library if we could enhance it to support multiple source files within a single demo example.
This kind of enhancement would enable us to:
- Include essential auxiliary files that are crucial for understanding and running the example effectively.
- Provide a more comprehensive and informative demonstration of the example's functionality.
- Enhance the overall user experience by allowing users to access and review all related source files in one place.
[24.2] Cannot invoke "java.lang.Double.doubleValue()" because "this.splitterPosition" is null
Dragging the splitter causes the following error:
Cannot invoke "java.lang.Double.doubleValue()" because "this.splitterPosition" is null
java.lang.NullPointerException: Cannot invoke "java.lang.Double.doubleValue()" because "this.splitterPosition" is null
at com.vaadin.flow.component.splitlayout.SplitLayout.calcNewSplitterPosition(SplitLayout.java:389)
at com.vaadin.flow.component.splitlayout.SplitLayout.lambda$new$9b1b5227$2(SplitLayout.java:74)
at com.vaadin.flow.component.ComponentEventBus.fireEventForListener(ComponentEventBus.java:233)
at com.vaadin.flow.component.ComponentEventBus.handleDomEvent(ComponentEventBus.java:475)
at com.vaadin.flow.component.ComponentEventBus.lambda$addDomTrigger$dd1b7957$1(ComponentEventBus.java:292)
at com.vaadin.flow.internal.nodefeature.ElementListenerMap.lambda$fireEvent$2(ElementListenerMap.java:447)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at com.vaadin.flow.internal.nodefeature.ElementListenerMap.fireEvent(ElementListenerMap.java:447)
at com.vaadin.flow.server.communication.rpc.EventRpcHandler.handleNode(EventRpcHandler.java:62)
at com.vaadin.flow.server.communication.rpc.AbstractRpcInvocationHandler.handle(AbstractRpcInvocationHandler.java:74)
at com.vaadin.flow.server.communication.ServerRpcHandler.handleInvocationData(ServerRpcHandler.java:459)
at com.vaadin.flow.server.communication.ServerRpcHandler.lambda$handleInvocations$2(ServerRpcHandler.java:440)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at com.vaadin.flow.server.communication.ServerRpcHandler.handleInvocations(ServerRpcHandler.java:440)
at com.vaadin.flow.server.communication.ServerRpcHandler.handleRpc(ServerRpcHandler.java:323)
at com.vaadin.flow.server.communication.UidlRequestHandler.synchronizedHandleRequest(UidlRequestHandler.java:114)
at com.vaadin.flow.server.SynchronizedRequestHandler.handleRequest(SynchronizedRequestHandler.java:40)
at com.vaadin.flow.server.VaadinService.handleRequest(VaadinService.java:1529)
at com.vaadin.flow.server.VaadinServlet.service(VaadinServlet.java:398)
at com.vaadin.flow.spring.SpringServlet.service(SpringServlet.java:106)
Mobile access to the demo enhancements
A couple of suggestions:
- The source code should be disabled by default in mobile devices
- The source code divider should be horizontal in portrait devices by default
Footer is not positioned at bottom
Reintroduce OpenGraph and Twitter Card support
In Vaadin 10 demos, we had the convenience of utilizing OpenGraph and Twitter Card metadata protocols to enhance the appearance of shared links on social media platforms:
https://github.com/FlowingCode/AddonsDemoV10/blob/1740baa28923a119d5fbbc014fa25c1356ccf9cd/src/main/java/com/flowingcode/addons/TrackedLayout.java#L73-L95
https://github.com/FlowingCode/AddonsDemoV10/blob/1740baa28923a119d5fbbc014fa25c1356ccf9cd/src/main/java/com/flowingcode/addons/TrackedLayout.java#L73
https://github.com/FlowingCode/AddonsDemoV10/blob/1740baa28923a119d5fbbc014fa25c1356ccf9cd/src/main/java/com/flowingcode/vaadin/addons/carousel/TrackedDemoView.java
This functionality was removed in Vaadin 14+ demos because views are now directly sourced from each repository.
Add option to show source code on the left
Would be nice to have the possibility to show the source code on the left side if needed. By default source code should be shown in the right side.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.