Skip to content

v0.10.0

Choose a tag to compare

@github-actions github-actions released this 07 Jul 13:10
63d9ec8
  • @lowdefy/modules-mongodb-activities: ### Minor Changes

  • #93 ce955c2 Thanks @JohannMoller! - Six backwards-compatible extension points in the activities module:

    • Type behavior flags — the meeting-specific form behavior is no longer keyed to the literal meeting type id. Activity-type enum entries (built-in or registered via the activity_types var) now carry optional flags: agenda: true renders the Agenda Topics section, duration: true / direction: true show those meta fields in the form and view, and contact_label titles the linked-contacts selector (default "Participants"). The built-ins keep their previous behavior as defaults (call: duration; email: direction + CC; meeting: agenda + duration + Attendees), so a consumer type can now be fully meeting-like.
    • Per-type attribute fields — new fields.attributes_by_type.<type_id> var. A type with an entry renders that block list (form and detail view) instead of the global fields.attributes array; types without an entry fall back to the global array.
    • Attachment slots — the attachments UI is now a pair of overridable block-array slots: components.form_attachments (defaults to the files module's file-manager at the bottom of the form) and components.view_attachments (defaults to the files file-card sidebar tile on the detail page). Apps that don't wire the files module can supply their own blocks or [].
    • Post-create hook — new hooks.on_created var: actions run after every successful create (new page and capture_activity modal) with the new activity's id at state.activity_id and the captured fields still in state. On the new page, setting state.on_created_handled: true in the hook skips the built-in reset + navigate-to-view tail so the hook can route elsewhere.
    • Agenda origin marker — task docs created from activity agenda topics are stamped metadata.task_type: agenda (create flow, and backfilled by the edit flow's upsert), so host apps can distinguish them from adhoc tasks without relying on the activity_ids back-link.
    • Form option requests — new form_requests var: request configs spliced into the new/edit page request lists and fired on page init, so request-backed consumer fields.* blocks (e.g. a selector whose options come from an app collection) have their option sources available. The pages set a state.activity_form_context marker (page on new/edit, view on the detail page, modal in the capture_activity modal) so such fields can gate themselves to the full-page form and stay out of the modal, where page requests aren't available.
  • @lowdefy/modules-mongodb-companies: ### Patch Changes

  • #93 cd5373f Thanks @JohannMoller! - Company selector now consumes request_stages.selector. The stages are injected into the company-selector aggregation after the base active-company $match and before the label projection, so consumer stages can filter or derive on raw document fields — e.g. excluding app-specific soft-delete markers from pickers. Previously the var was documented in the manifest but never applied.

  • #96 5742843 Thanks @JohannMoller! - Standardise soft-delete reads on the deleted change-stamp shape.

    The regular-MongoDB requests (get_company, get_company_children, get_descendant_company_ids, get_companies_for_selector) matched live companies with deleted: { $ne: true }, which only excludes a boolean deleted: true and would let soft-deleted docs through once deleted is a change-stamp object. They now use deleted.timestamp: { $exists: false }, matching the Atlas Search reads and the rest of the repo. See the soft-delete convention.

    Migration is only needed if a host app previously wrote a boolean deleted: true; promote those to a change stamp:

    db.companies.updateMany({ deleted: true }, [
      {
        $set: {
          deleted: { timestamp: "$updated.timestamp", user: "$updated.user" },
        },
      },
    ]);
  • @lowdefy/modules-mongodb-contacts: ### Patch Changes

  • #94 f1d8f6c Thanks @Yianni99! - Add a role-filtered simple contact selector

    New role-contact-selector contacts component: a Selector (or MultipleSelector
    via mode) of active contacts scoped to one or more roles (matched against
    apps.<app_name>.roles), storing a denormalized { contact_id, name, email }
    value — object in single mode, array in multiple — so read-only views render it
    as a contact (name + link). New role_contact and role_contact_multiple
    workflows form fields wrap the single- and multiple-select cases. A lighter
    alternative to the rich contact picker (contact) when a form only needs to pick
    existing contacts in a given role.

  • #96 5742843 Thanks @JohannMoller! - Standardise the soft-delete read on the deleted change-stamp shape.

    get_contact_companies filtered the companies lookup with deleted: { $ne: true }, which would let soft-deleted companies through once deleted is a change-stamp object. It now uses deleted.timestamp: { $exists: false }, matching the soft-delete convention.

  • @lowdefy/modules-mongodb-files: ### Minor Changes

  • #96 5742843 Thanks @JohannMoller! - Soft-delete now uses a deleted change stamp instead of a removed boolean (breaking).

    The soft-delete marker on file docs is renamed removeddeleted and changed from a boolean to a change stamp object, matching the convention used by activities and the rest of the repo. delete-file sets deleted to a change stamp (capturing who/when), save-file initialises deleted: null, and get-entity-files reads live files with deleted.timestamp: { $exists: false }.

    Existing data needs a migration. Deleted docs already recorded who/when on their updated stamp, so promote it into deleted. Run it as a single per-document pipeline (a separate { removed: { $ne: true } } pass would match already-migrated docs — $ne matches missing fields — and clobber the new stamps):

    db.files.updateMany({ removed: { $exists: true } }, [
      {
        $set: {
          deleted: { $cond: [{ $eq: ["$removed", true] }, "$updated", null] },
        },
      },
      { $unset: "removed" },
    ]);
  • @lowdefy/modules-mongodb-user-admin: ### Patch Changes

  • #96 5742843 Thanks @JohannMoller! - Standardise the soft-delete read on the deleted change-stamp shape.

    get_all_users and get_user_excel_data matched live users with deleted: null. They now use deleted.timestamp: { $exists: false } so every module reads soft-delete identically (see the soft-delete convention). Behaviour is unchanged — both predicates treat null/absent as live and exclude a real delete stamp.

  • @lowdefy/modules-mongodb-workflows: ### Patch Changes

  • #94 18d8876 Thanks @Yianni99! - Make action edit-page button titles configurable

    The edit page's progress ("Save Draft") and submit ("Submit") button titles can
    now be overridden per action via page_config.buttons.progress.title /
    page_config.buttons.submit.title (defaults unchanged). This lets an app relabel
    e.g. a perpetual-log action's "Save Draft" button to "Save".

  • #94 466e976 Thanks @Yianni99! - Add on_change event support to workflow form field components

    The button_selector, number, radio_selector, checkbox_selector,
    checkbox_switch, text_input, text_area, enum_selector, date_selector,
    date_range_selector, and tiptap_input field components now accept an
    on_change var (mirroring selector / yes_no_selector) that wires to the
    block's events.onChange. Previously these fields silently dropped any authored
    field-level change handler, so form logic like "clear dependent field when this
    one changes" only worked on a handful of field types.

  • #94 f1d8f6c Thanks @Yianni99! - Add a role-filtered simple contact selector

    New role-contact-selector contacts component: a Selector (or MultipleSelector
    via mode) of active contacts scoped to one or more roles (matched against
    apps.<app_name>.roles), storing a denormalized { contact_id, name, email }
    value — object in single mode, array in multiple — so read-only views render it
    as a contact (name + link). New role_contact and role_contact_multiple
    workflows form fields wrap the single- and multiple-select cases. A lighter
    alternative to the rich contact picker (contact) when a form only needs to pick
    existing contacts in a given role.

  • #94 c93ad39 Thanks @Yianni99! - Edit-page Save Draft now sends the comment / comment_visibility inputs with the progress call and clears them after a successful save, matching the check page's progress reseed — so a draft comment is no longer folded into a later event on the next Save Draft.