Skip to content

Build: Add Support of cover image for pages and also grid view for list of pages (#21)#6115

Closed
brij-mandaliya wants to merge 2 commits intoBookStackApp:developmentfrom
Improwised:development
Closed

Build: Add Support of cover image for pages and also grid view for list of pages (#21)#6115
brij-mandaliya wants to merge 2 commits intoBookStackApp:developmentfrom
Improwised:development

Conversation

@brij-mandaliya
Copy link
Copy Markdown

@brij-mandaliya brij-mandaliya commented Apr 23, 2026

  • Buid: Cover image for pages and also add grid view for list of pages in chapter show page with test case and update create test case for page and add two test case one for update cover image for page and another for reset cover image for page

  • feat(pages): add image_id support and update cover handling.

  • Added image_id field to entity_page_data model and migration
  • Updated PageQueries to select image_id and reference entity_page_data columns explicitly
  • Modified PageRepo to handle cover image updates consistently for drafts and revisions
  • Extended EntityCover and EntityHtmlDescription to support Page entities
  • Adjusted BookContents queries to use entity_page_data.draft
  • Updated Blade views to use coverInfo()->getUrl() for page list items
  • Introduced sidebar view-toggle for pages in chapter actions
  • Removed ContainerTrait from Page and replaced defaultTemplate with descriptionInfo
  • refactor(entities): migrate draft and cover image handling to entity_container_data table
  • Move draft status from entities table to entity_container_data table
  • Add fillable fields to EntityContainerData for image_id, sort_rule_id, and description fields
  • Update all draft queries to use entity_page_data.draft join condition
  • Enhance ReferenceChangeContext to track URL and permalink mappings during cloning
  • Update ReferenceUpdater to process reference changes in descriptions and page content
  • Modify cover image access to use coverInfo() method instead of cover property
  • Fix entity-list-item class naming from chapter to page
  • Update copy tests to verify reference updating during entity cloning

BREAKING CHANGE: Draft status is now stored in entity_container_data table instead of entities table

Details

Checklist

  • I have read the BookStack community rules.
  • This PR does not feature significant use of LLM/AI generation as per the community rules above.

…st of pages (#21)

* Buid: Cover image for pages and also add grid view for list of pages in chapter show page with test case and update create test case for page and add two test case one for update cover image for page and another for reset cover image for page

* fix: lint php

* set to get default page cover image from env

* fix: lint php

* feat(pages): add image_id support and update cover handling.

- Added `image_id` field to `entity_page_data` model and migration
- Updated `PageQueries` to select `image_id` and reference entity_page_data columns explicitly
- Modified `PageRepo` to handle cover image updates consistently for drafts and revisions
- Extended `EntityCover` and `EntityHtmlDescription` to support `Page` entities
- Adjusted `BookContents` queries to use entity_page_data.draft
- Updated Blade views to use `coverInfo()->getUrl()` for page list items
- Introduced sidebar view-toggle for pages in chapter actions
- Removed `ContainerTrait` from `Page` and replaced defaultTemplate with descriptionInfo

* fix the link.

* fix link

* refactor(entities): migrate draft and cover image handling to entity_container_data table

- Move draft status from entities table to entity_container_data table
- Add fillable fields to EntityContainerData for image_id, sort_rule_id, and description fields
- Update all draft queries to use entity_page_data.draft join condition
- Enhance ReferenceChangeContext to track URL and permalink mappings during cloning
- Update ReferenceUpdater to process reference changes in descriptions and page content
- Modify cover image access to use coverInfo() method instead of cover property
- Fix entity-list-item class naming from chapter to page
- Update copy tests to verify reference updating during entity cloning

BREAKING CHANGE: Draft status is now stored in entity_container_data table instead of entities table

* fix lint

* fix analysis
@ssddanbrown
Copy link
Copy Markdown
Member

Thanks for offering this PR @brij-mandaliya, but there are too many different changes here, and I'm not confident I'd look to included the mentioned features at this time. Therefore I'm going to close this off.

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants