madi-nuralin / material

A theme plugin for pkp/ojs
GNU General Public License v3.0
4 stars 1 forks source link

Material theme OJS backened overwrite and front end nav menu #2

Closed asifdev124 closed 1 year ago

asifdev124 commented 2 years ago

@madi-nuralin

Hello Dev, hope you are doing great, nice work, I need a little help regarding material theme.

Using material theme, can we use the default ojs backend instead of material themes?

my 2nd question is how can I turn the primary nav and secondary nav to show as regular horizontal menu instead of collapsible?

madi-nuralin commented 2 years ago

Hello @asifdev124 1) Yes of course, for that you need to comment or remove the following lines of code in MaterialThemePlugin.inc.php file:


/**
         *  Backend stylesheet 
         */
        $this->addStyle(
            'backend-stylesheet', 'styles/backend/index.less', array('contexts' => 'backend')
        );
        // Load Backend MDB library (Material Design for Bootstrap)
        $this->addStyle(
            'backend-mdb-css', 'vendor/mdb/css/mdb.min.css', array('contexts' => 'backend')
        );
        // Load Backend MDB library (Material Design for Bootstrap)
        $this->addScript(
            'backend-mdb-js', 'vendor/mdb/js/mdb.min.js', array('contexts' => 'backend-onload')
        );
        // Load Backend icon font FontAwesome
        $this->addStyle(
            'backend-fontAwesome', 'vendor/fontawesome/css/all.min.css', array('contexts' => 'backend')
        );
```.

2) It's kind of bug that secondary and primary navs are collapsed, due to it is planned to collapse them if the device width equal or less than 965px.
     I have a counter question about this: Did you install theme plugin from .tar.gz package or clone from repository.
In case if you cloned it from github, then you might notice some changes in theme plugin. In the coming days, I plan to release the second version of the plugin, as some changes have accumulated.
     As for the backend design, it can also be made optional so that you can roll back to the old classic design at any time. Of course, I will try to take all this into account in the new version of the plugin.
asifdev124 commented 2 years ago

@madi-nuralin Nice to hear from your, I have installed from ojs > plugin > searched and installed material theme, it it think asked for the upgrade 1st which I did on the go.

So, my understanding is: you are doing to release a fix on mobile things right and within a week or so?

once again thanks. I will try the above code to see the output and leave you the feedback.

asifdev124 commented 2 years ago

@madi-nuralin Thank you for your support, after commenting out the above lines I can see the broken backend, the top navigational area is way too big, also when you try to unpublish the article, the popup does not appear when using your theme in default.

asifdev124 commented 2 years ago

@madi-nuralin actually commenting those lines does not restore back to original ojs backend style, but with broken style I am able to unpublish the articles, you might need to look into: .app__headerActions ? any quick solution to fix the backend in either way, either go back to ojs default backend only or see why the popup for unpublishing the article is not showing up, thanks

madi-nuralin commented 2 years ago

Hello @asifdev124 One more manipulation which I forget to mention: Remove or rename to any other file name material/templates/layouts/backend.tpl file. Then try to 'Clear Template Cache' (this should work)

madi-nuralin commented 2 years ago

May be, in the coming release a backend stylesheet support by material theme would be removed from project, as it requires more effort. I look forward to hearing feedback from you if the problem is resolved :)).

asifdev124 commented 2 years ago

@madi-nuralin you rocked, resolved, appreciated your quick response, but I like how you managed the backend with your own style, the error at the moment is, lightboxs are not working, e.g. when you try to unpublish the article.

The other navigation issues on the front end already mentioned earlier.

madi-nuralin commented 2 years ago

Could you provide some screen of page where you are trying to unpublish the article?

asifdev124 commented 2 years ago

@madi-nuralin All set now with default theme, but any published article e.g from archive, trying to unpublish, it simply try to load popup but gray lightbox/overlay appears only, nothing else.

On Thu, 21 Apr 2022, 12:23 Madi Nuralin, @.***> wrote:

Could you provide some screen of page where you are trying to unpublish the article?

— Reply to this email directly, view it on GitHub https://github.com/madi-nuralin/material/issues/2#issuecomment-1104809880, or unsubscribe https://github.com/notifications/unsubscribe-auth/AW7HH36XCM5C355UT3QSKULVGD66DANCNFSM5TILT2BQ . You are receiving this because you were mentioned.Message ID: @.***>

asifdev124 commented 2 years ago

@madi-nuralin When can I expect new version with fixes? thanks

madi-nuralin commented 2 years ago

28 April

madi-nuralin commented 2 years ago

@madi-nuralin All set now with default theme, but any published article e.g from archive, trying to unpublish, it simply try to load popup but gray lightbox/overlay appears only, nothing else. On Thu, 21 Apr 2022, 12:23 Madi Nuralin, @.> wrote: Could you provide some screen of page where you are trying to unpublish the article? — Reply to this email directly, view it on GitHub <#2 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AW7HH36XCM5C355UT3QSKULVGD66DANCNFSM5TILT2BQ . You are receiving this because you were mentioned.Message ID: @.>

I have a little trouble in understanding this issue. As I understood in publication page when you clck 'Unpublish' button then lightbox is appeared, am I right?

For clarity I'm attaching screen below Screenshot from 2022-04-26 14-58-54 :

asifdev124 commented 2 years ago

@madi-nuralin correct, you are at correct place, but the unpublish little pop up does not show, only overlay grayout the screen without the popup.

Regarding navigation fix, not sure how they will appear after the fix, like secondary nav bar, is not it good to place 2ndary nav bar to top right, center the primary nav under the logo? just my thoughts, great work btw, thanks

One featuring request as well, only archive page: instead of 1 issue per line, better to place 4 issues per line, issue title can be under the thumbnail.

madi-nuralin commented 2 years ago

@asifdev124 thanks for reply. Could you tell me please ojs version of your journal? I've tested 'unpublish popup' in 3.3.0.(7,8,9,10) versions, but there where no problems with overlay. Theoretically, when you commented those lines which are considered to backend stylesheet and including file renaming (backend.tpl), there are no other backend template overwriting by Material theme. Btw, have you tried unpublishing the article with other theme plugins?

And thanks for your suggestions, I will try to consider their applicability to design in minor releases, since I will not be able to apply them on the upcoming release due to lack of time.

asifdev124 commented 2 years ago

@madi-nuralin I have tested this popup issue on latest version of ojs and fresh installation, but using default theme, all work fine.

Thank you for considering my requests, hope to see them soon.

asifdev124 commented 2 years ago

@madi-nuralin but after commenting out the lines you mentioned and make the ojs backoffice with default theme but keeping your theme active, all is ok and popup works perfect. Hope this clear the issue further.

  1. using your theme
  2. disabled the material theme for background
  3. then no issue with popup, hope this clear
  4. keeping material theme active for background then there is issue with popup
madi-nuralin commented 2 years ago

Okay, nice. I've already send 2.0.0 release to plugin gallery, without backend stylesheet, I hope within a couple of days pkp developers accept updates, then you could pull new changes))

asifdev124 commented 2 years ago

@madi-nuralin I have installed fresh copy from github, cool design, a big hero section added as I can see now, menu seems fixed, I will check and let you know if I found any issue