Skip to content
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

Chapter 10 #6

Open
jimrome opened this issue Apr 12, 2023 · 4 comments
Open

Chapter 10 #6

jimrome opened this issue Apr 12, 2023 · 4 comments

Comments

@jimrome
Copy link

jimrome commented Apr 12, 2023

I followed the instructions for Chapter 10, but when I get to the point where I am supposed to see a blue backgrouns, I get a php error:
Drupal\Core\Asset\Exception\IncompleteLibraryDefinitionException: Incomplete library
definition for definition 'global-styling' in extension 'mytheme' in
Drupal\Core\Asset\LibraryDiscovery
Looking at your source code, My mytheme.libraries.yml is very different from youre:

global-styling:
version: VERSION
css:
theme:
css/styles.css: {}
js:
js/scripts.js: {}
base:
version: VERSION
css:
component:
css/components/action-links.css:
weight: -10
css/components/breadcrumb.css:
weight: -10
css/components/button.css:
weight: -10
css/components/container-inline.css:
weight: -10
css/components/details.css:
weight: -10
css/components/exposed-filters.css:
weight: -10
css/components/field.css:
weight: -10
css/components/form.css:
weight: -10
css/components/icons.css:
weight: -10
css/components/inline-form.css:
weight: -10
css/components/item-list.css:
weight: -10
css/components/link.css:
weight: -10
css/components/links.css:
weight: -10
css/components/menu.css:
weight: -10
css/components/more-link.css:
weight: -10
css/components/pager.css:
weight: -10
css/components/tabledrag.css:
weight: -10
css/components/tableselect.css:
weight: -10
css/components/tablesort.css:
weight: -10
css/components/tabs.css:
weight: -10
css/components/textarea.css:
weight: -10
css/components/ui-dialog.css:
weight: -10
dialog:
version: VERSION
css:
component:
css/components/dialog.css:
weight: -10
dropbutton:
version: VERSION
css:
component:
css/components/dropbutton.css:
weight: -10
file:
version: VERSION
css:
component:
css/components/file.css:
weight: -10
image-widget:
version: VERSION
css:
component:
css/components/image-widget.css: { }
indented:
version: VERSION
css:
component:
css/components/indented.css: { }
messages:
version: VERSION
css:
component:
css/components/messages.css:
weight: -10
node:
version: VERSION
css:
component:
css/components/node.css:
weight: -10
progress:
version: VERSION
css:
component:
css/components/progress.css:
weight: -10
search-results:
version: VERSION
css:
component:
css/components/search-results.css: { }
user:
version: VERSION
css:
component:
css/components/user.css:
weight: -10

@jimrome
Copy link
Author

jimrome commented Apr 12, 2023

The book (kindle on my Mac does not indent the code properly, so none of it will work!
Furthermore, whenever you copy anything, it adds junk. For example:

Modify the mytheme.libraries.yml file and add a global-styling library definition for your theme: global-styling: version: VERSION css: theme: css/styles.css: {} js: js/scripts.js: {} dependencies: - core/drupal

Glaman, Matt; Quillen, Kevin. Drupal 10 Development Cookbook: Practical recipes to harness the power of Drupal for building digital experiences and dynamic websites, 3rd Edition (pp. 405-406). Packt Publishing. Kindle Edition.
image

@jimrome
Copy link
Author

jimrome commented Apr 13, 2023

The Android version also has no indents. You need to rework the book!

@kevinquillen
Copy link
Collaborator

Sorry about this @jimrome. I did not know the digital versions printed that way. This is only something the @Packt-ITService team could handle. @Packt-ITService could you please investigate this?

@jimrome
Copy link
Author

jimrome commented Apr 13, 2023

image
As soon as you highlight text, the pop-up grabs focus, and you can only copy from the pop-up menu, which munges ALL formatting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants