There is no way to refresh the composer's preview except by modifying its content
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- javascript, php
- Domain
- frontend
Research direction
Start by reading EditorDriverInterface and ComposerState, then trace how the composer's preview is refreshed after content changes. The work is done when an extension can trigger a preview refresh after an asynchronous filter operation without modifying the composer content.
Written by the indexing model from the issue text.
Description
Current Behavior
TextFormatter does not allow to use asynchronous calls in the Javascript part of a filter, so I need to refresh the preview once the Promise is resolved (see https://github.com/s9e/TextFormatter/issues/208), but there is currently no way to do this in Flarum.
Steps to Reproduce
- In an extension, try to refresh the composer preview
- There is no way
Expected Behavior
There should be some kind of function, maybe in EditorDriverInterface, or directly in app.composer (ComposerState).
Screenshots
No response
Environment
- Flarum version: 1.6.2
- Website URL: localhost
- Webserver: PBP built-in web server
- Hosting environment: local
- PHP version: 8.1.12 (cli) (built: Nov 10 2022 02:42:46) (NTS)
- Browser: Mozilla Firefox 108.0
Output of php flarum info
Flarum core 1.6.2
PHP version: 8.1.12
MySQL version: 10.6.11-MariaDB-1
Loaded extensions: Core, date, libxml, openssl, pcre, zlib, filter, hash, json, pcntl, Reflection, SPL, session, standard, sodium, mysqlnd, PDO, xml, calendar, ctype, curl, dom, mbstring, FFI, fileinfo, ftp, gd, gettext, iconv, intl, exif, mysqli, pdo_mysql, pdo_sqlite, Phar, posix, readline, shmop, SimpleXML, sockets, sqlite3, sysvmsg, sysvsem, sysvshm, tokenizer, xmlreader, xmlwriter, xsl, Zend OPcache
+-------------------------+-------------------------+------------------------------------------+
| Flarum Extensions | | |
+-------------------------+-------------------------+------------------------------------------+
| ID | Version | Commit |
+-------------------------+-------------------------+------------------------------------------+
| flarum-flags | v1.6.1 | |
| flarum-tags | v1.6.1 | |
| flarum-approval | v1.6.1 | |
| ianm-syndication | dev-master | b65feab8bc3514fe7e83b1b5d5ce4c9ff07b6b48 |
| flarum-suspend | v1.6.1 | |
| flarum-subscriptions | v1.6.1 | |
| flarum-sticky | v1.6.1 | |
| flarum-statistics | v1.6.1 | |
| flarum-mentions | v1.6.1 | |
| flarum-markdown | v1.6.1 | |
| flarum-lock | v1.6.1 | |
| flarum-likes | v1.6.1 | |
| flarum-lang-french | v4.4.0 | |
| flarum-lang-english | v1.6.0 | |
| flarum-emoji | v1.6.1 | |
| flarum-bbcode | v1.6.0 | |
| club-1-cross-references | dev-feat/text-formatter | 294ec30939e1a89239baae02f74c898bcd27fa5c |
+-------------------------+-------------------------+------------------------------------------+
Base URL: http://localhost:8080
Installation path: /home/nicolas/Source/www/flarum
Queue driver: sync
Session driver: file
Mail driver: smtp
Debug mode: ON
Possible Solution
No response
Additional Context
No response
- Dominant language
- PHP
- Stars
- 6.8k
- Forks
- 891
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 209
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from flarum/framework
-
type/accessibility type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
Default language is ignored for anyone who chose a language, when the language selector is hiddenPossibly taken @1AbdullahButt claimed this 15 days ago. Opentype/bug
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
Maintainers usually reply within 1 day
-
[2.x] False CLI/Web PHP mismatch when /usr/bin/php differs from the site's FPMPossibly taken @lazerg claimed this 15 days ago. Opentype/bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
[2.x] A filter on a resource without a searcher returns a 500Possibly taken @imorland claimed this today. Opentype/bug
flarum/framework#5578 · 1 assignee ·
Maintainers usually reply within 1 day
All issues in flarum/framework
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 87/100
Sylius/Sylius#19359 · 1 comment ·
Maintainers usually reply within 1 day
-
Add php 8.6Open
Difficulty 1/5 Under an hour Newbie friendliness 66/100
mailersend/mailersend-php#199 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Configuration new tool
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
novalo-dev/Prestashop-MCP-Server#366 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 10 days