Skip to content
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

Have a way to cause reloads for non-live server files #12503

Open
core-ai-bot opened this issue Aug 31, 2021 · 5 comments
Open

Have a way to cause reloads for non-live server files #12503

core-ai-bot opened this issue Aug 31, 2021 · 5 comments

Comments

@core-ai-bot
Copy link
Member

Issue by njx
Monday Jan 20, 2014 at 20:56 GMT
Originally opened as adobe/brackets#6600


If I'm understanding the code correctly, in Live Development we only trigger a reload when saving a non-live file if we think the browser requested it (e.g. a JS file). That won't trigger for server files that aren't actually requested by the browser. For example, if you edit a .erb view file in a Rails project, saving it won't trigger a reload.

I think we did this because there are various files you might edit that aren't related to the current page, and we don't have any way of distinguishing between the two cases. However, perhaps it would be worth having a way to specify certain file extensions as triggering a reload. It could still cause too many reloads, since you might (for example) edit a view file that's not relevant to the current page you're previewing. But it might be a useful option.

Another, lighter-weight solution might be to simply have a keyboard shortcut in Brackets that causes the attached live preview page to reload.

@core-ai-bot
Copy link
Member Author

Comment by njx
Monday Jan 20, 2014 at 20:56 GMT


Probably "move to backlog".

@core-ai-bot
Copy link
Member Author

Comment by dangoor
Tuesday Jan 28, 2014 at 17:27 GMT


There are some lightweight things we can do here, so I'm calling this low priority to me. I think we should do one or two lightweight things and then possibly add something to the backlog.

It shouldn't be hard to have a pref that lets the user configure files to automatically reload. Adding UI will take more work. Keyboard shortcut for reloading the live preview page is obviously easy.

@core-ai-bot
Copy link
Member Author

Comment by dangoor
Monday Mar 17, 2014 at 15:40 GMT


I had called this low priority, but I'm nominating it for 1.0 because I think we can likely do something cheap here and it will be a big win for people doing live development with all kinds of server side or languages outside the supported languages.

@core-ai-bot
Copy link
Member Author

Comment by peterflynn
Wednesday Apr 23, 2014 at 16:37 GMT


Reviewed - keeping in 1.0.

New suggestion: let's just refresh any time a non-live file is saved, regardless of its extension. It seems uncommon that the user would have Live Preview open but then edit an unrelated file (and be bothered if we refreshed the page anyway). Better to have the desired refresh behavior on by default rather than buried in a pref. (But if we think there are potentially annoying cases, we could add a pref to prevent refresh when saving certain file types).

@core-ai-bot
Copy link
Member Author

Comment by redmunds
Monday Sep 22, 2014 at 21:47 GMT


PR #8080 provides a way to manually reload from Brackets.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant