Skip to content

Added initial cookbook implementation.#943

Open
EHandtkeBasis wants to merge 14 commits into
mainfrom
cookbook
Open

Added initial cookbook implementation.#943
EHandtkeBasis wants to merge 14 commits into
mainfrom
cookbook

Conversation

@EHandtkeBasis
Copy link
Copy Markdown
Member

No description provided.

Comment thread docs/cookbook/README.md
Comment thread docs/cookbook/README.md Outdated
Comment thread docs/cookbook/README.md
Comment thread docs/cookbook/README.md Outdated
Comment thread docs/cookbook/README.md Outdated
Comment thread docs/cookbook/README.md Outdated
Comment thread docs/cookbook/README.md Outdated
Comment thread docs/cookbook/README.md Outdated
Comment thread docs/cookbook/README.md Outdated
Comment thread docs/cookbook/README.md Outdated
Copy link
Copy Markdown
Member

@gosteenBASIS gosteenBASIS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me! I think this will be a useful section to develop.

Copy link
Copy Markdown
Member

@bbrennanbasis bbrennanbasis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@EHandtkeBasis In addition to the code suggestions comments:

  1. General question: Is it expected that every cookbook article should be created in .mdx files, even though the reset of the project articles are in .md files?


2. The Hover/Focus text for topic labels need more contrast in dark modeImage


  1. The Hover/Focus text for selected topic labels need more contrast in light mode
Image
  1. The level dropdown is lacking CSS styling
Image
  1. Overlaying content in the main toolbar when the screen is ~1400px
Image
  1. The text inside the components CookbookCar.jsx and CookBookIndex.jsx need to be translatable, use PR #861 and Docusaurus's Translate your React code for reference.

  1. Rules will need to be added to src\main\webapp\WEB-INF\urlrewrite.xml so users don't land on directory pages within cookbook when the project is fully built, like http://localhost:8080/cookbook/routing or http://localhost:8080/cookbook. See what I did in PR #522.

  1. Tags page (http://localhost:8080/cookbook/tags) doesn't match the tag styling for the blogs (https://docs.webforj.com/blog/tags). Personally, I don't have a preference either or, as long as the styling was intentionally untouched
Image

Comment thread .vale.ini Outdated
BasedOnStyles =

[docs/cookbook/**/*.mdx]
BasedOnStyles =
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion to at least add the style check that checks if the right letters in webforJ are capitalized

Suggested change
BasedOnStyles =
BasedOnStyles = webforJ
webforJ.* = NO
Google.Capitalization = YES

Comment thread docs/docusaurus.config.js Outdated
path: 'cookbook',
routeBasePath: 'cookbook',
sidebarPath: require.resolve('./cookbook-sidebars.js'),
editUrl: 'https://github.com/webforj/webforj-documentation/edit/main/docs/cookbook/',
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
editUrl: 'https://github.com/webforj/webforj-documentation/edit/main/docs/cookbook/',
editUrl: 'https://github.com/webforj/webforj-documentation/edit/main/docs/',

Comment on lines +17 to +27

@Route
public class HomeView extends Composite<Div> {

public HomeView() {
Button goToDashboard = new Button("Go to Dashboard");
goToDashboard.onClick(e -> Router.getCurrent().navigate(DashboardView.class));
getBoundComponent().add(goToDashboard);
}
}
```
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use private fields and a reference to the bound component instead of getBoundComponent() directly

Suggested change
@Route
public class HomeView extends Composite<Div> {
public HomeView() {
Button goToDashboard = new Button("Go to Dashboard");
goToDashboard.onClick(e -> Router.getCurrent().navigate(DashboardView.class));
getBoundComponent().add(goToDashboard);
}
}
```
@Route
public class HomeView extends Composite<Div> {
private final Div self = getBoundComponent();
private final Button goToDashboard = new Button("Go to Dashboard");
public HomeView() {
goToDashboard.onClick(e -> Router.getCurrent().navigate(DashboardView.class));
self.add(goToDashboard);
}
}

Comment thread docs/cookbook/index.mdx Outdated
@@ -0,0 +1,11 @@
---
title: Overview
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
title: Overview
title: Cookbook Overview

@bbrennanbasis bbrennanbasis added the status: waiting-for-author Review is done. Waiting for the PR author to apply changes or respond. label May 1, 2026
Comment thread docs/cookbook/css/inject-inline-css.md Outdated
@@ -0,0 +1,31 @@
---
title: "Inject inline CSS into a page from Java"
description: "Use @InlineStyleSheet to add CSS class definitions directly from a Java component without a separate stylesheet file."
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [vale] reported by reviewdog 🐶
[Google.WordList] Use 'style sheet' instead of 'stylesheet'.

Comment thread docs/cookbook/css/inject-inline-css.md Outdated
}
```

Setting `once = true` ensures the style block is injected only once even when multiple instances of the component are on the page at the same time.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [vale] reported by reviewdog 🐶
[webforJ.BeDirect] Avoid using 'ensures the style'. Focus more on explicitly giving details about the feature.

@EHandtkeBasis EHandtkeBasis added status: waiting-for-review The PR is ready. Waiting for team members to review. and removed status: waiting-for-author Review is done. Waiting for the PR author to apply changes or respond. labels May 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: waiting-for-review The PR is ready. Waiting for team members to review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants