Skip to content

Include Formatting Helpers for CollectionView and PageBlock #284

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

rzulli
Copy link

@rzulli rzulli commented Feb 17, 2021

This pull request adds new helper functions in all CollectionView and in PageBlock with the following capabilities:

  • PageBlock:

    • set_full_width(bool) - Enable/disable Full Width option on pages
    • set_small_text(bool) - Enable/disable Small Text option on pages
    • set_page_font(str) - Set Page Font ("default", "mono", "serif")
    • set_page_icon(str) - Set Page Icon from emoji unicode
    • set_page_cover(str, float) - Set page cover and position from image url and float value.
    • set_page_cover_position(float) - Set page cover position from float value.
  • CollectionView:

    • update_view_sort(list) - Add/Remove sort to CollectionView from format [["property","direction"],....]
    • update_view_filter(dict) - Add/Remove filter to CollectionView from filter dictionary (format specified below)
    • update_view_aggregation(list) - Add/Remove aggregation to CollectionView from format [["property","aggregator"],...]
    • _update_query2|_update_format - ContextManager helper to submit query2 and format transactions
  • BoardView, TableView, ListView, GalleryView, CalendarView, TimelineView:

    • format_properties - Each CollectionView has its own set of properties that can be formatted. Capabilities include:
      • Change visibility, width of properties
      • Change cover properties such as origin (property or page_content or page_cover) , size and aspect (Gallery and Board)
      • Change how many records show on first load (Gallery, List and Timeline)
    • Helpers to update CollectionView settings (eg. Timeline_by|Timeline_by_end from TimelineView, groupBy from BoardView, wrapCell from TableView)
  • Minor changes to client request code (submit_transaction) to enable correct request construction

  • Smoketests of all new capabilities

As of today, all page and collectionview settings are covered by this pull request.

Thanks!

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

Successfully merging this pull request may close these issues.

1 participant