Commit graph

48581 commits

Author SHA1 Message Date
Corentin Forler
53e86379fe
fix(website): Clear cached list of child top bar items (#29223) 2025-01-22 20:52:40 +05:30
Ankush Menat
8071d38ad2
fix: Set prepared report even if req times out (#29874) 2025-01-22 08:23:41 +00:00
Abdeali Chharchhodawala
bebc40087c
chore: Update raise_error_on_no_output documentation and example 2025-01-22 08:12:08 +00:00
Ankush Menat
b9479e21e1
fix: Clear all cache after rebuilding assets (#29876)
We don't know where this is cached indirectly, this is a rare activity
in production, so dropping all cache isn't such a big deal.
2025-01-21 18:57:10 +05:30
Ankush Menat
930d006f4c
perf: HTTP cache list view counts when count is >1000 (#29871)
This allows for caching the count which are frequently requested but
rarely change and even if they changed, UI doesn't show accurate value
to begin with.

After this change any filters that result in "1,000+" response will be
just cached by client and won't be requested again and again (for at
least 30 minutes, it's SWR after that so UI should still be snappy)
2025-01-21 14:55:58 +05:30
Ankush Menat
e4a2b8db38
refactor: trim init.py (#29866)
* refactor: Trim `__init__.py`

We strayed from the goal here: https://github.com/frappe/frappe/pull/29181

So making up for it.

* chore!: Delete unused get_version

Not used anywhere

* refactor: move few more functions to relevant place

* asd
2025-01-20 13:05:02 +00:00
Sagar Vora
e7073a5f28
perf: faster LocalProxy (#29181)
* perf: faster `LocalProxy`

* refactor: use callable style local

* test: add some tests for local proxy override

---------

Co-authored-by: Ankush Menat <ankush@frappe.io>
2025-01-20 12:49:55 +00:00
Raffael Meyer
ec57061e63
refactor: hide sidebar (#29061) 2025-01-20 17:51:43 +05:30
rachapipe
d6a4b7858e
Merge pull request #29215 from rachapipe/DatepickerAddLanguageThai
fix(i18n): Datepicker Thai translations
2025-01-20 09:08:27 +00:00
Soham Kulkarni
7587c4666d
Merge pull request #29226 from sokumon/email-account-ux
fix(UX) :Email account ux
2025-01-20 12:59:40 +05:30
Soham Kulkarni
341fd3a4c7
Merge pull request #29201 from sokumon/better-sidebar
fix: Sidebar on mobile and small improvement in dark mode
2025-01-20 12:59:26 +05:30
sokumon
6e84651c36 fix: made mobile sidebar a overlay 2025-01-20 11:10:14 +05:30
sokumon
50b354f959 fix: small refactor to apps switcher 2025-01-20 11:10:14 +05:30
sokumon
69f28b088f chore: bump version of upload artifact to v4 2025-01-20 11:10:14 +05:30
sokumon
9906b6ede8 fix: minor icon fixes 2025-01-20 11:10:14 +05:30
sokumon
6561aa37ae fix: apps switcher menu is consistent across pages 2025-01-20 11:10:14 +05:30
sokumon
f71fb668d4 fix(style): minor dark mode changes to apps-switcher-menu 2025-01-20 11:10:14 +05:30
sokumon
97f811325c fix: hover action setup after apps switch 2025-01-20 11:10:14 +05:30
sokumon
218c06e489 fix: remove ctrl + h shortcut 2025-01-20 11:10:14 +05:30
sokumon
8741ef7fd1 fix: ctrl + h shortuct doesnt toggle sidebar , routes to home 2025-01-20 11:10:14 +05:30
sokumon
69d11a0530 fix(style): collapse button visible without scroll in mobile 2025-01-20 11:10:14 +05:30
sokumon
dbdc584895 fix(style): dark mode suport for sidebar 2025-01-20 11:10:14 +05:30
sokumon
04fd2317ae fix: sidebar sorting only in edit mode 2025-01-20 11:10:13 +05:30
Akhil Narang
ec1aba71bf
Merge pull request #28944 from Tebayaki/set_datepicker_language
fix: set datepicker language
2025-01-20 10:55:49 +05:30
Akhil Narang
a8f986e89f
Merge pull request #29766 from frappe/pot_develop_2025-01-19
chore: update POT file
2025-01-20 10:39:55 +05:30
Akhil Narang
6a4f4e7b39
Merge pull request #29189 from mahsem/datepicker_bosnian
feat: datepicker_bosnian_croatian
2025-01-20 10:37:20 +05:30
Tebayaki
b0fc7f4ab9 fix: set datepicker language 2025-01-20 11:08:20 +08:00
frappe-pr-bot
db8383d574 chore: update POT file 2025-01-19 09:33:11 +00:00
Sumit Bhanushali
33e855a578
Merge pull request #29227 from frappe/f-16
fix(NamingPatch): convert numerics to str for regex match
2025-01-18 14:59:26 +05:30
Sumit Bhanushali
6e488f8e3b fix(NamingPatch): convert numerics to str for regex match 2025-01-18 14:49:33 +05:30
sokumon
8ce7b212de fix: refactored helpful links 2025-01-18 13:08:30 +05:30
Ankush Menat
320798d390
perf: add cache-control headers on private files (#29221)
* perf: add cache-control headers on private files

- Client(browser) side cache
- 1 hr expiry
- 1 day revalidation
- etagged by nginx in default config (so no data transfer on expiry still)

In conjunction with https://github.com/frappe/agent/pull/157

* fix: Don't override existing headers
2025-01-17 18:51:34 +05:30
Ankush Menat
cdffd5d047
refactor: use flat cache for web pages (#29220)
Web pages are not a hash.

This way we can also set expiry for each key. Setting default expiry of
30 minutes.
2025-01-17 12:02:50 +00:00
sokumon
d80006ac59 fix(ux): helpful links added while creating email account 2025-01-17 16:18:05 +05:30
Ankush Menat
cfa4534757
perf: faster page view count queries (#29219) 2025-01-17 09:46:03 +00:00
Ankush Menat
800ff70af1
perf: Do not set same cookies on every request (#29218) 2025-01-17 09:20:32 +00:00
Ankush Menat
bef7393753
fix: Update sessions in cache after a miss (#29217)
Err how was this missed? After starting fresh session for first 19
minutes it doesn't seem to go to cache.
2025-01-17 08:54:35 +00:00
Ankush Menat
110e6225fc
perf: speedup sessions code (#29076)
* refactor: simplify user IP validation code

The comment suggests this way of doing it has some perf benefit, it does not.

Just fetch the entire cached doc.

* perf: remove duplicate language resolution

WHY???

* perf: avoid fetching system settings for ip-validated users

get_system_settings is client-cached

* perf: perform easier checks first

No need to fetch system settings if IP address is already matching.
2025-01-17 13:53:49 +05:30
Ankush Menat
6ad61d6a82
test: avoid possible flake in OTP tests (#29214)
Since we use TOTP the token can expire between the time we generate and
the verification code runs.
2025-01-17 07:32:17 +00:00
Ankush Menat
daa52b8802
build!: Drop maxmind IP database (#29213)
1. It's severly outdated and free version isn't that accurate to begin
   with.
2. I replaced country detection using timezone a long time ago: c8ec528aa7/frappe/desk/page/setup_wizard/setup_wizard.js (L664-L676)

This is good enough for setup wizard for most popular countries. Use
IP-API if you need better guarantees (we have a license).
2025-01-17 12:03:09 +05:30
Ankush Menat
4e4972fe2d
refactor: Use @cached_property (#29212) 2025-01-17 06:09:05 +00:00
Ankush Menat
c8ec528aa7
Merge pull request #29196 from ankush/fix/meta_mutation
fix: Don't assume homogenous data in meta tables
2025-01-16 20:41:02 +05:30
Maharshi Patel
6a861fc3c8
chore: added ipv6 to hosts file (#29199)
macos takes 5-10 second on dns when *.local is used unless ipv6 is added to hosts file.

source: https://stackoverflow.com/questions/10064581/how-can-i-eliminate-slow-resolving-loading-of-localhost-virtualhost-a-2-3-secon/17982964#17982964

Adding this even though it's edge case because i spent few days debugging something else to make it faster.

Co-authored-by: Maharshi Patel <maharshipatel@Maharshis-MacBook-Pro.local>
2025-01-16 19:23:32 +05:30
Ankush Menat
e6bad301b8 refactor: Use @cached_property instead of implmenting it 2025-01-16 19:19:56 +05:30
Ankush Menat
b3859d9fa3 fix: Don't assume homogeneous data in meta tables
Steps to reproduce:
- enable developer mode (doesn't happen in prod)
- Save a document with set only once fields
- Reload the page (requests meta again which is now polluted)

This is new category of bug surfaced because meta objects now live
longer than request and all kinds of weird `self._cached_property`
starts getting serialized.

Co-Authored-By: ruthra kumar <ruthra@erpnext.com>
2025-01-16 19:10:16 +05:30
Suraj Shetty
9a1eab7512
Merge pull request #29142 from iamejaaz/child-table-ui-29106 2025-01-16 16:19:06 +05:30
Ejaaz Khan
98be3f46f3 refactor: change height and add condition on prevent default 2025-01-16 15:58:25 +05:30
Ankush Menat
430c0c7c7a
fix(DX): Log all exceptions in developer mode (#29195)
ALL exceptions - even validation errors. This is excessive logging but
in development mode it should be fine and even helpful in debugging few
issues.
2025-01-16 15:50:56 +05:30
Ankush Menat
9c2bd23606
fix: don't override setstate (#29194)
Meta sometimes break because of this, I don't quite know why but this
change isn't that useful, so best to revert it for now.
2025-01-16 15:50:47 +05:30
Ejaaz Khan
fc9c75de2c feat: enhance horizontal scrolling in child table 2025-01-16 14:50:50 +05:30