Git Product home page Git Product logo

cookbook's Introduction

cookbook's People

Contributors

alvarezguille avatar anezthes avatar artur- avatar benwilsoni avatar dbenninger avatar emarc avatar enver-haase avatar haijian-vaadin avatar hawksk avatar javier-godoy avatar jcgueriaud1 avatar johannest avatar jouni avatar lbruun avatar legioth avatar manolo avatar marcushellberg avatar mrgreywater avatar mstahv avatar olafj avatar ollitietavainenvaadin avatar paulroemer avatar peppe avatar samie avatar sebastiankuehnau avatar sissbruecker avatar stefanuebe avatar tarekoraby avatar tatulund avatar tomivirkki avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cookbook's Issues

Example code does not work when copy pasted into another project

Take https://cookbook.vaadin.com/grid-csv-export

It uses

import org.vaadin.artur.exampledata.DataType;
import org.vaadin.artur.exampledata.ExampleDataGenerator;

which you do not know how to include in your project

It has

import com.vaadin.recipes.recipe.Metadata;
@Metadata(howdoI = "Export grid data as CSV")

which is only relevant for the cookbook app itself

It has

import com.vaadin.recipes.recipe.Recipe;
public class GridCsvExport extends Recipe {

which is only relevant for the cookbook app itself

It should be possible to grab
https://start.vaadin.com?dl

and paste the code as a new file and then get it to work by not reading anything else than the code

How do I change label color dependending on value

What will this enable for the user?
As a user of the application, I want to see color coded text elements (so that I can identify their value quickly without even reading the text, especially when there are several simultaneous instances of the element, such as in a grid)

Recipe tags (optional):
styling, colors

Related tags (optional):

How do I print a subset of components

What will this enable for the user?
As a user of the application, I want to specify the subset of components that would be printed

Recipe tags: Flow

[bug] global css styles missing on navigating

Opening the cookbook example, all looks good (the headings are readable):

image

Clicking on the first cookbook entry, the entry looks like this (hard to read):

image

Going back with the browser back bar or the "Back to Cookbook" action (a lot of headings hard to read):

image

Browser: Firefox 96.0b3

Rename Java tag Flow, TypeScript Fusion

Rename the Java tag Flowand TypeScript to Fusion where it makes sense. This way they will use the same terminology as our website, docs, forum, and discord.

How do I create a TabSheet

What will this enable for the user?
As a user of the application, I want selecting a Tab to change the content underneath

Recipe tags (optional):
Spicy, Lactose-Free

Related tags (optional):

How do I copy text to the clipboard

What will this enable for the user?
As a user of the application, I want to click a "copy to clipboard" -button, so that I can paste the relevant content into another application.

Recipe tags (optional):
copy, paste, clipboard

Related tags (optional):

Example "Add template renderer in grid and handle events" did not work as expected

Hi,

we have problems with your sample.

Steps to reproduce:

  1. Click on the first "click me" after start
  2. "click me" Button will be disabled
  3. Scroll down and you well see more disabled "click me" Buttons you never clicked

Is there any workaround for this because we must use this technique in our application but are showstopped because of this

Stefan

How do I browse a hierarchical file system, a file tree?

What will this enable for the user?
As a user of the application, I want to browse a file system (so that I can view or download files from there)

This is a placeholder to remind me I should incorporate Amahdy's old blog post solution here.

Recipe tags (optional):
TreeGrid

Related tags (optional):
Tree

How do I copy Grid or Table content to the clipboard

What will this enable for the user?
As a user of the application, I want to easily copy&paste the content of a Grid/Table to the clipboard, so that I can paste into another application.

Recipe tags (optional):
copy, paste, clipboard, grid, table

Related tags (optional):
csv

How do I lazily initialize components

What will this enable for the user?
As a user of the application, I want to add a placeholder for a component that requires a long backend task. A chart that requires a long SQL query ...

Recipe tags (optional):

Related tags (optional):

How do I Allow MenuBar overflow button

What will this enable for the user?
As a user of the application, I want to use a MenuBar in a HorizontalLayout so that when I resize the browser width the buttons that do not fit hide inside the overflow button.

Recipe tags (optional):
layout

How do I create different types of notifications

What will this enable for the user?
As a user of the application, I want to see different types of notifications which's behaviour is based on severity.

Common use case is to have four notification types: Generic, Success, Warning and Error.
Each type should have set of rules based that define the behaviour.

Parameters pre-defined by each type are

  • Position
  • Theme variant (visual style)
  • Closing behaviour
    • Timeout (success and non-critical notifications)
    • Close button (warnings and errors that require user acknowledge)
    • Action buttons (warnings and errors that require user's decision)
    • Non-closable (i.e. background process)

Screenshot from customer case:
image

Recipe tags (optional):
Notifications

Related tags (optional):

The user wants forms divided into tabs

  • View has static section which contains Save/Cancel actions.
  • View content is divided into tabs.
  • The entries on one tab may have effect on other tabs.
  • User needs to be able to tell if there are validation errors on a tab.
  • Validation is run across all tabs then any entries are done.

image

Lazy Component View recipe needs @Push, otherwise cannot work

Took me a few hours to understand what was happening.
Spinner layout spins forever and cannot reveal the correctly loaded component.
Please document @Push needs to be enabled on topmost Router Layout.

Suggest also a few cleanups, as e.g. the whole of the overlay can simply be removed, and no public methods need to exist like 'isLoading' or that method with a boolean parameter that's always 'true' (setLoaded). Most stuff can be private to LazyContainer and still be accessed by its inner classes (no getComponent() method needed for example, just access the private final field).

Cheers,
Enver

Remove app-specific code from preview

The recipes include few pieces of code that are specific to the cookbook app:

  • package name (e.g. package com.vaadin.recipes.recipe.camera;)
  • com.vaadin.recipes.recipe.Metadata
  • com.vaadin.recipes.recipe.Recipe

For better UX, remove those from the preview of the recipe.

How do I print a Grid

What will this enable for the user?
As a user of the application, I want to be able to print a Grid, or generate a printable PDF document out of the Grid, that has more than 1 viewport's height worth of content (but still a reasonable size, less than 20 pages for the sake of the example). One possible way this can be implemented by having a custom "print" URL/route which shows a paged version of the Grid and the requested page can be added as an additional route parameter. In other words, /print/0 has the first page, /print/1 has the second page, and so on. These routes can then be accessed sequentially with a headless browser to generate pages of the full document.

Recipe tags (optional):
printing, grid

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.