Collections: Organization and Context
Collections in Commonplace provide a way to organize and contextualize your cards. This document explains what collections are, how they work, and how they help you manage your information.
What is a Collection?
A collection in Commonplace is a container that groups related cards together. Think of it as a folder, album, or notebook that provides context and organization for your information. Each collection:
- Has a unique identifier
- Contains references to cards
- Can have its own metadata and properties
- Can be displayed in different modes
- Can contain other collections (nesting)
Collections are designed to be flexible, allowing you to organize your information in ways that make sense for your specific needs.
Collection Features
Multi-membership
One of the most powerful features of collections is that cards can belong to multiple collections simultaneously through references. This means:
- The same card can appear in different contexts
- You can organize information in multiple ways without duplication
- Changes to a card can be reflected across all collections where it appears
- You can create temporary or purpose-specific collections without disrupting your main organization
Reference Counting
Collections manage card ownership through references:
- When you add a card to a collection, you're creating a reference to that card
- When you remove a card from a collection, you're removing a reference
- Cards remain in the system as long as at least one reference exists
- When the last reference is removed, the card is moved to a "Recently Deleted" collection
This reference-based approach ensures that cards aren't accidentally lost when removed from a single collection.
Easy Creation
Collections are designed to be quick and easy to create:
- You can create a new collection with just a few clicks
- You can create collections for temporary purposes or permanent organization
- You can quickly gather cards into a new collection based on search results or selections
- You can convert existing groups of cards into formal collections
Collection Modes
Collections can be displayed in different modes to support various workflows and cognitive styles:
Summary Mode
- Compact representation of the collection
- Default UI that shows summary information for the collection
- When the collection is part of another collection that's in Spatial Mode (see below), it's compact and easy to work with
- May display custom UI for collection contents or summary, driven by collection-attached Commonscript
- Useful for dashboards, overviews, or specialized visualization
- Useful for working with large collections that are data sources or data sinks for certain workflows
List Mode
- Cards shown as a list with filtering and sorting options
- Each card appears as a mini-card taking the full width of the collection
- Displays 1-2 rows of information per card (customizable via schema)
- Supports multiple ordering methods:
- Manual ordering (drag and drop)
- Automatic ordering by card properties (date, title, etc.)
- Custom ordering based on Card Type-defined fields
- Saved ordering configurations for different views
- Ordering is preserved when switching between collection modes
- Useful for browsing, searching, and managing cards in a structured way
Spatial Mode
- Canvas for organizing cards with visible links
- Resizable canvas that can be expanded for spatial organization
- Links between cards and their inlets/outlets are shown graphically
- Collections can contain other collections, creating nested organizational structures
- Sub-collections appear as compact objects that can be expanded or interacted with in both Spatial and List modes
- Useful for "thinking" or "exploring" activities that benefit from spatial arrangement
These modes can be switched at any time, allowing you to use the most appropriate view for your current task.
These modes enable a flexible system that adapts to different cognitive tasks and workflows. The ability to switch between modes allows users to:
- Manage information density based on current needs
- Transition smoothly between overview (Summary), structured browsing (List), and creative exploration (Spatial)
- Use spatial organization for complex thinking while maintaining structured data
- Visualize connections between ideas that might not be apparent in linear views
- Create multiple perspectives on the same underlying data through references
- Scale from simple note-taking to complex knowledge management within a unified system
Collection Structure
Collections in Commonplace can be organized hierarchically:
Nested Collections
- Collections can contain other collections
- This allows for hierarchical organization of information
- Sub-collections can be expanded or collapsed for easier navigation
- Permissions and settings can be inherited from parent collections
Collection Properties
Collections themselves are similar to cards:
- They can have their own Collection Types that define:
- Metadata fields beyond the basics (creation date, author, etc.)
- Display properties for different viewing contexts
- Containment rules for what types of cards or sub-collections can be included
- Organizational properties like default sorting, grouping, or layout
- Behavior rules for how the collection responds to events
- Commonscript hooks for custom functionality
- They can have metadata like creation date, author, and description
- They can be referenced in multiple parent collections
- They can be versioned using the same copy-on-write mechanism as cards
Hierarchy Rules and Constraints
To maintain a consistent and manageable structure, Commonplace enforces certain rules for collection hierarchies:
- No circular references: A collection cannot contain itself, either directly or indirectly
- Containment validation: Collections can define rules about what types of cards or collections they can contain
- Permission inheritance: Sub-collections cannot have more permissions than their parent collections
- Depth limits: There may be practical limits to how deeply collections can be nested
These rules ensure that your organizational structure remains logical and navigable.
Card Ordering in Collections
Collections maintain information about the order of cards, which is particularly important in List Mode but also applies to other modes:
Ordering Methods
- Manual ordering: Arrange cards by dragging and dropping them into the desired sequence
- Property-based ordering: Sort cards automatically based on properties like creation date, title, or any field
- Type-specific ordering: Use fields defined in a card's Type as sort criteria
- Custom ordering: Define complex sort rules using multiple criteria
Persistence of Order
- Card order is stored as part of the collection's data
- Each card reference in a collection includes position information
- The same card can have different positions in different collections
- Order is preserved when switching between collection modes
Default Ordering
Collections can specify default ordering methods:
- Initial order for newly added cards (e.g., at the beginning, end, or by date)
- Default sort criteria when viewing the collection
- Whether manual reordering is allowed or locked
Working with Collections
As you use Commonplace, you'll create, modify, and organize collections to structure your information. Common operations include:
- Creating new collections for different purposes
- Adding cards to collections
- Removing cards from collections
- Organizing cards within collections (sorting, grouping, spatial arrangement)
- Reordering cards to create meaningful sequences
- Switching between collection modes
- Nesting collections to create hierarchies
- Sharing collections with others
Next Steps
TODO