Guides
v0.0.12
Each guide covers one task with Mishka Gervaz: mount a table and a form in a LiveView, build a table and a form, filter a table, add row and bulk actions, keep the table state in the URL and update it live, split a form into steps, add file uploads, react to events with hooks, and translate labels and messages.
Pick the guide for the job in front of you. The pages below show each one with a short summary.
- Mount a table and a form in a LiveView Mount the Gervaz table and form LiveComponents, decode the URL, answer their messages, forward realtime updates and close the form's modal.
- Build an admin table Build a Gervaz admin table: name it, choose its actions and preloads, declare and sort columns, and draw cells with types or render functions.
- Filter a table Add search, select, relation, date range and dependent filters to a Gervaz table, then group them into collapsible panels.
- Add row and bulk actions Add edit, archive, restore and delete buttons to each row of a Gervaz table, lay them out inline or in a dropdown, and add bulk actions.
- Open a row in a drawer Open a Mishka Gervaz table row in a drawer as a record view or an edit form, close it after a save, and use drawers, sheets and windows on your own page.
- Ask before an action Ask before a Mishka Gervaz row action, bulk action or save with the browser dialog or a question window that has a tone and a typed answer.
- Show a toast Show Mishka Gervaz toasts on a LiveView page: attach them, push one with an Undo or a link, send one from a component and answer the Undo.
- Share table state and update it live Set the pagination of a Gervaz table, keep its filters and page in the URL, update rows over PubSub, and reload it on a timer.
- Build an admin form Build a Gervaz admin form: declare fields, pick related records, edit nested maps, group the fields and set the submit buttons.
- Split a form into steps Turn a Gervaz form into a wizard or tabs, define its steps, choose how the reader moves, and gate a step with your own rule.
- Add file uploads to a form Add file uploads to a Gervaz form: declare the dropzone, receive the files in an Ash action and show existing files in edit mode.
- Place a form's groups in your page Place the groups of a Mishka Gervaz form in your own LiveView markup, put in a value your page worked out, track unsaved changes and draw your buttons.
- React to table and form events with hooks Use Gervaz hooks to scope a table query, observe or replace row and bulk actions, control flash messages, and react to form events.
- Translate labels and messages Point Gervaz at your Gettext backend, mark strings that only the DSL holds for extraction, and keep the locale in async work.