Code Monkey home page Code Monkey logo

bookish's People

Contributors

elgandoz avatar gitressa avatar mortenson avatar

Stargazers

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

Watchers

 avatar  avatar

bookish's Issues

Usage of SFCs makes overriding Twig templates impossible

Describe the bug
Because of the way SFC works, you have to use sfc--<plugin-id>.html.twig to get theme overrides of Twig templates working. We do not do that in the theme.

To Reproduce
Steps to reproduce the behavior:

  1. Create a subtheme of bookish
  2. Add the template sfc--bk-blog-teaser.html.twig with the content "Hello world"
  3. See that your override is not being used.

Expected behavior
Themes should be able to override component templates.

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
To fix I will also need to land a patch in https://www.drupal.org/project/sfc/issues/3284219.

Index Lunr Search automatically after install?

Describe the bug
After installing Bookish, I get an "Access denied" message, if I click the "Search" link.

To Reproduce
Steps to reproduce the behavior:

  1. Install Bookish
  2. Click on 'Search' (https://tome-project.lndo.site/search)
  3. See that you get a "Access denied You're not allowed to be here!" message
  4. Go to /admin/config/lunr_search/default and click Index
  5. Click on 'Search', and see that you now get a search field, and can search

Suggested solution
Maybe the Lunr Search index can be indexed automatically after installation, to prevent this?

If you use PHP 8.1, web site hangs and warnings fill up the database log

Describe the bug
If you use PHP 8.1 and visit the front page, the web site hangs, while the database log is getting filled up with warnings as can be seen below.

Proposed solution
Update modules/bookish_admin/modules/bookish_image/src/Plugin/ImageEffect/BookishImageEffect.php

6652   03/Jun 22:01   php    Debug      Deprecated function: Implicit conversion from float 139.74000000000004 to  
                                        int loses precision in                                                     
                                        Drupal\bookish_image\Plugin\ImageEffect\BookishImageEffect->saturation()   
                                        (line 235 of /app/                                                         
6651   03/Jun 22:01   php    Debug      Deprecated function: Implicit conversion from float 128.44 to int loses    
                                        precision in                                                               
                                        Drupal\bookish_image\Plugin\ImageEffect\BookishImageEffect->saturation()   
                                        (line 235 of /app/web/profiles                                             
6650   03/Jun 22:01   php    Debug      Deprecated function: Implicit conversion from float 136.73999999999998 to  
                                        int loses precision in                                                     
                                        Drupal\bookish_image\Plugin\ImageEffect\BookishImageEffect->saturation()   
                                        (line 235 of /app/                                                         
6649   03/Jun 22:01   php    Debug      Deprecated function: Implicit conversion from float 126.57000000000001 to  
                                        int loses precision in                                                     
                                        Drupal\bookish_image\Plugin\ImageEffect\BookishImageEffect->saturation()   
                                        (line 235 of /app/                                                         
6648   03/Jun 22:01   php    Debug      Deprecated function: Implicit conversion from float 133.61 to int loses    
                                        precision in                                                               
                                        Drupal\bookish_image\Plugin\ImageEffect\BookishImageEffect->saturation()   
                                        (line 235 of /app/web/profiles                                             
6647   03/Jun 22:01   php    Debug      Deprecated function: Implicit conversion from float 125.7 to int loses     
                                        precision in                                                               
                                        Drupal\bookish_image\Plugin\ImageEffect\BookishImageEffect->saturation()   
                                        (line 235 of /app/web/profiles/                                            
6646   03/Jun 22:01   php    Debug      Deprecated function: Implicit conversion from float 131.61 to int loses    
                                        precision in                                                               
                                        Drupal\bookish_image\Plugin\ImageEffect\BookishImageEffect->saturation()   
                                        (line 235 of /app/web/profiles                                             
6645   03/Jun 22:01   php    Debug      Deprecated function: Implicit conversion from float 122.57000000000001 to  
                                        int loses precision in                                                     
                                        Drupal\bookish_image\Plugin\ImageEffect\BookishImageEffect->saturation()   
                                        (line 235 of /app/                                                         
6644   03/Jun 22:01   php    Debug      Deprecated function: Implicit conversion from float 130.73999999999998 to  
                                        int loses precision in                                                     
                                        Drupal\bookish_image\Plugin\ImageEffect\BookishImageEffect->saturation()   
                                        (line 235 of /app/                                                         
6643   03/Jun 22:01   php    Debug      Deprecated function: Implicit conversion from float 121.69999999999999 to  
                                        int loses precision in                                                     
                                        Drupal\bookish_image\Plugin\ImageEffect\BookishImageEffect->saturation()   
                                        (line 235 of /app/                               

Add Lando support, or include detailed Docker instructions?

This looks great, so thanks for working on it.

I use Lando for Drupal development, since it removes many of the complexities of Docker. With Lando, I got to the drush runserver and drush uli -l 127.0.0.1:8888 bit, but I get a "Unable to connect" at 127.0.0.1:8888 and the Lando address tome.lndo.site also hangs ... Would it be possible to add Lando and DDEV support?

Alternatively, perhaps the actual commands to get the Tome Docker image running could be added in README.md, where it now says this?

Alternatively you can run the commands below using the mortenson/tome Docker image. See the Docker script documentation for reference.

"required" attribute has no visual representation in forms

Describe the bug
I forgot to add something to indicate that a field is required,

To Reproduce
Steps to reproduce the behavior:

  1. Run "drush si bookish -y" and login
  2. Run "drush en bookish_contact -y"
  3. Visit /contact
  4. See that the required fields are not indicated as required

Expected behavior
Required fields would be indicated, I think a little red asterisk would be fine.

Screenshots
See https://bookish-drupal.netlify.app/contact for a live example

vendor/bin/drush tome:install fails with SQLite error

Describe the bug
Running vendor/bin/drush tome:install on existing installation fails with an SQLite error.

$ vendor/bin/drush tome:install -y

 // You are about to DROP all tables in your local database and re-install Tome. Do you want to continue?: yes. 

In SiteProcess.php line 214:
 
The command "/home/user/my_site/vendor/bin/drush site-install bookish --yes --sites-subdir=default --uri=default --root=/home/user/my_site/web" failed. 
 
Exit Code: 1(General error) 
 
 Working directory: 
 
 Output: 
 ================
 // Do you want to continue?: yes. 
 
 Error Output: 
 ================ 
 [warning] Program sqlite3 not found. Proceed if you have already created or emptied the Drupal database. 
 [notice] Starting Drupal installation. This takes a while. 
 
 In SiteInstallCommands.php line 152: 
 
 Drush was unable to drop all tables because `sqlite3` was not found, and therefore Drupal threw an AlreadyInstalledException. Ensure `sqlite3` is available in your PATH.

To Reproduce
Steps to reproduce the behavior:

  1. Install with these commands:
composer create-project drupal-tome/tome-project my_site --stability dev --no-interaction
cd my_site
composer require drupal-tome/bookish
vendor/bin/drush tome:init # Select Bookish in the prompt
vendor/bin/drush runserver
vendor/bin/drush uli -l 127.0.0.1:8888
  1. Run vendor/bin/drush tome:install -y

Expected behavior
Tome and Bookish was re-installed.

Additional context

  • OS: Ubuntu 20.04.3
  • PHP packages:
$ dpkg --get-selections | grep -i php # installed php versions
php-cli						install
php-common					install
php-curl					install
php-gd						install
php-mbstring					install
php-sqlite3					install
php-xml						install
php8.1-cli					install
php8.1-common					install
php8.1-curl					install
php8.1-gd					install
php8.1-mbstring					install
php8.1-opcache					install
php8.1-readline					install
php8.1-sqlite3					install
php8.1-xml					install

Reduced letter spacing on mobile menu not working

Describe the bug
I noticed that the mobile menu is a little funky, there's a jump when you click on menu items due to letter-spacing.

To Reproduce
Steps to reproduce the behavior:

  1. Visit https://bookish-drupal.netlify.app/blog
  2. Set screen size to 350px wide
  3. Force hover state on main menu item
  4. See letter-spacing get too wide

Expected behavior
Letter spacing shouldn't change on hover.

Screenshots
letter-spacing

Additional context
Add any other context about the problem here.

Manage display broken on Content types

On fresh install, can't visit any content type 'Manage display' page.

To Reproduce
Steps to reproduce the behavior:

  1. Run "drush si bookish -y" and login
  2. Go to '/admin/structure/types/manage/blog)'
  3. Click on 'Manage display' (/admin/structure/types/manage/blog/display)
  4. See error

Error: Class "Drupal\responsive_image\Plugin\Field\FieldFormatter\ResponsiveImageFormatter" not found in include() (line 32 of /Users/sahaj/Sites/bookish/web/profiles/contrib/bookish/modules/bookish_admin/modules/bookish_image/src/Plugin/Field/FieldFormatter/BookishResponsiveImageFormatter.php) #0 /Users/sahaj/Sites/bookish/vendor/composer/ClassLoader.php(571): include() #1 /Users/sahaj/Sites/bookish/vendor/composer/ClassLoader.php(428): Composer\Autoload\includeFile('/Users/sahaj/Si...') #2 [internal function]: Composer\Autoload\ClassLoader->loadClass('Drupal\\bookish_...') #3 /Users/sahaj/Sites/bookish/web/core/lib/Drupal/Component/Plugin/Factory/DefaultFactory.php(96): class_exists('Drupal\\bookish_...') #4 /Users/sahaj/Sites/bookish/web/core/modules/field_ui/src/Form/EntityDisplayFormBase.php(758): Drupal\Component\Plugin\Factory\DefaultFactory::getPluginClass('bookish_respons...', Array) #5 /Users/sahaj/Sites/bookish/web/core/modules/field_ui/src/Form/EntityDisplayFormBase.php(301): Drupal\field_ui\Form\EntityDisplayFormBase->getApplicablePluginOptions(Object(Drupal\field\Entity\FieldConfig)) #6 /Users/sahaj/Sites/bookish/web/core/modules/field_ui/src/Form/EntityViewDisplayEditForm.php(40): Drupal\field_ui\Form\EntityDisplayFormBase->buildFieldRow(Object(Drupal\field\Entity\FieldConfig), Array, Object(Drupal\Core\Form\FormState)) #7 /Users/sahaj/Sites/bookish/web/core/modules/field_ui/src/Form/EntityDisplayFormBase.php(209): Drupal\field_ui\Form\EntityViewDisplayEditForm->buildFieldRow(Object(Drupal\field\Entity\FieldConfig), Array, Object(Drupal\Core\Form\FormState)) #8 /Users/sahaj/Sites/bookish/web/core/lib/Drupal/Core/Entity/EntityForm.php(106): Drupal\field_ui\Form\EntityDisplayFormBase->form(Array, Object(Drupal\Core\Form\FormState)) #9 [internal function]: Drupal\Core\Entity\EntityForm->buildForm(Array, Object(Drupal\Core\Form\FormState)) #10 /Users/sahaj/Sites/bookish/web/core/lib/Drupal/Core/Form/FormBuilder.php(531): call_user_func_array(Array, Array) #11 /Users/sahaj/Sites/bookish/web/core/lib/Drupal/Core/Form/FormBuilder.php(278): Drupal\Core\Form\FormBuilder->retrieveForm('entity_view_dis...', Object(Drupal\Core\Form\FormState)) #12 /Users/sahaj/Sites/bookish/web/core/lib/Drupal/Core/Controller/FormController.php(73): Drupal\Core\Form\FormBuilder->buildForm(Object(Drupal\field_ui\Form\EntityViewDisplayEditForm), Object(Drupal\Core\Form\FormState)) #13 [internal function]: Drupal\Core\Controller\FormController->getContentResult(Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\RouteMatch)) #14 /Users/sahaj/Sites/bookish/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array) #15 /Users/sahaj/Sites/bookish/web/core/lib/Drupal/Core/Render/Renderer.php(564): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() #16 /Users/sahaj/Sites/bookish/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure)) #17 /Users/sahaj/Sites/bookish/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) #18 /Users/sahaj/Sites/bookish/vendor/symfony/http-kernel/HttpKernel.php(159): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() #19 /Users/sahaj/Sites/bookish/vendor/symfony/http-kernel/HttpKernel.php(81): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1) #20 /Users/sahaj/Sites/bookish/web/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #21 /Users/sahaj/Sites/bookish/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #22 /Users/sahaj/Sites/bookish/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #23 /Users/sahaj/Sites/bookish/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true) #24 /Users/sahaj/Sites/bookish/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #25 /Users/sahaj/Sites/bookish/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #26 /Users/sahaj/Sites/bookish/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #27 /Users/sahaj/Sites/bookish/web/core/lib/Drupal/Core/DrupalKernel.php(709): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #28 /Users/sahaj/Sites/bookish/web/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request)) #29 /Users/sahaj/Sites/bookish/vendor/drush/drush/misc/d8-rs-router.php(46): require('/Users/sahaj/Si...') #30 {main}

Additional context
Checked with php 7.4, 8.0 and 8.1

Thanks for help!

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.