Commit graph

37 commits

Author SHA1 Message Date
Ankush Menat
de9ac89748 style: re-format with ruff 2024-02-05 18:53:33 +05:30
Ankush Menat
52686f79cb refactor: code cleanup
- better boot config name
- send sentry after - because frappe namespce doesn't exist if it starts
  first
- remove import in app.py because __init__ is always imported so no
  need.
- leave telemetry JS always present, this is used even when telemetry is
  not enabled.
2023-11-30 17:40:53 +05:30
Akhil Narang
9a0a5468c5 feat: setup sentry integration
Inspired primarily from sentry's generic WSGI integration

Environment variable `FRAPPE_SENTRY_DSN` needs to be enabled as well
as explicit opt-in from the user's side in system sid telemetry
settings

Conditionally include telemetry JS bundles

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2023-11-30 17:13:41 +05:30
Ankush Menat
a7137bdeaa feat: client side error reporting + sentry
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2023-11-30 17:13:41 +05:30
Ankush Menat
957293bd54 fix: Only preload icons for desk 2023-11-29 21:50:18 +05:30
Corentin Flr
41d30e7213
feat: Add custom icons with the app_include_icons hook (#22254)
* feat: Add custom icons with the `app_include_icons` hook

These custom icons are available on the desk only. They can be picked in the `ControlIcon` picker.

Co-authored-by: Abraham Kalungi <85731451+kalungia@users.noreply.github.com>

* fix: skip conf for including icons

* test: Fix test_include_icons

---------

Co-authored-by: Abraham Kalungi <85731451+kalungia@users.noreply.github.com>
Co-authored-by: Ankush Menat <ankushmenat@gmail.com>
2023-09-20 20:23:17 +05:30
Rutwik Hiwalkar
04c8a54900
chore: remove unused import (#22157) 2023-08-22 23:36:31 +05:30
Ankush Menat
1eabd21bb8
chore!: remove mixpanel code (#21112) 2023-05-25 17:10:43 +05:30
Ankush Menat
8409caef6f fix: show proper error with traceback when boot fails 2023-02-20 18:33:49 +05:30
Ankush Menat
494400ead2 style: fmt
[skip ci]
2022-12-13 12:07:04 +05:30
Babuuu
607b83de5c
fix: Change page title to app name. (#19247)
[skip ci]
2022-12-13 12:06:01 +05:30
Faris Ansari
5700cf7bef feat: Allow app_include_js and app_include_css via site config 2022-11-10 18:30:25 +05:30
Ankush Menat
7a53a1dcd8 chore!: drop dead code related to mobile apps 2022-10-13 14:31:27 +05:30
Ankush Menat
48869d506f perf: dont order by for uniq searches 2022-08-21 17:37:40 +05:30
Ankush Menat
81b37cb7d2
refactor: clean up code to py310 supported features (#17367)
refactor: clean up code to py39+ supported syntax

- f-strings instead of format
- latest typing support instead of pre 3.9 TitleCase
- remove UTF-8 declarations.
- many more changes

Powered by https://github.com/asottile/pyupgrade/ + manual cleanups
2022-07-01 11:51:05 +05:30
Ankush Menat
d6f2d34bf4 perf: send boot string instead of JSON literal
changes:

- compact boot info in /app HTML
    /app size went from 451kb to 393kb - ~13% less
    Verified that regex applied on this JSON aren't affecting perf, infact
    found them to be faster with compact JSON.

- Send json string instead of placing JSON literal in code using Jinja.
  JS takes more time to pass object literal than parsing a plain JSON string.

Overall content transfer size remains roughly same (albeit slightly
lower) since double escaping ends up adding extra `\` around quotes.

Co-authored-by: Suraj Shetty <surajshetty3416@gmail.com>
2022-06-21 07:53:48 +05:30
Gavin D'souza
3871fe6cd0 perf: App Page
Reduced time taken for get_context to execute from 0.035s to 0.02s (75%
reduction)
2022-06-13 18:39:56 +05:30
Gavin D'souza
b696fa6da5 perf: Pre-compile and re-use regexp pattern
Converted all possible usages of re.* that weren't compiling the regex
separately and re-using it. Separated out the compiled patterns as
global variables. Repetitive patterns could be made DRY-er.

Would be nicer to have all regexes in a single module so that we could
re-use better, keep track of outdated, and keep checks for possible
reDos' etc
2022-06-08 14:07:38 +05:30
Suraj Shetty
c0c5b2ebdd
style: format all python files using black (#16453)
Co-authored-by: Frappe Bot <developers@frappe.io>
2022-04-12 10:59:25 +05:30
Suraj Shetty
58f2296c49 fix: Add fallback to desk theme to avoid failure 2021-11-17 17:52:08 +05:30
Suraj Shetty
3129e4d8ab feat: Add auto theme switcher
- Removed redundant code
- Added theme mode change listener to update theme realtime
2021-11-17 13:14:54 +05:30
Suraj Shetty
c422a72875 Merge branch 'develop' of https://github.com/frappe/frappe into sgtpepper9907-develop 2021-11-17 11:10:57 +05:30
Gavin D'souza
3446026555 chore: Update header: license.txt => LICENSE
The license.txt file has been replaced with LICENSE for quite a while
now. INAL but it didn't seem accurate to say "hey, checkout license.txt
although there's no such file". Apart from this, there were
inconsistencies in the headers altogether...this change brings
consistency.
2021-09-03 12:02:59 +05:30
Suraj Shetty
31d8436979 refactor: Rename dir to layout_direction
- For readability
2021-06-28 12:04:57 +05:30
Suraj Shetty
40dd522796 feat: Auto generate RTL styles using rtlcss
https://github.com/MohammadYounes/rtlcss
2021-06-25 13:06:09 +05:30
Suraj Shetty
2d8c6c1710 Merge branch 'develop' of https://github.com/frappe/frappe into refactor-website 2021-06-03 11:43:28 +05:30
Gavin D'souza
e407b78506 chore: Drop dead and deprecated code
* Remove six for PY2 compatability since our dependencies are not, PY2
  is legacy.
* Removed usages of utils from future/past libraries since they are
  deprecated. This includes 'from __future__ ...' and 'from past...'
  statements.
* Removed compatibility imports for PY2, switched from six imports to
  standard library imports.
* Removed utils code blocks that handle operations depending on PY2/3
  versions.
* Removed 'from __future__ ...' lines from templates/code generators
* Used PY3 syntaxes in place of PY2 compatible blocks. eg: metaclass
2021-05-26 15:31:29 +05:30
Suraj Shetty
51a072bbf8 Merge branch 'develop' of https://github.com/frappe/frappe into refactor-website 2021-05-18 17:02:44 +05:30
Joseph Marie Alba
9795545fb6
fix: DeprecationWarning: invalid escape sequence \<
Python 3 interprets string literals as Unicode strings, and therefore your \< and \> are treated as an escaped Unicode character.

Declare your RegEx pattern as a raw string instead by prepending r
2021-05-16 06:13:14 +08:00
Suraj Shetty
d961bda492 fix: Base template path 2021-04-29 12:43:58 +05:30
David Angulo
72126a8645 feat: Change default desk theme behaviour 2021-03-25 19:45:23 -06:00
prssanna
aa8f7cc3c5 fix: uncomment conditions that handle guest access for desk 2021-03-10 16:02:59 +05:30
Suraj Shetty
1667f50fc3 fix: Typo 2020-12-15 14:10:41 +05:30
Suraj Shetty
4d1a6ff7a5 fix: Remove </script> tag in boot_json 2020-12-15 13:32:58 +05:30
Rushabh Mehta
30a041646c feat(guest-access): Allow Guest to view, edit allowed forms, making way remove web forms 2020-12-10 15:13:51 +05:30
Rushabh Mehta
ff71329b03 fix(merge): develop 2020-12-02 10:54:10 +05:30
Rushabh Mehta
75fe8a615a feat(app): move /desk to /app 2020-11-11 16:31:47 +05:30
Renamed from frappe/www/desk.py (Browse further)