Commit graph

1518 commits

Author SHA1 Message Date
Soham Kulkarni
64db88228f
refactor: seperate blogs into a seperate app (#32737)
* fix: remove doctypes,workspace blocks, files

* fix: minor python tests and UI tests

* fix: remove blog post from tests

* fix: remove blogger as role for tests

* fix: add check for if doctype exists

* fix: ui test

* fix: more cleanup

* fix: cleanup comments and fix test_query

* fix: resolve conflicts

* fix: add warning and handle comments
2025-07-28 14:35:02 +05:30
mahsem
3efc476da9
fix: web_form_context_title_translation (#33173) 2025-07-23 18:14:33 +05:30
zeel-codder
74ef86e94f fix: replace get_last_doc with get_lazy_doc in Web Form fetch for edit 2025-07-15 00:37:53 +05:30
Soham Kulkarni
439215b91e
Merge branch 'develop' into fix/add-missing-messages-to-load-translations 2025-07-11 15:42:05 +05:30
avc
caf1065863
fix: add translatable strings for file upload dialog on webform (#33156)
* fix: add webform translatable strings

* fix: linters
2025-06-30 10:15:31 +05:30
Sagar Vora
2e5c8bea03 feat: frappe.utils.orjson_dumps 2025-06-26 17:37:51 +05:30
flaviacastro
0d58394db0 fix: add missing messages to load_translations in web form list file 2025-06-25 12:27:03 +00:00
Sagar Vora
b3e1eda4c8
feat: global frappe.in_test flag (#32960)
* feat: global `frappe.in_test` flag

* feat: helper utility to toggle `frappe.in_test`

* fix: use `toggle_test_mode` util

* fix: use `frappe.in_test`

* chore: add comment explaining global `in_test`

* chore: ignore commit replacing flag usage

* test: temporarily disable `frappe.in_test`

this worked earlier because flag was set in werkzeug.local which was separate for API test client

* test: add comment explaining change
2025-06-17 19:19:31 +05:30
Ankush Menat
c02f1aa5f1 perf: Always defer web page view logs
Unnecessary continuous load on DB.
2025-06-13 11:25:50 +05:30
Ankush Menat
49f582ae57 perf: Use lazy doc in a lot more places 2025-06-11 09:55:45 +05:30
Ankush Menat
8088bd3891
chore: Drop empty UnitTestCases (#32867)
Next to zero adoption after introduction, just noise in codebase.

I don't see any point in arguing about purity of test cases when
existence and quality of test cases is usually the bigger problem.

Dropped using semgrep
2025-06-10 05:28:53 +00:00
Ankush Menat
f9ff807e4c
refactor: Rename get_settings -> get_single_value (#32840)
Not all single doctypes are settings, so this is better. Implicit
caching is fine, same is done for `db` APIs on singles. We *should* aim
for 100% correctness of caching implementation, especially for singles.

Thanks to @netchampfaris for the suggestion.
2025-06-09 04:20:29 +00:00
Ankush Menat
caf415f13e
feat: get_settings (#32821)
* feat: get_settings

get_cached_value doesn't work well with singles because you either need
to pass `None` or repeat doctype name... both are awekward and easy to
shoot yourself in foot with.

* refactor: Use cached settings
2025-06-06 18:34:17 +05:30
Ankush Menat
47a47a9b5d refactor!: Change internal datastructure of db.value_cache
It's now a defaultdictionary of `[doctype][name/filters][fieldname]`

This allows us to implement granular clearing and improve usage of this cache.
2025-06-05 14:46:03 +05:30
Saad Chaudhary
57bb1abdeb
fix(web_form): row number column in child tables were showing the wrong title
* fix:Web Form Child Table: Incorrect title showing for 'row number' column #32331

* fix : code alignment with develop branch

* fix : code alignment with develop branch

---------

Co-authored-by: saadchaudhaary <saad@zirrusone.com>
2025-06-04 13:53:48 +05:30
mahsem
6e0f9b743c
fix: state_translatability (#32533) 2025-05-15 18:19:58 +05:30
flaviacastro
1bf0aaf8ee chore: add webform list empty state messages to load_translations 2025-04-28 19:44:38 -03:00
Marica
2a75c27d17
fix: Show authorized private attachments in web forms (#32177) 2025-04-25 14:21:41 +02:00
Corentin Forler
c0d332a9b0
fix(blog): Strip tags before truncating content for intro 2025-04-22 11:01:54 +02:00
Sagar Vora
83b6231f95 chore: add type hints to whitelisted endpoints 2025-04-21 15:25:55 +05:30
sokumon
da1caec4a3 fix: add title if web form title is missing 2025-04-02 16:33:40 +05:30
Gavin D'souza
e9691a1b08
perf: Google Calendar
* Check if sync is enabled before refreshing token & shit - reduce
   deletion of event times like a 1000x
 * Use cached settings to avoid reading the same thing while operating
   on Events or Google Calendar syncs
2025-03-17 19:11:06 +01:00
marination
943adecae3 fix: Translate names if "Translate Link Fields" is enabled 2025-03-11 19:57:53 +01:00
marination
42f977ef59 fix: Translate link fields in Webform 2025-03-10 18:07:27 +01:00
Ankush Menat
f90a450bd4
feat: specify row compression for tables (#31361)
Certain tables contain A LOT of duplicate data, it makes sense to enable
compressed row format on them by default. I've seen 5-10 fold reduction
in DB size after enabling compressed format on select few tables.

This has some performance overhead:
- both compressed and uncompressed pages live in buffer pool.
- compression/decompression

Note:
- These cons don't apply much on DocTypes I am enabling this for.
- I am not enabling this on existing sites, migration can take a long
  time! Do it manually with `transform-database` command if you want to.
2025-02-21 09:44:40 +05:30
Sagar Vora
6e20eed640 fix: redo some fixes to ensure cypress passes 2025-02-20 12:51:37 +05:30
Sagar Vora
d3bb578c2f fix: update type hints to allow integers 2025-02-19 12:31:12 +05:30
Sagar Vora
eded5eac24 fix: explicitly check type of form name 2025-02-19 12:17:31 +05:30
Sagar Vora
f4062b4d7a fix: ensure consistent error in response 2025-02-19 12:10:59 +05:30
Rushabh Mehta
e3b071dad7 fix(minor): Extract images from markdown as well 2025-02-03 17:03:46 +05:30
Akhil Narang
21ec09e4ef
fix(web_form): allow loading translations for more strings (#30931)
* Fix: Add more translation to web form

Fix that there is translation missing in frontend

* Fix missing translation context

* Adding left messages

* Fix typo

* Add even more missing translation

* chore: format

Signed-off-by: Akhil Narang <me@akhilnarang.dev>

---------

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
Co-authored-by: petnd <58605206+petnd@users.noreply.github.com>
2025-01-29 11:07:55 +00:00
Akhil Narang
7ee8b17ca8
chore: format
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2025-01-29 11:09:47 +05:30
Corentin Forler
cd68867535
fix(blog): Fix typo in search query 2025-01-28 17:03:14 +01:00
Corentin Forler
53e86379fe
fix(website): Clear cached list of child top bar items (#29223) 2025-01-22 20:52:40 +05:30
Ankush Menat
cfa4534757
perf: faster page view count queries (#29219) 2025-01-17 09:46:03 +00:00
Ankush Menat
0ff3e6fd4c perf: cache meta tags existence 2025-01-14 19:19:36 +05:30
Ankush Menat
cc838022b1 perf: use client cache for fetching website settings and theme 2025-01-14 14:40:25 +05:30
Ankush Menat
aed412f9eb perf: Use client-cached website settings 2025-01-14 14:36:35 +05:30
Raffael Meyer
fe196062b5
fix(Web Form): add syntax highlighting for client script (#28964) 2024-12-30 22:16:37 +00:00
Akhil Narang
4509e75179
fix: convert frappe.boot to JSON properly
We have `frappe.as_json` set as the jinja filter for json

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-12-13 11:45:57 +05:30
Ankush Menat
60bc472ab6
revert: restore JSON files (#28717)
* Revert: bring back JSON files

* chore: re-apply changes to new files

* chore: remove old TOML files

* chore: delete empty files
2024-12-09 08:41:56 +00:00
Akhil Narang
84ef6ec677
refactor: fixup with ruff 0.8.1
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-12-04 13:18:04 +05:30
David Arnold
91a737d8fe
chore(typing): fix some (exotic) type errors treewide (#28210) 2024-10-21 10:02:04 +00:00
Suraj Shetty
a63f902648 refactor: Use sentence case for fieldnames
ref: https://github.com/frappe/erpnext/wiki/Naming-Guidelines#field-naming
2024-10-21 12:07:22 +05:30
Suraj Shetty
84f4a76290 refactor: Re-organize fields 2024-10-21 11:51:08 +05:30
Suraj Shetty
d35518639b feat: Add a field to accept allowed embedding domains 2024-10-18 11:30:11 +05:30
David Arnold
0204db6547
chore: move to use new test record api (#28105) 2024-10-12 23:13:41 +00:00
David Arnold
443c38daa9
refactor: toml test records for readability (#28065)
* refactor: toml test records for readability

* fix: maintain backwards compatibility

* refactor: transform in-tree records

* chore: don't use deprecated functions (treewide)

* chore: revert migration of tests which depend on old test records list

* feat: add cls.globalTestRecords on IntegrationTestCase
2024-10-10 13:24:02 +02:00
David Arnold
83bc1f09e9
refactor: clarify test record dep management in test modules (#28060) 2024-10-09 13:44:27 +00:00
David Arnold
c114e5fae8
refactor: unit vs integration treewide (#27992)
* refactor: constitute unit test case

* fix: docs and type hints

* refactor: mark presumed integration test cases explicitly

At time of writing, we now have at least two base test classes:

- frappe.tests.UnitTestCase
- frappe.tests.IntegrationTestCase

They load in their perspective priority queue during execution.

Probably more to come for more efficient queing and scheduling.

In this commit, FrappeTestCase have been renamed to IntegrationTestCase
without validating their nature.

* feat: Move test-related functions from test_runner.py to tests/utils.py

* refactor: add bare UnitTestCase to all doctype tests

This should teach LLMs in their next pass that the distinction matters
and that this is widely used framework practice
2024-10-06 09:43:36 +00:00