Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
473f6ff
Update version numbers to 0.5.0
zackkrida Aug 25, 2025
210ff00
Initialize 0.5.0 release notes
zackkrida Aug 25, 2025
43f879f
Update evaluative one-liner to remove unneeded SECRET_KEY
zackkrida Aug 25, 2025
a52ebcf
List all PRs
zackkrida Aug 25, 2025
d7c636c
wire up analytics for forms
mathemancer Aug 28, 2025
e2235f6
update docs with forms analytics info
mathemancer Aug 28, 2025
9550d45
correct variable name in docstring
mathemancer Aug 28, 2025
42144ca
satisfy the linter
mathemancer Aug 28, 2025
25cf709
Add trailing slash to shared form url on frontend
pavish Aug 29, 2025
bcc624c
Accept urls with and without trailing slashes for shared forms on the…
pavish Aug 29, 2025
328f033
Only accept submissions for publicly shared forms
pavish Aug 29, 2025
2f01151
Show an error message to authenticated users when they access an unsh…
pavish Aug 29, 2025
a0931a8
Merge pull request #4727 from mathesar-foundation/fix-qa-issues-0.5.0
zackkrida Aug 29, 2025
70d647e
Merge pull request #4726 from mathesar-foundation/form_analytics
mathemancer Aug 29, 2025
11fc6b6
Initialize actual release notes
zackkrida Aug 29, 2025
a9cdba4
Merge branch 'release-0.5.0' into 0.5.0-release-notes
zackkrida Aug 29, 2025
a218295
Add images and remaining PRs
zackkrida Aug 29, 2025
c1028e9
Release notes update.
kgodey Sep 4, 2025
f3ed6ee
Merge pull request #4716 from mathesar-foundation/0.5.0-release-notes
zackkrida Sep 4, 2025
49316b5
Merge pull request #4715 from mathesar-foundation/release-0.5.0
zackkrida Sep 4, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/docs/assets/releases/0.5.0/form-builder.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/docs/assets/releases/0.5.0/modal-view.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ This is a quick way to play with Mathesar locally, but is not appropriate for sa
1. With [Docker](https://docs.docker.com/get-docker/) installed, run:

```
docker run -it --name mathesar -p 8000:8000 -e SECRET_KEY=change-this-later mathesar/mathesar:latest
docker run -it --name mathesar -p 8000:8000 mathesar/mathesar:latest
```

2. Visit [http://localhost:8000/](http://localhost:8000/) to set up an admin user account and create a database connection.
Expand Down
9 changes: 0 additions & 9 deletions docs/docs/releases/0.4.0.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
# Mathesar 0.4.0


!!! question "Help us refine forms and files!"
For our next release, we're actively working on:

- better support for working with files in Mathesar
- the ability to create forms (like Google Forms).

If you're interested in either, we'd love your input! We want to make sure we're prioritizing the right problems to solve. [Talk to us for 20 min](https://cal.com/mathesar/users), we'll give you a $25 gift card as a thank you.

## Summary

Mathesar 0.4.0 introduces support for single sign-on (SSO) using OIDC, DigitalOcean and Railway one-click deployments, and the ability to paste new records directly into Mathesar. The release also includes many smaller enhancements and fixes, such as the ability to view and edit JSON from the UI.
Expand Down
172 changes: 172 additions & 0 deletions docs/docs/releases/0.5.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
# Mathesar 0.5.0

!!! question "Want files or cross-table editing in Mathesar? Talk to us!"
For our next release, we're actively working on:

- better support for working with files in Mathesar
- the ability to edit data from multiple tables in a single view

If you're interested in either, we'd love your input so we're prioritizing the right problems to solve. [Talk to us for 20 min](https://cal.com/mathesar/users), we'll give you a $25 gift card as a thank you.

## Summary

Mathesar 0.5.0 introduces the ability to build and customize forms that allow anyone to submit data directly into your database. This release also updates the default single record view to use a modal instead of a separate page, makes column descriptions more prominent, and automates secret key generation during installation.

!!! info ""
This page provides a comprehensive list of all changes in the release.

## Improvements


### Form builder

![Screenshot of a new form in Mathesar.](../assets/releases/0.5.0/form-fill-example.png)
/// caption
Create new service requests for a bike shop, choosing from available mechanics.
///

You can now build and share forms that collect information from anyone, without giving them access to your Mathesar installation. Each form is linked to a table, and submissions are automatically saved as new records. Forms are shared via a unique link, and anyone with access to the link can submit responses.

![A screenshot of the new form builder](../assets/releases/0.5.0/form-builder.png)
/// caption
The new form builder allows respondents to choose from and/or create new linked records.
///

You can create forms that connect data across multiple tables, choose which fields to include, and control how related data is handled. Respondents can select from existing records or create new ones on the fly, depending on how you set up the form.

*Related work:*
[#4556](https://github.com/mathesar-foundation/mathesar/pull/4556 "ARCHIVE: Original Row Seeker Prototype") [#4598](https://github.com/mathesar-foundation/mathesar/pull/4598 "Forms backend - Add RPC method to fetch table & column info for form fields") [#4609](https://github.com/mathesar-foundation/mathesar/pull/4609 "Forms frontend") [#4637](https://github.com/mathesar-foundation/mathesar/pull/4637 "Implement Row Seeker within Forms") [#4644](https://github.com/mathesar-foundation/mathesar/pull/4644 "Forms backend - Re-enable forms & remove reverse_fk field type") [#4653](https://github.com/mathesar-foundation/mathesar/pull/4653 "Bump form-data from 4.0.0 to 4.0.4 in /mathesar_ui") [#4657](https://github.com/mathesar-foundation/mathesar/pull/4657 "Implement `forms.submit` RPC method") [#4663](https://github.com/mathesar-foundation/mathesar/pull/4663 "Make TableStructure store hold all structural info and remove TabularData store dependencies (Split from #4609)") [#4664](https://github.com/mathesar-foundation/mathesar/pull/4664 "Separate out common data for anonymous pages (Split from #4609)") [#4665](https://github.com/mathesar-foundation/mathesar/pull/4665 "Make certain components common, general improvements (Split from #4609)") [#4666](https://github.com/mathesar-foundation/mathesar/pull/4666 "Remove sharing specific logic that is no longer used (Split from #4609)") [#4669](https://github.com/mathesar-foundation/mathesar/pull/4669 "Disallow paste into most PK cells") [#4671](https://github.com/mathesar-foundation/mathesar/pull/4671 "Form backend unblockers") [#4673](https://github.com/mathesar-foundation/mathesar/pull/4673 "Forms feature (WIP)") [#4680](https://github.com/mathesar-foundation/mathesar/pull/4680 "Check form permissions before `get`, `get_source_info` and `submit`") [#4681](https://github.com/mathesar-foundation/mathesar/pull/4681 "Forms management UI in Schema page (Split from #4609)") [#4683](https://github.com/mathesar-foundation/mathesar/pull/4683 "Forms replace is patch") [#4691](https://github.com/mathesar-foundation/mathesar/pull/4691 "Forms permission check fix") [#4694](https://github.com/mathesar-foundation/mathesar/pull/4694 "Sort form fields via drag and drop") [#4695](https://github.com/mathesar-foundation/mathesar/pull/4695 "Form row seeker integration improvements") [#4698](https://github.com/mathesar-foundation/mathesar/pull/4698 "Improve responsive behavior of shared form fill-out page") [#4699](https://github.com/mathesar-foundation/mathesar/pull/4699 "Handle FK field interaction behavior for Forms") [#4700](https://github.com/mathesar-foundation/mathesar/pull/4700 "Forms: Throw exception while inserting into a column with fks constraints on multiple columns") [#4701](https://github.com/mathesar-foundation/mathesar/pull/4701 "Forms - Improve error states") [#4704](https://github.com/mathesar-foundation/mathesar/pull/4704 "Remove stale nested fields, implement utility for dynamic nested derived stores") [#4707](https://github.com/mathesar-foundation/mathesar/pull/4707 "Forms polish") [#4710](https://github.com/mathesar-foundation/mathesar/pull/4710 "Forms: cleanup styles, add inspector button") [#4711](https://github.com/mathesar-foundation/mathesar/pull/4711 "Forms post-submission views") [#4713](https://github.com/mathesar-foundation/mathesar/pull/4713 "Forms: UX fixes") [#4726](https://github.com/mathesar-foundation/mathesar/pull/4726 "Add forms analytics") [#4727](https://github.com/mathesar-foundation/mathesar/pull/4727 "Fix QA issues - 0.5.0")


### Single record view modal

![alt text](../assets/releases/0.5.0/modal-view.png)
/// caption
View a customer's service requests without leaving the table page.
///

Single record links in the table page now open a modal instead of a separate page. You can still access the full single record page via a link in the modal. This change aims to make it easier for users to review and edit records without losing context.

*Related work:*
[#4674](https://github.com/mathesar-foundation/mathesar/pull/4674 "Modal record view") [#4659](https://github.com/mathesar-foundation/mathesar/pull/4659 "Improve focus behavior for modals")

### More prominent column descriptions

![alt text](../assets/releases/0.5.0/column-descriptions.png)

Column headers in the table page now show icons when the column has a description. The description is displayed on hover. This eliminates the need to open the Inspector to see column descriptions.

*Related work:*
[#4685](https://github.com/mathesar-foundation/mathesar/pull/4685 "Display column descriptions in column header cells")

### Automatic `SECRET_KEY` generation during install

We've automated generating and persisting the `SECRET_KEY` variable during the Mathesar installation process. You may also provide your own `SECRET_KEY`, which will override the automatically generated one.

This simplifies some installation methods by removing the need for a previously fully manual step. However, you must still supply a `SECRET_KEY` manually when deploying on platforms without a persistent filesystem such as [DigitalOcean's App Platform](../administration/install-digitalocean.md), to ensure stability across restarts.

*Related work:*
[#4597](https://github.com/mathesar-foundation/mathesar/pull/4597 "Generate and persist `SECRET_KEY` by default")

### Clarified "edit" and "rename" actions in some menus

![Rename a table](../assets/releases/0.5.0/rename-table-action.png)

We've created a better distinction between actions that involve editing a resource and renaming a resource, for objects like tables, schemas, and forms. This was aimed at improving UX by better reflecting the purpose of the action.

*Related work:*
[#4709](https://github.com/mathesar-foundation/mathesar/pull/4709 "Change some UI terminology from edit to rename")

## Bug Fixes

- Fix UI delays when changing the table page result size [#4686](https://github.com/mathesar-foundation/mathesar/pull/4686 "Fix UI hang issues")
- Add a default value for the `OIDC_CONFIG_DICT` [#4667](https://github.com/mathesar-foundation/mathesar/pull/4667 "Add default for OIDC_CONFIG_DICT")

## Maintenance

- Write 0.5.0 Release notes [#4716](https://github.com/mathesar-foundation/mathesar/pull/4716 "0.5.0 Release notes")
- Update the setuptools package to 78.1.1 [#4484](https://github.com/mathesar-foundation/mathesar/pull/4484 "Bump setuptools from 75.5.0 to 78.1.1 in /docs")
- Remove a duplicated line from the 0.4.0 release notes [#4662](https://github.com/mathesar-foundation/mathesar/pull/4662 "Removed duplicate line.") [#4668](https://github.com/mathesar-foundation/mathesar/pull/4668 "Merge pull request #4662 from mathesar-foundation/kgodey-patch-1")


## Upgrading to 0.5.0 {:#upgrading}

### For installations using Docker Compose

If you have a Docker compose installation, run the command below:

```
docker compose -f /etc/mathesar/docker-compose.yml up --pull always -d
```

!!! warning "Your installation directory may be different"
You may need to change `/etc/mathesar/` in the command above if you chose to install Mathesar to a different directory.

### For direct installations of Mathesar on Linux, macOS, or WSL

Mathesar provides an install script that automates both fresh installs and upgrades for standalone (non-Docker) installations.

!!! tip "Previously referred to as "Installation from scratch""
In versions earlier than 0.3.0, this setup was referred to as "Installation from scratch".

Follow the steps below to upgrade Mathesar:


1. Enter your installation directory into the box below and press <kbd>Enter</kbd> to personalize this guide:

<input data-input-for="MATHESAR_INSTALL_DIR" aria-label="Your Mathesar installation directory"/>

- Do _not_ include a trailing slash.
- Do _not_ use any variables like `$HOME`.

2. Go to your Mathesar installation directory.

```
cd xMATHESAR_INSTALL_DIRx
```

!!! note
Your installation directory may be different from above if you used a different directory when installing Mathesar.

3. Download and run the install script for 0.5.0
```
curl -sSfL https://github.com/mathesar-foundation/mathesar/releases/download/0.5.0/nstall.sh -o install.sh
chmod +x install.sh

./install.sh .
```

4. Replace your gunicorn systemd service with a Mathesar systemd service

1. Disable and stop the existing gunicorn service
```
systemctl disable gunicorn.service
systemctl stop gunicorn.service
```

2. Follow the steps in [Run Mathesar as a systemd service](../administration/install-from-scratch.md#run-mathesar-as-a-systemd-service) from the installation guide

3. Remove the gunicorn service file
```
sudo rm /lib/systemd/system/gunicorn.service
```

5. Update your Caddyfile

1. Use the configuration shown in [Install and configure Caddy](.md#install-and-configure-caddy) in the installation guide, and update your Caddyfile accordingly

2. Ensure that your domains are specified directly in the first line of the Caddyfile

3. Restart your Caddy service
```
systemctl restart caddy.service
```

!!! tip
**If you're running Mathesar only on localhost and do not want it to run as a service**, you could:

1. Remove the gunicorn and caddy services
1. Start Mathesar manually with:
```
mathesar run
```
3 changes: 3 additions & 0 deletions docs/docs/user-guide/usage-data-collection.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,15 @@ When you've opted-in to usage data collection, the following information is sent
- **mathesar_version**: This is a string giving your Mathesar version, e.g., '0.2.0'.
- **user_count**: The number of user accounts on your Mathesar installation.
- **active_user_count**: The number of users who have logged into your Mathesar installation within the last 14 days.
- **sso_connected_user_count**: The number of users who have SSO configured on your Mathesar installation.
- **configured_role_count**: The number of PostgreSQL roles you've configured in your Mathesar installation.
- **connected_database_count**: The number of Databases you've connected to your Mathesar installation.
- **connected_database_schema_count**: The total number of schemas connected to your Mathesar installation.
- **connected_database_table_count**: The total number of tables connected to your Mathesar installation.
- **connected_database_record_count**: The approximate number of records in all tables connected to your Mathesar installation.
- **exploration_count**: The number of Explorations you've created in Mathesar.
- **form_count**: The number of Forms you've created in Mathesar.
- **public_form_count**: The number of Forms you've published publicly in Mathesar.

## Viewing Actual Reports

Expand Down
5 changes: 3 additions & 2 deletions docs/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@ nav:
- Overview: api/index.md
- Methods: api/methods.md
- Releases:
- '0.4.0': releases/0.4.0.md
- '0.5.0': releases/0.5.0.md
- Previous releases:
- '0.4.0': releases/0.4.0.md
- '0.3.0': releases/0.3.0.md
- '0.2.5': releases/0.2.5.md
- '0.2.4': releases/0.2.4.md
Expand Down Expand Up @@ -164,7 +165,7 @@ markdown_extensions:
permalink: true

extra:
mathesar_version: 0.4.0
mathesar_version: 0.5.0
version:
provider: mike
alias: true
2 changes: 1 addition & 1 deletion mathesar/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
default_app_config = 'mathesar.apps.MathesarConfig'

__version__ = "0.4.0"
__version__ = "0.5.0"
5 changes: 5 additions & 0 deletions mathesar/analytics.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
ConfiguredRole,
Database,
Explorations,
Form,
InstallationID,
User,
)
Expand Down Expand Up @@ -109,6 +110,8 @@ def prepare_analytics_report():
connected_database_table_count=connected_database_table_count,
connected_database_record_count=connected_database_record_count,
exploration_count=Explorations.objects.count(),
form_count=Form.objects.count(),
public_form_count=Form.objects.filter(publish_public=True).count()
)


Expand All @@ -129,6 +132,8 @@ def upload_analytics_reports():
"connected_database_table_count": report.connected_database_table_count,
"connected_database_record_count": report.connected_database_record_count,
"exploration_count": report.exploration_count,
"form_count": report.form_count,
"public_form_count": report.public_form_count,
}
for report in reports
]
Expand Down
10 changes: 10 additions & 0 deletions mathesar/migrations/0007_form_formfield.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,14 @@ class Migration(migrations.Migration):
DROP CONSTRAINT form_role_server_integrity;
"""
),
migrations.AddField(
model_name='analyticsreport',
name='form_count',
field=models.PositiveIntegerField(blank=True, null=True),
),
migrations.AddField(
model_name='analyticsreport',
name='public_form_count',
field=models.PositiveIntegerField(blank=True, null=True),
),
]
2 changes: 2 additions & 0 deletions mathesar/models/analytics.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,6 @@ class AnalyticsReport(BaseModel):
connected_database_table_count = models.PositiveIntegerField(null=True, blank=True)
connected_database_record_count = models.PositiveBigIntegerField(null=True, blank=True)
exploration_count = models.PositiveIntegerField(null=True, blank=True)
form_count = models.PositiveIntegerField(null=True, blank=True)
public_form_count = models.PositiveIntegerField(null=True, blank=True)
uploaded = models.BooleanField(default=False)
4 changes: 4 additions & 0 deletions mathesar/rpc/analytics.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ class AnalyticsReport(TypedDict):
connected_database_record_count: The total number of records in
all connected databasees (approximated)
exploration_count: The number of explorations.
form_count: The number of forms.
public_form_count: The number of published forms.
"""
installation_id: Optional[str]
mathesar_version: str
Expand All @@ -41,6 +43,8 @@ class AnalyticsReport(TypedDict):
connected_database_table_count: int
connected_database_record_count: int
exploration_count: int
form_count: int
public_form_count: int

@classmethod
def from_dict(cls, d):
Expand Down
3 changes: 1 addition & 2 deletions mathesar/rpc/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -414,5 +414,4 @@ def submit(*, form_token: str, values: dict, **kwargs) -> None:
form_token: The unique token of the form.
values: A dict describing the values to insert.
"""
user = kwargs.get(REQUEST_KEY).user
return submit_form(form_token, values, user)
return submit_form(form_token, values)
2 changes: 1 addition & 1 deletion mathesar/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
path('administration/settings/', views.admin_home, name='admin_settings'),
path('i18n/', include('django.conf.urls.i18n')),
path('info/analytics_sample_report/', views.analytics_sample_report, name='analytics_sample_report'),
path('shares/forms/<str:form_token>/', views.anonymous_route_home, name='shared_form'),
re_path(r'^shares/forms/(?P<form_token>[0-9a-zA-Z\-]+)/?', views.anonymous_route_home, name='shared_form'),
re_path(
r'^db/(?P<database_id>\d+)/schemas/(?P<schema_id>\d+)/',
views.schema_route,
Expand Down
4 changes: 2 additions & 2 deletions mathesar/utils/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,9 @@ def iterate_form_fields(fields, parent_field=None, depth=0, fields_to_pick=[]):
)


def submit_form(form_token, values, user):
def submit_form(form_token, values):
form_model = Form.objects.get(token=form_token)
assert has_permission_for_form(user, form_model), 'Insufficient permission to submit the form'
assert form_model.publish_public, 'This form does not accept submissions'
fields_to_pick = [i for i in values.keys() if isinstance(values[i], dict) and values[i].get('type') == 'pick']
field_info_list = [
{
Expand Down
1 change: 1 addition & 0 deletions mathesar_ui/src/i18n/languages/en/dict.json
Original file line number Diff line number Diff line change
Expand Up @@ -768,6 +768,7 @@
"theme_light": "Light",
"theme_system": "System",
"this_behavior_is_not_configurable": "This behavior is not configurable.",
"this_form_is_not_publicly_shared": "This form is not publicly shared.",
"this_will_remove_following_columns": "This will remove the following column(s):",
"this_will_remove_following_transformations": "This will remove the following transformation(s):",
"time_to_create_exploration": "It's time to use your tables. Create your first exploration.",
Expand Down
17 changes: 13 additions & 4 deletions mathesar_ui/src/routes/SharedFormRoute.svelte
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<script lang="ts">
import { _ } from 'svelte-i18n';

import { api } from '@mathesar/api/rpc';
import { isDefinedNonNullable } from '@mathesar/component-library';
import Errors from '@mathesar/components/errors/Errors.svelte';
Expand Down Expand Up @@ -27,10 +29,17 @@
{#if isLoading}
<LoadingPage />
{:else if $rawFormStore.resolvedValue && $formSourceInfo.resolvedValue}
<SharedDataFormFillPage
rawDataForm={$rawFormStore.resolvedValue}
formSource={$formSourceInfo.resolvedValue}
/>
{#if $rawFormStore.resolvedValue.publish_public}
<SharedDataFormFillPage
rawDataForm={$rawFormStore.resolvedValue}
formSource={$formSourceInfo.resolvedValue}
/>
{:else}
<!-- For authenticated users accessing the un-shared form -->
<ErrorPage showGoToRoot={false}>
{$_('this_form_is_not_publicly_shared')}
</ErrorPage>
{/if}
{:else}
<ErrorPage showGoToRoot={false}>
<Errors {errors} showFallbackError />
Expand Down
Loading
Loading