ProfessionalWiki / chameleon

Provides a highly flexible and customizable skin using Bootstrap 4
https://www.mediawiki.org/wiki/Skin:Chameleon
Other
116 stars 62 forks source link

Move MediaWiki edit confirmations below navbar #312

Open krabina opened 2 years ago

krabina commented 2 years ago

When using chameleon, the MediaWiki edit confirmations "Your edit was saved" or "Page was created" are on the top of the page over the main navigation menu. This can be unfortunate, becaus you have to wait until it goes away to access a navigation menu.

I would like to find a way to display these messages where SiteNotices are displayed, My grid is:

<grid class="flex-fill" mode="fluid">
                <row>
                        <cell>
                                <component type="SiteNotice"/>
                                <component type="NewtalkNotifier" class="mb-3"/>
                                <component type="MainContent"/>
                        </cell>
                </row>
        </grid>

So I would like MediaWiki to display these messages in the SitNotice area or at least add a margin-top to these messages that is as large as the navigation menu.

Any way to do this?

malberts commented 2 years ago

I don't see an immediately easy way to handle this on the Chameleon side. This is the generated HTML:

<div class="postedit-container">
  <div class="postedit mw-notification">
    <div class="postedit-icon postedit-icon-checkmark postedit-content">Your edit was saved.</div>
  </div>
</div>

However, this is generated by MediaWiki Javascript (mediawiki.action.view.postEdit.js), so in order to handle this differently would require rewriting some of that.

In terms of a local CSS workaround: Add top on the .postedit class, since that is what other skins do.

Vector: Screenshot_20220221_143425

Monobook: Screenshot_20220221_143212

krabina commented 2 years ago

The local CSS workaround is great, thank you!