codenameone / CodenameOne

Cross-platform framework for building truly native mobile apps with Java or Kotlin. Write Once Run Anywhere support for iOS, Android, Desktop & Web.
https://www.codenameone.com/
Other
1.7k stars 406 forks source link

Add Components section to the KitchenSink Demo #2961

Open shannah opened 4 years ago

shannah commented 4 years ago

We have lots of components that aren't included in the Kitchen Sink demo yet.

Let's add a "Components" section with the following subsections:

I know there is some overlap with some things that are already shown in the demo, but a little duplication is OK, as this section is meant to be a component gallery.

shannah commented 4 years ago

Posting some screenshots of a few screens that @erluxman has added so far.

image

erluxman commented 4 years ago

New components added to Kitchen sink demo

Code can be found here : https://github.com/erluxman/kitchensinkdemo

collage

Screen Shot 2019-12-29 at 7 07 35 PM
shannah commented 4 years ago

Looks good. Can you split them up so that each section is on a separate form. I.e. Have a "Components" form that has options "Labels", "Buttons", "Toggles", etc.. When you click on "Buttons", it will show a form with the buttons, etc..

Also, this app uses different UI patterns for tablets and phones. Try running the simulator as a tablet (or using the Desktop skin) to make sure that these new sections work correctly in both.

shannah commented 4 years ago

I have checked out and built your fork. Here is some feedback.

Good start!. Most of the components are in place. We need to refine it in places, and some of the components need some changes to properly demonstrate their functionality, but there's a good base here to work with.

One key thing that needs to be added throughout is the ability for the user to find more information about each component, and see a code sample of how each is used. So for each component, there should be a button that links to the javadocs for the component. For the "Snippet", I'd like the user to stay in the app. The button to see the code snippet for each can open a form with a BrowserComponent showing the content. You can embed an AceEditor in the browser component and display the snippet.

Once all of the flow is in place, I've going to get Renzo to do a design for it in XD - then I'll get you to implement that design.

Specific Feedback:

-Buttons

Progress

- Slider Looks strange. Looks like two sliders on top of each other

ToolBar

Media

shannah commented 4 years ago

I've built it with the javascript port also for reference: https://weblite.ca/a/KitchenSinkDemo1/

codenameone commented 4 years ago

A couple of things I noticed:

erluxman commented 4 years ago

@codenameone I will give simple component's list a page, and complex component their own page each. How does that sound??

For example, Calendar will be kept alone on a screen whereas, label components will be a list inside a form.

codenameone commented 4 years ago

Yes that's the intention

erluxman commented 4 years ago

So I have made the final completion on the component gallary in the repo https://github.com/erluxman/kitchensinkdemo please check that out..

shannah commented 4 years ago

I have built this as JS here https://weblite.ca/a/KitchenSink3/

Currently it doesn't compile because you are using a couple of unsupported methods. Go into Terminal and do ant jar to see the errors.

We support Class.getName(), but not Class.getCanonicalName(). We don't support String.replace(). You'll need to use StringUtil.replaceAll().

Good work. Other than that fix, we'll leave it as I've passed it to Renzo (https://github.com/shannah/cn1-graphics-issues-renzo/issues/28) for a design, so there will be lots of adjustments to make based on that new design.