-
Notifications
You must be signed in to change notification settings - Fork 3
Updates to run on Ember 5 #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
AndyatFocallocal
wants to merge
135
commits into
sylque:master
Choose a base branch
from
focallocal:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fix access to SiteSettings
Better fix for SiteSettings to ensure it doesn't break in other places
Try fix X-Frame-Options
Reverting to last known working version, without ember updates
Update docuss.js.es6. Reverting to last known working version, without ember updates
Update docuss.js.es6. Marv fix
The map jump is happening inside the React app, not from Discourse elements pushing it. Need to debug the fl-maps React app instead.
- Add click handler to detect sidebar clicks when in Docuss layout - Removes dcs-trigger-id, dcs-layout, and dcs-interact-mode params - Navigates to clean URL to close Docuss split view - Resolves issue where clicking sidebar in thread view didn't close Docuss
…on topic pages with r=false
When on a topic page (layout 3) after creating a post, clicking the splitbar slider should navigate away from the topic to close Docuss, not just toggle the showRight query param. - Detect when on topic.* routes and user wants to close Docuss - Navigate back to tags intersection page or /latest - Prevents 'Missing pathname' error for layout 1 transitions
The topic data object was being included in the dcsRoute passed to didTransition(), which failed validation since layout 3 only accepts: layout, pageName, triggerId, interactMode (and optional hash). - Build dcsRoute WITHOUT topic data for validation - Add topicData to iframe.currentRoute AFTER didTransition succeeds - Topic data is still sent to fl-maps via postMessage as before - Prevents DocussError when navigating to newly created topics
25a0bcd to
de846c0
Compare
- Added window.dcsSaveTimeline() to export timing log to a file - Added timing logs to onDidTransition, onDidTransition2, onDidTransition3 - Logs tag loading wait time and success/failure - Exposed window.dcsTimingLog() globally for cross-module access
- dcsTimingOff() now auto-saves to localStorage and downloads file - Logs persist in localStorage (last 10 sessions) - New commands: dcsTimingLogs(), dcsTimingExport(), dcsTimingClearAll() - dcsTimingLogs() shows all saved sessions - dcsTimingExport() downloads all sessions as one file
- Timing persists across page reloads using localStorage - dcsTimingStart(hours) - Start collecting for specified duration (default 24h) - Auto-saves events every 5 seconds and on page unload - Caps at 10,000 events to prevent localStorage overflow - Auto-expires after specified duration - dcsTimingStatus() - Check collection state and time remaining - dcsTimingExport() - Download all collected events - dcsTimingStop() - Stop and download - Backwards compatible: dcsTimingOn/Off still work
When navigating to /docuss/m_map, the route context['page'] may be empty on initial load, causing the iframe to default to the homepage (m_home) before loading the correct page. This fix extracts the pageName directly from window.location.pathname if the route context is empty, preventing the homepage flash. The existing fallback in DcsIFrame.js.es6 didTransition() is kept as a safety net but should no longer be triggered for normal navigation.
Problem: dcsOpenForm postMessage sent before iframe listener is ready on Brave, causing form2/form3 pages to not open the form modal Solution: Send dcsOpenForm immediately, then retry at 500ms and 1500ms to ensure the message is received once the iframe listener is active.
…ments RACE CONDITION FIX: - Add routeSequenceId counter that increments on each route transition - Include routeSequenceId in postDiscourseRoutePushed (m2) message - Validate incoming routeSequenceId in onSetRouteProps to skip stale messages - Add recovery fallback: ensure layout is correctly applied when skipping stale messages TIMING IMPROVEMENTS: - Clear all pending timers and state at start of each route transition - Reduce connection check interval to 100ms for faster response - Reduce spinner delay to 300ms for better UX - Add recovery timeout with iframe reload as fallback - Hide spinner when starting new navigation to prevent visual glitches STATE MANAGEMENT: - Clear _docussPendingLayout on new navigation - Clear _docussConnectionTimer and _docussRecoveryTimer - Reset _docussSpinnerShown flag These changes prevent the white page bug that occurred when navigating quickly between map and forum pages. The race condition happened when postSetRouteProps messages arrived after the user had already navigated to a different route.
- Add browser/device detection to timing logs (browser, OS, screen size, viewport, connection) - Increase MAX_CONNECTION_WAIT from 2000ms to 3000ms for slow mobile connections - Increase tag wait retries from 15 to 25 (3s to 5s total) - Improve dcsOpenForm retry with 4 attempts at 0ms, 500ms, 1500ms, 3000ms
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@sylque I’ve been able to update Docuss to work with the new Discourse. Would you like to update your original repo?
https://github.com/focallocal/dcs-discourse-plugin
It's live on our platform which we've rebuilt (again) and got it finally nearly ready to launch: https://publichappinessmovement.com/