Coder Social home page Coder Social logo

eworm / big-kahuna Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 7.0 2.89 MB

A flexible Wordpress style menu addon for Statamic

Home Page: https://statamic.com/marketplace/addons/big-kahuna

PHP 14.46% CSS 0.70% JavaScript 46.72% HTML 14.52% Vue 23.59%

big-kahuna's People

Contributors

andrewhaine avatar elliottregan avatar eworm avatar jhealey5 avatar rizkysyazuli avatar sagalbot avatar zacksmash avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

big-kahuna's Issues

Menu changes do not get committed by Spock addon

I'm using the Spock addon to manage content, and none of BigKahuna's changes will be staged. After reading Statamic's addon docs, it looks like the issue could be due to one of these:

Could be related to this issue: statamic/spock#35

thanks!

Add ability to check existance of a menu

Currently, if a menu used in a template is deleted, the whole site crashes.

Is there already a way to check to see if a menu exists?

Another option could be to protect a created menu so it isn't accidentally deleted through the CMS.

Should this be listed as a field type?

I noticed we're listing this as a field type and using that structure. I don't know if it makes sense to make BK selectable from the field types menu, when creating a field set.

Was this intentional or should we remove that aspect of it?

Overflow issue with the filter list

If the filter list has quite a lot of items in it, it creates a large space at the bottom of the page. It also creates a weird page jump when clicking on checkboxes to add items to a menu.

Steps to reproduce:

  1. Add a lot of pages/entries (around 30-40)
  2. Visit the BK Menu Edit page
  3. Scroll down and see the big space at the bottom or click on a checkbox to see the page jump

Needs some customization options

This app is great. I would have bought it today if it had a couple more features...
This app needs the ability to customize the wrapper UL elements with custom classes (and submenu UL elements)

At the very least, you should be able to build your own menu templates simply using variables output by this plugin (rather than being required to use the native (and rather restrictive) {{ nav }} tag.

Needs the ability to add carets or icons for dropdown elements. (Or just put them in a custom template or partial) (You COULD add them as CSS elements, I know, but sometimes you're working with other people's code, so you want to work smarter not harder, and build around what they gave you)

Needs the ability to customize the global LI and submenu UL and LI classes (classes for all menu elements, rather than customizing every menu item individually) (Or just add them to a custom template or partial) OR at least bulk edit the classes on the individual elements.

Needs the ability to have the same menu structure with different wrapper (UL and LI) classes. Some responsive menus require the same menu classed differently in the mobile view.

With just a few tweaks, this could easily be a core-worthy component for Statamic... but it's not QUITE there yet. Good work getting it this far.

Error / crash on visiting Menu page

Hi - I have had Big Kahuna installed previously, deleted it, now reinstalled (after the page delete bug fix) - but I get an error when going to the menu page.

ErrorException in BigKahunaController.php line 37:
Undefined index: locale

in BigKahunaController.php line 37
at HandleExceptions->handleError('8', 'Undefined index: locale', '/Users/paulburgess/Websites/motive-v2/site/addons/BigKahuna/BigKahunaController.php', '37', array('request' => object(Request), 'menus_storage' =>... etc.

Screenshot: http://dlrg.co/fe151e572066

Menus Not Displaying

My menus don't render on our staging sites, only on our local setups. I assumed this was because we hadn't entered license keys yet, but we have them in there now and no HTML is rendered. I've confirmed the addon is "installed" and license key is valid for the domain. Any suggestions?

Make a free version of BK (or just add a trial)

Sort of like a lot of WP plugins do. The free version would be limited to 1 menu, but have all other features to. Any thoughts on how to achieve this? The ideal situation would be to keep everything in 1 repo.

We could also add the trial option, which means making this repo public. Since I don't know enough about the technical aspects of the trial option I'm a bit scared of doing that. Would this allow someone to just remove some code and use the addon for free?

Submenu Item Class

Props on an amazing plugin!

Think there's a small bug, the submenu item does not get the correct class:
image

Adding something like $itemClass = $submenu_item_class; on line 47 of BigKahunaTags.php seems to fix it.

Default install everything.

Active class is not set

Hello Eworm !

The last version seems to not set the default active class.
There is no error, but there is no class added when the current URL is one of the item menu.
For example :
image
First <li> element should have the is--active, but don't.

From code :

{{ big_kahuna 
    menu="menu-principal" 
    class="main-nav text-sm flex lg:flex-row lg:flex-grow"
    item_class="burger-item flex leading-none mt-4 font-medium lg:flex-row lg:mt-0 lg:mr-8"
}}

Environment :

  • Version 2.2.1
  • Local
  • Without cache
  • Stache enabled

Issue with page link

If I have a page added to a BK menu, and I change the "slug" of it, which changes the URL, the BK menu has the old URL saved in the JSON file, which is now incorrect.

FIX: If a page is not a custom link, the tag should retrieve the latest slug from the ID of the page, using the Entry class or something.

Undefined variable: isactive

Saw a bunch of these errors on my live site log files.

ErrorException: Undefined variable: isactive
in /var/www/html/blabla/site/addons/BigKahuna/BigKahunaTags.php:79

This block of code seems problematic.

if ($content) {
    $isactive = '';
    ...
}
$html .= '<li class="' . $itemClass . $isParent . $isactive . $myClassname . '">'; // line 79

The $isactive variable doesn't get set somehow. what's the possibility of $content being empty/undefined?

This does not break my site though. At least not that i know of. Maybe this error happens on some deeply buried pages somewhere. Not sure. Statamic's log file is not very informative in this case.

I'm running Statamic 2.11.7 and BigKahuna 1.4.5

Error when local absolute url is define

Hello,

The plugin has a problem with new version since it saved json data in storage with a key url that will contain the absolute URL website.
When switching between differents env it broke statamic :(
I need actually absolute url for SEO and static cache plugin and other stuff, could you please update big-kahuna to save only relative url ?

image

Organizing Pages/Posts in the filter menu

As a site grows with a lot of Posts/Entries, the filter menu becomes a little tough to work through, even with the search bar. Let's chat about how we can make the filter system a little more robust.

A Custom URL cannot be the first child of a Pages URL

This came about when a client tried creating a Custom URL to link to a hash ID on one of the site's pages, but I can reproducing it with any url, such as https://github.com. The BK tag will not render if a Custom URL is the first child of a Pages URL.

Steps to Reproduce:

Given: I have a menu with at least one Pages URL
When: I create a menu item with a Custom URL as a child of an existing Pages URL
Then: I expect to be able to reorder it to any index
BUT: If the item is the first child of the Pages URL, the site throws this error:

FatalThrowableError in BigKahunaTags.php line 105: Call to a member function absoluteUrl() on null

Screenshots

Working Scenario:

Screen Shot 2019-07-30 at 11 19 51 AM

Broken Scenario

Screen Shot 2019-07-30 at 11 19 40 AM

Localization support?

I don't see any localization/translation option when creating menus. Switching locales also doesn't have any effect on the frontend. It only show the default language.

Is it supported? Any plans for this? Pls forgive me in advanced if i missed it.

Thx.

Remove composer.json

The addon currently includes a composer.json file without defining any dependencies. The presence of this file makes it necessary to run php please update:addons in order to install the addon. This should only be necessary if any dependencies must be installed. Thus, removing the composer file simplifies the installation for users. :)

P.S. Thanks for creating this addon, it rocks! ๐Ÿ‘

Cheers

Add preview icon to each menu item

But not link the title, otherwise it's too close to the drag element, which would probably result in people clicking on it when they want to drag & drop.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.