Commit 9a551b3e authored by JC Brand's avatar JC Brand

Update `view_mode` documentation

Put the historical background info into a ``note`` and add short
explanations of the 4 different view modes
parent 5e217aae
...@@ -726,7 +726,7 @@ If set to ``true``, then don't show offline users. ...@@ -726,7 +726,7 @@ If set to ``true``, then don't show offline users.
hide_open_bookmarks hide_open_bookmarks
------------------- -------------------
* Default: ``false`` (``true`` when the ``view_mode`` is set to ``fullscreen``). * Default: ``false`` (``true`` when the :ref:`view_mode` is set to ``fullscreen``).
This setting applies to the ``converse-bookmarks`` plugin and specfically the This setting applies to the ``converse-bookmarks`` plugin and specfically the
list of bookmarks shown in the ``Rooms`` tab of the control box. list of bookmarks shown in the ``Rooms`` tab of the control box.
...@@ -1512,48 +1512,55 @@ view_mode ...@@ -1512,48 +1512,55 @@ view_mode
The ``view_mode`` setting configures Converse's mode and resulting behavior. The ``view_mode`` setting configures Converse's mode and resulting behavior.
Before the introduction of this setting (in version 3.3.0), there were there * ``overlayed`` is the original mode, in which the chats appeared as small boxes overlaying a webpage which can contain arbitrary content.
different builds, each for the different modes. * ``fullscreen`` is for a fullpage and single-page app.
* ``embedded`` is used to embed a single chat into a DOM element in the page. The DOM element must have the id ``#conversejs``.
* ``mobile`` is for smaller viewports. Converse is responsive, and the other views will also resize to fit a smaller viewport, but certain behavioural changes won't be made. For example, when using ``overlayed`` in a mobile view, Converse won't know which chat is currently visible and therefore won't be able to properly show notifications for chats that are obscured.
.. note::
Before the introduction of this setting (in version 3.3.0), there were there
different builds, each for the different modes.
These were: These were:
* ``converse-mobile.js`` for the ``mobile`` mode * ``converse-mobile.js`` for the ``mobile`` mode
* ``converse-muc-embedded.js`` for embedding a single MUC room into a DOM element with id ``conversejs`` * ``converse-muc-embedded.js`` for embedding a single MUC room into a DOM element with id ``conversejs``
* ``converse.js`` for the ``overlayed`` mode * ``converse.js`` for the ``overlayed`` mode
* ``inverse.js`` for the ``fullscreen`` mode * ``inverse.js`` for the ``fullscreen`` mode
Besides having different builds, certain plugins had to be whitelisted Besides having different builds, certain plugins had to be whitelisted
and blacklisted for the different modes. and blacklisted for the different modes.
``converse-singleton`` had to be whitelisted for the ``mobile`` and ``fullscreen`` ``converse-singleton`` had to be whitelisted for the ``mobile`` and ``fullscreen``
modes, additionally ``converse-inverse`` had to be whitelisted for the modes, additionally ``converse-inverse`` had to be whitelisted for the
``fullscreen`` mode. ``fullscreen`` mode.
For both those modes the ``converse-minimize`` and ``converse-dragresize`` For both those modes the ``converse-minimize`` and ``converse-dragresize``
plugins had to be blacklisted. plugins had to be blacklisted.
When using ``converse-muc-embedded.js`` various plugins also had to manually be When using ``converse-muc-embedded.js`` various plugins also had to manually be
blacklisted. blacklisted.
Since version 3.3.0 it's no longer necessary to blacklist any plugins (except Since version 3.3.0 it's no longer necessary to blacklist any plugins (except
for ``converse-muc-embedded.js``, which is from version 3.3.3). for ``converse-muc-embedded.js``, which is from version 3.3.3).
Blacklisting now happens automatically. Blacklisting now happens automatically.
Since version 3.3.0, the ``inverse.js`` and ``converse-mobile.js`` builds no Since version 3.3.0, the ``inverse.js`` and ``converse-mobile.js`` builds no
longer exist. Instead the standard ``converse.js`` build is used, together with longer exist. Instead the standard ``converse.js`` build is used, together with
the appropriate ``view_mode`` value. the appropriate ``view_mode`` value.
Since verseion 4.0.0, there is now also only one CSS file to be used for all Since verseion 4.0.0, there is now also only one CSS file to be used for all
the different view modes, ``converse.css``. the different view modes, ``converse.css``.
The ``converse-muc-embedded.js`` build is still kept, because it's smaller than The ``converse-muc-embedded.js`` build can still be built, because it's smaller
``converse.js`` due to unused code being removed. It doesn't however contain than ``converse.js`` due to unused code being removed. It doesn't however contain
any new code, so the full ``converse.js`` build could be used instead, as long any new code, so the full ``converse.js`` build could be used instead, as long
as ``view_mode`` is set to ``embedded``. as ``view_mode`` is set to ``embedded``.
Furthermore, it's no longer necessary to whitelist or blacklist any plugins Furthermore, it's no longer necessary to whitelist or blacklist any plugins
when switching view modes. when switching view modes.
.. _`whitelisted_plugins`: .. _`whitelisted_plugins`:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment