Flowbite with Turbo on rails7

Hi! 👋
Firstly, thanks for your work on this project! 🙂
I got Flowbite working together with Turbo in my Rails 7 project. The original issue was that the javascript worked until the first turbo navigation was made and stoped working after that.
According to Turbo's documentaction this happened because Flowbite uses DOMContentLoaded event to install JS behavior, but this event only fires once, in response to the initial page load.
In order to install the JS behavior on every page change I replaced DOMContentLoaded to turbo:load event in dist/flowbite.js. turbo:load event fires on every page change.
I used patch-package to patch<EMAIL_ADDRESS>for the project I'm working on.

Here is the diff that solved my problem:
diff --git a/node_modules/flowbite/dist/flowbite.js b/node_modules/flowbite/dist/flowbite.js
index 92e66fc..3659e36 100644
--- a/node_modules/flowbite/dist/flowbite.js
+++ b/node_modules/flowbite/dist/flowbite.js
@@ -32,7 +32,7 @@ const rotateAccordionIcon = accordionHeaderEl => {
   }
 };

-document.addEventListener('DOMContentLoaded', () => {
+document.addEventListener('turbo:load', () => {
   document.querySelectorAll('[data-accordion]').forEach(function (accordionEl) {
     const accordionId = accordionEl.getAttribute('id');
     const collapseAccordion = accordionEl.getAttribute('data-accordion');
@@ -109,7 +109,7 @@ const toggleCollapse = (elementId, show = true) => {
   }
 };

-document.addEventListener('DOMContentLoaded', () => {
+document.addEventListener('turbo:load', () => {
   // Toggle target elements using [data-collapse-toggle]
   document.querySelectorAll('[data-collapse-toggle]').forEach(function (collapseToggleEl) {
     var collapseId = collapseToggleEl.getAttribute('data-collapse-toggle');
@@ -150,7 +150,7 @@ const toggleModal = (modalId, show = true) => {
 };

 window.toggleModal = toggleModal;
-document.addEventListener('DOMContentLoaded', () => {
+document.addEventListener('turbo:load', () => {
   document.querySelectorAll('[data-modal-toggle]').forEach(function (modalToggleEl) {
     var modalId = modalToggleEl.getAttribute('data-modal-toggle');
     var modalEl = document.getElementById(modalId);
@@ -172,7 +172,7 @@ document.addEventListener('DOMContentLoaded', () => {
 /***/ 454:
 /***/ (() => {

-document.addEventListener('DOMContentLoaded', () => {
+document.addEventListener('turbo:load', () => {
   document.querySelectorAll('[data-tabs-toggle]').forEach(function (tabsToggleEl) {
     const tabsToggleElementsId = tabsToggleEl.getAttribute('id');
     const tabsToggleElements = document.querySelectorAll('#' + tabsToggleElementsId + ' [role="tab"]');
@@ -2208,7 +2208,7 @@ var popper_createPopper = /*#__PURE__*/popperGenerator({

 ;// CONCATENATED MODULE: ./src/components/dropdown.js

-document.addEventListener('DOMContentLoaded', () => {
+document.addEventListener('turbo:load', () => {
   // Toggle dropdown elements using [data-dropdown-toggle]
   document.querySelectorAll('[data-dropdown-toggle]').forEach(function (dropdownToggleEl) {
     const dropdownMenuId = dropdownToggleEl.getAttribute('data-dropdown-toggle');
@@ -2256,7 +2256,7 @@ var tabs = __webpack_require__(454);
 var modal = __webpack_require__(508);
 ;// CONCATENATED MODULE: ./src/components/tooltip.js

-document.addEventListener('DOMContentLoaded', () => {
+document.addEventListener('turbo:load', () => {
   // Toggle dropdown elements using [data-dropdown-toggle]
   document.querySelectorAll('[data-tooltip-target]').forEach(function (tooltipToggleEl) {
     const tooltipEl = document.getElementById(tooltipToggleEl.getAttribute('data-tooltip-target'));

This issue body was partially generated by patch-package.

Thanks for posting this. I tested your solution on a local version of flowbite.js and it indeed fixed the problem I was having with the js not working.

Do folks think this will lead to a split? ex. another your-package-here-rails gem?
I need to get more familiar with both turbo and the flowbite implementation to know if there is an alternative to this approach that would work for both the turbo and the non-turbo users.

thanks :)

works like a charm 👍

Worked for me on rails7 project, thanks :)

Wow thanks for posting this. Was just hooking up flowbite with rails 7 and hit this issue. Glad I stumbled on this. Fixed my issues.

Also works with Turbolinks (5.2.0) with turbolinks:load. Thanks!

For those using Webpack, a solution that works is to replace DOMContentLoaded by turbo:load in the ./node_modules/flowbite/dist/flowbite.js file
const replace = require('replace'); replace({     regex: "DOMContentLoaded",     replacement: "turbo:load",     paths: ['./node_modules/flowbite/dist/flowbite.js'],     recursive: true,     silent: true, });

this is old, but it would be easier if inside your own js, you trigger the DOMContentLoaded event inside the turbo:load event
// import "flowbite";
window.document.addEventListener('turbo:load', (event) => {
    // trigger flowbite events
    window.document.dispatchEvent(new Event("DOMContentLoaded", {
      bubbles: true,
      cancelable: true
    }));
});

this is old, but it would be easier if inside your own js, you trigger the DOMContentLoaded event inside the turbo:load event
// import "flowbite";
window.document.addEventListener('turbo:load', (event) => {
    // trigger flowbite events
    window.document.dispatchEvent(new Event("DOMContentLoaded", {
      bubbles: true,
      cancelable: true
    }));
});

Yeah, I thought of that too, but couldn't get it to not fire "DOMContentLoaded" twice on the initial load of the page (when "DOMContentLoaded" and "turbo:load" both fire).

You can handle with Turbo Events with application.js as below.
// this method copy from dismiss.js
function initDismiss() {
  document.querySelectorAll('[data-dismiss-target]').forEach(triggerEl => {
    const targetEl = document.querySelector(triggerEl.getAttribute('data-dismiss-target'))
    new Dismiss(targetEl, {
      triggerEl
    })
  })
}

document.addEventListener('turbo:load', initDismiss)

flowbite.js can export init method for example, initDismiss, initCollapse etc..?
If so, We can handle Turbo Event at application.js as below.
document.addEventListener('turbo:load', initDismiss)

On 1.5.2 I've got the following:
window.document.addEventListener('turbo:load', (_event) => {
  console.log("binding turbo:load to domcontentloaded")
  window.document.dispatchEvent(new Event("DOMContentLoaded", {
    bubbles: true,
    cancelable: true
  }));
});

window.document.addEventListener('DOMContentLoaded', (event) => {
  console.log("domcontentloaded event");
})

I can see the domcontentloaded event on every page change, so it's working as intended, but flowbite component JS is not working. Is there a different event I should be dispatching?

Also getting this with Phoenix LiveView, I assume for the same reasons.

For LiveView the fix is similar:
window.addEventListener('phx:page-loading-stop', (event) => {
  // trigger flowbite events
  window.document.dispatchEvent(new Event("DOMContentLoaded", {
    bubbles: true,
    cancelable: true
  }));
});

Please help me, how to use Flowbite and Turbo Rails 7 with import map?
I use Flowbite v.1.5.3 as here https://flowbite.com/docs/getting-started/rails/
I change "DOMContentLoaded" on "turbo:load" in dist/flowbite.js and in vendor/javascript/flowbite.js, but it's not work for me, my scripts work only if reload page

Please help me, how to use Flowbite and Turbo Rails 7 with import map? I use Flowbite v.1.5.3 as here https://flowbite.com/docs/getting-started/rails/ and tailwindcss
I change "DOMContentLoaded" on "turbo:load" in dist/flowbite.js and in vendor/javascript/flowbite.js, but it's not work for me, my scripts work only if reload page

@VarProg I was having the same issue, and tried the solutions above with no success. Nevertheless, after checking a lot of similar problems I found something that might be helpful for us using Flowbite with Rails 7 as a temporary solution.
On your application.js add the following lines:
import { Turbo } from "@hotwired/turbo-rails"
Turbo.session.drive = false

According to the turbo.hotwired.dev handbook:

If you want Drive to be opt-in rather than opt-out, then you can set Turbo.session.drive = false; then, data-turbo="true" is used to enable Drive on a per-element basis.

I also tried just setting the interactive element as data-turbo="false", without a positive outcome.
The solution mentioned works for me, but it is by no means a permanent solution, because the Rails application has bigger transition times during the navigation after I did this change. However, it can help more experienced developers to identify a better solution (I have been working with Rails for only one month).
I'll copy the link of that documentation for further reference.
Turbo Handbook
I hope you find this solution useful, in the meantime.

Hey, IMHO this change introduced the bug https://github.com/themesberg/flowbite/commit/87a0c75d740c4e00739a91fe0167e39b35b1947b

I ended up using stimulus to set up Flowbite functions. The example below is for a Dropdown element's functionality.
app/views/shared/_nav.html.erb

  <button data-dropdown-target="trigger">

app/javascripts/controllers/dropdown_controller.js
import { Controller } from "@hotwired/stimulus"

export default class extends Controller {
  static targets = ["trigger", "menu"]

  connect() {
    this.dropdown = new Dropdown(this.menuTarget, this.triggerTarget)
  }
}

app/javascripts/application.js
import "@hotwired/turbo-rails"
import "flowbite"
import "controllers"

This is a really great idea! Thank you @vladiim !

@indigodavid Working, not sure thats the correct solution tho. Thanks :D

Hello everyone!
I'm the maintainer of the Flowbite Library and the one who wrote the custom JavaScript. That being said, I've never used a Rails 7 with import maps setup so I would really appreciate if someone opened a PR based on the main branch and collaborate with me in providing a fix for this.

Hey everyone,
I've read this thread and from my understand if we add the turbo:load event listener then it should work.
Here's a commit that should fix this in a quick patch: https://github.com/themesberg/flowbite/commit/245cffd117de2870b6fa54b3c8ca2ae10b4926ef

A follow-up to only add the turbo:load listener when it's enabled in a Rails application: https://github.com/themesberg/flowbite/commit/245cffd117de2870b6fa54b3c8ca2ae10b4926ef

I came here after following the Flowbite Rails installation instructions as I'm getting the following error:
Uncaught TypeError: Failed to resolve module specifier "flowbite/src/flowbite.turbo.js". Relative references must start with either "/", "./", or "../".
What I can confirm so far

Tailwind is working
Flowbite 1.5.5 is installed via the latest npm (v.9.2.0)
tailwind.config.js has been modified as directed
import "flowbite" added to app/javascript/application.js

Things are working up to this point.
Things go wrong

Addedimport "flowbite/src/flowbite.turbo.js" to application.js (emphasis explained in next section)
Ran ./bin/importmap pin flowbite
Restarted the server and re-ran ./bin/dev

At this point I'm getting the error which is causing other scripts to not load properly
Potential conflicts
The site's instructions conflict with the previous post. @zoltanszogyenyi says to import "flowbite/src/flowbite.turbo" instead of flowbite. Note that the .js is left off too.
I've tried all combinations of removing/including import "flowbite" and importing flowbite.turbo and flowbite.turbo.js but none have succeeded.
I'll keep fiddling around and report back with clearer instructions should I figure out what's going on.

Hey @agrberg,
Thanks for the report - I'll check this tomorrow. The new flowbite.turbo.js should have the turbo:load event listeners hence why it now should work.

Thanks, I'll check back then as well. FWIW the dist version w/ .js doesn't work either:
Uncaught TypeError: Failed to resolve module specifier "flowbite/dist/flowbite.turbo.js". Relative references must start with either "/", "./", or "../".

Hey @agrberg,
It's a Friday night, but my mind became very uneasy after your report.
I went ahead and tested it on my local Ruby on Rails configuration - and you're right, the relative paths are incorrect because it automatically imports what we have declared as "main" in our package.json file.
Here's a solution:
In your importmpa.rb file add the following line:
pin "flowbite", to<EMAIL_ADDRESS>
This will map the turbo ready file with turbo:load event listeners instead of the default one.
Then import it in your application.js file like this:
import "flowbite"
This should work, unless I have something not configured properly. This is tested with turbo load as well, meaning the event listeners work throughout navigating between the pages.
Please try this out and if it works I'll update the documentation accordingly. Thanks!

🙇 Thank you @zoltanszogyenyi! That did it 🚀
For reference ./bin/importmaps pin flowbite adds the following to importmap.rb
pin "flowbite", to<EMAIL_ADDRESS>pin "@popperjs/core", to: "https://ga.jspm.io/npm<EMAIL_ADDRESS>
I've changed the first line to what you've suggested and it is working. I haven't touch the popperjs line and I need to learn the differences between jspm.io and unpkg.com as importmaps are still generally new to me.

I've now changed the docs to recommend turbo support first because the standard flowbite.js file hooks to the window load event instead of turbo:load. I hope this will make it clear for those who want to use Ruby on Rails 7 in the future.
I'll declare this issue closed now.

Is there a resolution if you are not using importmaps?  I still have to add <meta name="turbo-visit-control" content="reload"> in order for flowbite to work on subsequent pages.
I have "flowbite": "1.5.5" installed and am using import "flowbite" in application.js.

When should flowbite do init work
In the index.ts, I can see
const events = new Events('load', [
    initAccordions,
    initCarousels,
    initCollapses,
    initDismisses,
    initDropdowns,
    initModals,
    initDrawers,
    initTabs,
    initTooltips,
    initPopovers,
    initDials,
]);
events.init();

What if some people still want to do init on DOMContentLoaded event?
Current Solution is Bad
I do not understand why we have files like this
index.ts
index.turbo.ts

And this
datepicker.js
datepicker.turbo.js

Does that mean we will add extra files if we need to support another framework in the future?
The REAL problem
flowbite rely on hard coded event name to do init work and do not support a way to let developers to change it.
What about this solution:

flowbite read value from window.FLOWBITE_INIT_EVENT_NAME, the fallback value is load
Then the code use window.FLOWBITE_INIT_EVENT_NAME to do init work.

This solution can solve all the above problems.

Hey @michael-yin,
Thanks for your input on this, it's much appreciated!
I think that one reason why the separate files solution is good is because it's easy to get started with it without requiring to do any other configuration and we can also test it before making a release with different frameworks.
On the other hand, as you've stated, it's less flexible when it comes to adding your own object and event load listeners.
I'm currently focusing on some other issues for a v1.6.1 release but you're more than welcome to open up a PR with an alternative solution!
Either way this will definitely be looked into.
Cheers,
Zoltan

Ok, turbo:load is fine, but what about turbo stream partials render? Is there a way to fix this? I tried to do this with MutationObserver but it is a mess.

@alhafoudh did you find any workaround for turbo stream partials?

@SofiaSousa Well, sadly, no. :( Me and my team came to conclusion, that the JS utilities for flowbite are just not fit for use with something like turbo. We use RevealController from https://www.stimulus-components.com to replace the Dropdown behavior.

Hey @alhafoudh @SofiaSousa,
Thanks for reporting - can you please help me understand what's the difference between Turbo load and Turbo stream partials? I've updated all the Flowbite event listeners to work with turbo:load and as much as I've tested on a local Ruby on Rails 7 project it seemed to work fine.
I'm available to provide updates to support that feature as well, but it owuld be helpful to have a repository to test this out or at least some code examples that I can hook into my own local project.
Cheers,
Zoltan

@zoltanszogyenyi I am happy to explain.
turbo:load event handles only page navigation event. Since turbo does XHR/fetch with DOM body replacement instead of full page load, some libraries need to hook into this event to reinitialize their compoenents. flowbite handles this event well ✅
turbo stream partial happens, when turbo decides to replace only small part of the page (not full body). This can happen then user interacts with the page in a way that it triggers page partial replacement. What am I and @SofiaSousa dealing with is that those "partials" can contain flowbite components which require JS to work (like Dropdown in my case). We expect flowbite to reinitialize the JS code required the Dropdown to work for HTML which just arrived through streamed partial. flowbite does not handle this case ❌

Hey @alhafoudh and @zoltanszogyenyi,
In my case, the component I'm using is Modal. The way I found last night to make it work it's using a Stimulus controller.
Not the prettiest way, but when the turbo stream partial loads, it triggers the connect method in the Stimulus controller. Here we can run the initModals() method to add the modal's elements events again.

@zoltanszogyenyi I see two viable options for flowbite:

flowbite will provide stimulus controllers for each component that requires JS
reorganize flowbite component JS initialization code so it can be called for each component instance separately. Now we have only init-all functions like initDropdowns() and initModals()

looks like i'm getting same issue @alhafoudh - correct me if i'm wrong tho. i'm trying to do the simplest thing by prepending comment to the partial.
<%= turbo_stream.prepend "comments", partial: "comments/comment", locals: { comment: @comment } %>
although after flowbite dropdown stops working.

I have a Flowbite's dropdown opened in a modal.
The modal is opened as a turbo_frame.
I see the flowbite is not initiated and I think is related to this problem because flowbite is initiate at turbo:load but I belive it should be initiated at turbo:frame-load.
How to initiate flowbite at both turbo:frame-load and turbo:load ?

I had a problem with Tabs when the rails form threw an error, the turbo:load event was not fired when an error occurred, but the turbo:render event was. So, maybe it would be better to replace the turbo:load event with turbo:render, and to make it work with frames make a listener for turbo:frame-render as well.

If every Flowbite component was initialized by a Stimulus controller, it
would not require any special handling on the Flowbite side and it would
initialize for all manipulations of the DOM, including any by libraries
that aren't Turbo. Using DOM observers avoids having to know anything about
the events fired by various libraries. Perhaps the best solution is a
bridge library that provides Stimulus controllers for all flowbite
components.
On Thu, Feb 16, 2023 at 12:09 PM Pedro Fernández @.***>
wrote:

I had a problem with Tabs when the rails form threw an error, the
turbo:load event was not fired when an error occurred, but the
turbo:render event was. So, maybe it would be better to replace the turbo:load
event with turbo:render, and to make it work with frames make a listener
for turbo:frame-render as well.
—
Reply to this email directly, view it on GitHub
https://github.com/themesberg/flowbite/issues/88#issuecomment-1433653371,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAEPYLXKWKBNNVC32Z2K2P3WX2COTANCNFSM5N5WQGQQ
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

Could you post some code? For example, what to write in the connect() method to initialize Dropdowns?

I ended up making a stimulus controller for each Flowbite component I use, it works great!

Yes, this is the way.

Could you post some code? For example, what to write in the connect() method to initialize Dropdowns?

dropdown_controller.js :
'use strict';

import {Controller} from "@hotwired/stimulus"
import {Dropdown} from 'flowbite';

export default class extends Controller {
    static targets = ["target", "trigger"];
    static values = {
        options: {Object, default: {'placement': 'bottom'}}
    }

    initialize() {
        this.dropdown = new Dropdown(this.targetTarget, this.triggerTarget, this.optionsValue);
        document.addEventListener('turbo:before-cache', (event) => {
            this.dropdown.hide();
        });
    }

    toggle() {
        if (this.dropdown.isVisible()) {
            this.dropdown.show();
        } else {
            this.dropdown.hide();
        }
    }
}

Allows to close the dropdown before the turbo cache :
document.addEventListener('turbo:before-cache', (event) => {
            this.dropdown.hide();
        });

DOM :

<button type="button" class="..." id="user-menu-button" aria-expanded="false" data-action="click->dropdown#toggle" data-dropdown-target="trigger">....</button>

 ...

This is a simple example.

Is this something that you (flowbite) intend to fix in an upcoming release? This seems like a pretty glaring flaw that I feel should be fixed by flowbite and not pushed off to the users of this package to patch with controllers or by modifying a locally stored version of said JS.
Just curious before I start adding controllers willy-nilly which I then would (hopefully) have to remove once the fix is in.

I just paid $800 for the team account and this clearly does not work with hotwire. At least the details here should be discussed in the docs about turbo installation. Can we get a resolution or a refund?

Hey everyone,
From what I understand, to make this work with Stimulus Hotwire the events have to be registered with turbo-load and turbo:frame-load. This is an easy update that we could patch in a day if that's the case. I'll try to push this through tomorrow. Can I get a code snippet to test it with my local Ruby on Rails 7 project? Would appreciate it!
@garthcodes thanks for supporting our work, it's the only way we can develop the open-source version and the pro version as well, I believe that if the new event listener for v1.6.4 will fix the Hotwire issue then it would solve your problem as well. However, if you still wish for a refund please contact us on the website.
I'll come back to this tomorrow. If anyone wants to help testing the new release I'm available to chat on Discord.
Cheers,
Zoltan

This is the code I used to get it working using your suggestion. I tested it on my end. This is from:https://cdnjs.cloudflare.com/ajax/libs/flowbite/1.6.3/flowbite.turbo.js
var events = new events_1.default('turbo:frame-load', [
    accordion_1.initAccordions,
    collapse_1.initCollapses,
    carousel_1.initCarousels,
    dismiss_1.initDismisses,
    dropdown_1.initDropdowns,
    modal_1.initModals,
    drawer_1.initDrawers,
    tabs_1.initTabs,
    tooltip_1.initTooltips,
    popover_1.initPopovers,
    dial_1.initDials,
]);
events.init();
var events2 = new events_1.default('turbo:load', [
  accordion_1.initAccordions,
  collapse_1.initCollapses,
  carousel_1.initCarousels,
  dismiss_1.initDismisses,
  dropdown_1.initDropdowns,
  modal_1.initModals,
  drawer_1.initDrawers,
  tabs_1.initTabs,
  tooltip_1.initTooltips,
  popover_1.initPopovers,
  dial_1.initDials,
]);
events2.init();
exports["default"] = {
    Accordion: accordion_1.default,
    Carousel: carousel_1.default,
    Collapse: collapse_1.default,
    Dial: dial_1.default,
    Drawer: drawer_1.default,
    Dismiss: dismiss_1.default,
    Dropdown: dropdown_1.default,
    Modal: modal_1.default,
    Popover: popover_1.default,
    Tabs: tabs_1.default,
    Tooltip: tooltip_1.default,
    Events: events_1.default,
};

Hey @garethcodes,
Thanks for that.
If that works then it's an easy fix and I can confirm a release tomorrow (I live in Europe and it's 1.30 AM currently).
I'll also update the docs to reflect this.
Cheers,
Zoltan

solution given by @garthcodes seems to work.

I've released v1.6.4 - please upgrade to the latest version via CDN or NPM and test things out because the new turbo:frame-load events have also been added.

I'll close the issue until further notice.

Just adding clarification for others trying to fix this, you'll need the turbo dist file instead of the standard flowbite index file (in addition to upgrading to v1.6.4).
https://flowbite.com/docs/getting-started/rails/#esbuild

Good job guys, but this partials sent over cable are still not fixed by this :(

what @alhafoudh said. it still doesn't work with partials. would you be able to provide solution / refund or fix it? tbh only subscribed cause seen here that all issues with turbo were resolved, but the one i had - persists.

Personally I think taking on the responsibility of component initialization has to make too many assumptions about the ways developers are manipulating their DOM. If component initialization wasn't attempted by simply including the script, we would be free to initialize in our own ways. With Rails, Stimulus makes the most sense (IMO) because just placing the component HTML on the page also initializes any associated JS.
Is there any way we can opt to not auto-initialize? I noticed this:
// setup events for data attributes
const events = new Events('load', [
    initAccordions,
    initCollapses,
    initCarousels,
    initDismisses,
    initDropdowns,
    initModals,
    initDrawers,
    initTabs,
    initTooltips,
    initPopovers,
    initDials,
]);
events.init();

Is there a way to not include that or would we have to write our own Flowbite index.ts?
I suppose another long term solution would be to init components with MutationObservers, but that's quite a change.

I'm getting this in my console:
Uncaught TypeError: Failed to resolve module specifier "flowbite/dist/flowbite.turbo.js". Relative references must start with either "/", "./", or "../".

The top of my application.js only has this:
import "@hotwired/turbo-rails";
import "flowbite";
import "flowbite-datepicker";
import "flowbite/dist/flowbite.turbo.js";
import "controllers";

Are there any instructions missing?

Hey everyone,
Can you please try to initialise the components when using partials on a hook from Ruby on Rails 7 when the DOM has been rendered or re-rendered?
For Nuxt.js this would be the equivalent:

<template>
    // Modal HTML markup with data attributes from Flowbite
</template>

Basically, you would only need to call the initFlowbite(); function.
Here's some more info on this: https://flowbite.com/docs/getting-started/quickstart/#init-functions
Cheers,
Zoltan

what @alhafoudh said. it still doesn't work with partials. would you be able to provide solution / refund or fix it? tbh only subscribed cause seen here that all issues with turbo were resolved, but the one i had - persists.

Please check out the solution above by calling one single function to initialise all UI components that require data attributes.

I made it work with this however would be nice to consider some better options. not sure why I couldn't make it work just with initDropdown or initFlowbite method.
import { Controller } from "@hotwired/stimulus";

export default class FlowbiteController extends Controller {
  initialize() {
    document
        .querySelectorAll('[data-dropdown-toggle]')
        .forEach(function ($triggerEl) {
        var dropdownId = $triggerEl.getAttribute('data-dropdown-toggle');
        var $dropdownEl = document.getElementById(dropdownId);
        if ($dropdownEl) {
            var placement = $triggerEl.getAttribute('data-dropdown-placement');
            var offsetSkidding = $triggerEl.getAttribute('data-dropdown-offset-skidding');
            var offsetDistance = $triggerEl.getAttribute('data-dropdown-offset-distance');
            var triggerType = $triggerEl.getAttribute('data-dropdown-trigger');
            var delay = $triggerEl.getAttribute('data-dropdown-delay');
            new Dropdown($dropdownEl, $triggerEl, {
                placement: placement ? placement : 'bottom',
                triggerType: triggerType
                    ? triggerType
                    : 'click',
                offsetSkidding: offsetSkidding
                    ? parseInt(offsetSkidding)
                    : 0,
                offsetDistance: offsetDistance
                    ? parseInt(offsetDistance)
                    : 10,
                delay: delay ? parseInt(delay) : 300,
            });
        }
        else {
            console.error("The dropdown element with id \"".concat(dropdownId, "\" does not exist. Please check the data-dropdown-toggle attribute."));
        }
    });
  }
}

@hs-dliaska ☝ you suggestion worked worked for me.
// flowbite_controller.js
import { Controller } from "@hotwired/stimulus";
import "flowbite";
export default class FlowbiteController extends Controller {
  initialize() {
    document
      .querySelectorAll("[data-dropdown-toggle]")
      .forEach(function ($triggerEl) {
        var dropdownId = $triggerEl.getAttribute("data-dropdown-toggle");
        var $dropdownEl = document.getElementById(dropdownId);
        if ($dropdownEl) {
          var placement = $triggerEl.getAttribute("data-dropdown-placement");
          var offsetSkidding = $triggerEl.getAttribute(
            "data-dropdown-offset-skidding"
          );
          var offsetDistance = $triggerEl.getAttribute(
            "data-dropdown-offset-distance"
          );
          var triggerType = $triggerEl.getAttribute("data-dropdown-trigger");
          var delay = $triggerEl.getAttribute("data-dropdown-delay");
          new Dropdown($dropdownEl, $triggerEl, {
            placement: placement ? placement : "bottom",
            triggerType: triggerType ? triggerType : "click",
            offsetSkidding: offsetSkidding ? parseInt(offsetSkidding) : 0,
            offsetDistance: offsetDistance ? parseInt(offsetDistance) : 10,
            delay: delay ? parseInt(delay) : 300,
          });
        } else {
          console.error(
            'The dropdown element with id "'.concat(
              dropdownId,
              '" does not exist. Please check the data-dropdown-toggle attribute.'
            )
          );
        }
      });
  }
}

And usage
    <button data-controller="flowbite" id="dropdownMenuIconButton" data-dropdown-toggle="dropdownDots>" class="inline-flex items-center p-2 text-sm font-medium text-center text-gray-900 bg-white rounded-lg hover:bg-gray-100 focus:outline-none " type="button">
      <svg class="w-6 h-6" aria-hidden="true" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M10 6a2 2 0 110-4 2 2 0 010 4zM10 12a2 2 0 110-4 2 2 0 010 4zM10 18a2 2 0 110-4 2 2 0 010 4z"></path></svg>
    </button>

Flowbite turbo now reinitializes on these two events: "turbo:load" and "turbo:frame-load"
However, in order to cover all cases (for example a form that returns 422 - Unprocessable Entity),
flowbite turbo should also fire on: "turbo:render"

You can check out an example for this in the latest comment for this issue: #499
import { Controller } from "@hotwired/stimulus";
import { initFlowbite } from "flowbite";

export default class extends Controller {
  initialize() {
    initFlowbite();
  }
}

And then:
<%= turbo_frame_tag id="flash" do %>

    <%= render "layouts/flash" %>

<% end %>

I had the same issue with Symfony Ux Turbo and it worked 👍🏼

Is there something that I am missing here on how to get this to work? Following the Rails instructions it looks like you npm install flowbite mostly for the tailwind integration. I used the importmap pinning it to the turbo.min.js and requiring it in application.js and still when a page reloads the flowbite code does not work properly.
I have https://github.com/fzf/flowbite-test that replicates the behavior.

Is there something that I am missing here on how to get this to work? Following the Rails instructions it looks like you npm install flowbite mostly for the tailwind integration. I used the importmap pinning it to the turbo.min.js and requiring it in application.js and still when a page reloads the flowbite code does not work properly.
I have https://github.com/fzf/flowbite-test that replicates the behavior.

Honestly, best to just use esbuild and follow the instructions of the original post, @filser89 explained it pretty well

Thanks for this information!  (and from everyone on this thread)

At the moment, Flowbite Turbo initializes on these two events: "turbo:load" and "turbo:frame-load"
However, in order to cover all cases (for example a form that returns 422 - Unprocessable Entity), flowbite turbo should also fire on: "turbo:render"

Using Flowbite with Rails 7 via importmaps, had an issue where flowbite was not re-initializing after turbo:render
This worked for me
application.js
`import "flowbite";
window.document.addEventListener("turbo:render", (_event) => {
window.initFlowbite();
});
importmap.rbpin 'flowbite', to: 'https://cdnjs.cloudflare.com/ajax/libs/flowbite/2.3.0/flowbite.turbo.min.js'
`

@AndrewNgKF this worked! Thank you for the suggestion

I am running my rails 7 application using esbuild, but despite follwing, the instructions on flowbite installation with turbo, I am facing an issue of the flowbite dropdown not closing when I navigate to a different page then I navigate back to the same page. Here is an example:
Screencast from 26-04-2024 09:32:49 ASUBUHI.webm
Also when I create a record, the dropdown for the newly created record does not appear until I refresh the page.
Screencast from 26-04-2024 09:50:35 ASUBUHI.webm

I wanted to add this is still an issue on Rails 7, but @AndrewNgKF's suggestion does get it working again

Thanks mate


Use only numeric ids in detailed-targeting values

Use it like
"interested_in":[1],"interests":["6002867432822","6003377622944"]

not
"interested_in":[{id: 1, name: '*'}],
"interests":[{id:<PHONE_NUMBER>822, name: '*'}, {id:<PHONE_NUMBER>944, name: '*'}]

to make it consistent with enum values, like interested_in, relationship_statuses,education_statuses . See https://developers.facebook.com/docs/marketing-api/targeting-specs/v2.7#advanced_demographics for more.

Support all types of selected items values.


[Bug] Submit Button

These are the following bugs which are ruining the user experience:

The Submit button is far below the Footer
The page gets reloaded after a fraction of second submit button is pressed

Kindly assign me this issue and I can get it fixed and repaired in no time.

Please assign me this task.


Attempt to remove unused fields of app.json

Coverage remained the same at 100.0% when pulling 5418b077d41a17a830e9b096cdee978d4098cfc4 on cleanup/app-json-optimization into d927ca2ecfa79e7d4615a0faeb66007117d3a5a8 on master.

Coverage remained the same at 100.0% when pulling e645f7d59d2794e37f644cd652b6e7a472ee334d on cleanup/app-json-optimization into d927ca2ecfa79e7d4615a0faeb66007117d3a5a8 on master.


X-MS-Exchange-Organization-Network-Message-Id not available in quarantines messages

Under the "Submit a questionable email to Microsoft" heading, it states to use the "X-MS-Exchange-Organization-Network-Message-Id". This value does not seem to appear in the header of a message that has been quarantined (https://protection.office.com/quarantine). In that case the X-MS-Office365-Filtering-Correlation-Id value is identical and can be used instead.
It would be useful to note this in the documentation.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 162f11ad-8add-952e-fd64-488e8e3f3b14
Version Independent ID: addf14d5-f1c1-662d-9844-6888df0349bd
Content: Admin submissions - Office 365
Content Source: microsoft-365/security/office-365-security/admin-submission.md
Service: o365-seccomp
GitHub Login: @chrisda
Microsoft Alias: siosulli

@Crimsonfox89, I updated the topic as you described. In the future, you too can make changes like this without opening an Issue first. For instructions, see https://github.com/MicrosoftDocs/microsoft-365-docs/blob/public/README.md.
Thanks for the feedback.
Closing


Replace action manager with app-model

Since https://github.com/napari/napari/pull/4784, should we remove convenience functionality that adds items to the menu using the old way?
Currently _add_viewer_dock_widget has an option to add the dock widget to menu bar. We could also just add a note advising against it's use. Note that I don't think it would be possible/practical to convert the existing functionality to the new method as MenuID and CommandID enums can't really be dynamically added to (though might be wrong about this).

Expanding this issue to cover replacing action manager with commands registry and determine if any deprecation is needed.
Note this is an item in: #4860

Todos:

[ ] Remove _add_viewer_dock_widget option to add the dock widget to menu bar
[ ] Non-menu actions still handled by action manager:

[ ] layer actions
[ ] viewer actions

These seem to be done in https://github.com/napari/napari/pull/6204


Any way to select a local SQLite Database?

sqlectron-gui
1.20.2 (<IP_ADDRESS>9)
OS X 10.11.6 (15G1217)
I can't find any possible way to select a local sqlite database stored as file on the local machine.

The only settings possible to define are: Name, Dtabase Type and Database/Keyspace field

Maybe it is not an issue in general but a lack of UI logic to handle such common user task.

Since in SQLite the database is the file itself. You have to set the file
path in "Database" field.
But I agree the UI could be improved. Is the second time I see this
confusion.
On Wed, Mar 1, 2017, 6:30 AM Paul Phönixweiß<EMAIL_ADDRESS>wrote:

sqlectron-gui
1.20.2 (<IP_ADDRESS>9)
OS X 10.11.6 (15G1217)
I can't find any possible way to select a local sqlite database stored as
file on the local machine.
[image: db file]
https://cloud.githubusercontent.com/assets/3630353/23453627/1ff06fba-fe7a-11e6-862a-3ade07c380fd.png
The only settings possible to define are: Name, Dtabase Type and
Database/Keyspace field
[image: settings window]
https://cloud.githubusercontent.com/assets/3630353/23453677/53bcd680-fe7a-11e6-9380-cd64d2db4f8f.png
Maybe it is not an issue in general but a lack of UI logic to handle such
common user task.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/sqlectron/sqlectron-gui/issues/303, or mute the
thread
https://github.com/notifications/unsubscribe-auth/AAphpD2_s5oXrGerzPIJPbYqT5c3zg6bks5rhTrCgaJpZM4MPaTi
.

Maybe just a button with a file select dialog could solve the confusion?


fix: add linting step and fix linting issues

@ankitm123 could you review this?

@ankitm123 when running make lint again after go mod tidy, which I didn't run the first time, it gave me more linting issues that didn't appear before and I didn't manage to solve these
pkg/cmd/job/job_test.go:3: File is not `goimports`-ed (goimports)
import (

pkg/cmd/install/install.go:168:2: rangeValCopy: each iteration copies 1000 bytes (consider pointers or indexing) (gocritic)
        for _, p := range podList.Items {
        ^

pkg/cmd/pods/pods.go:6: File is not `goimports`-ed (goimports)

pkg/cmd/pods/pods_test.go:4: File is not `goimports`-ed (goimports)
        "context"

So for goimports issue, I recommend installing the go plugin in vscode, and making it run goimport on save (There are resources u can check) -  but all it does is gofmt with checking the order of the imports.
As for rangeValCopy issue from gocritic, you just need to index the value inside the loop. So something like this:
for k := range podList.Items {
 p := podList.Items[k]
 ....

Also, please squash all the changes into a single commit before marking it ready for review. https://jenkins-x.io/community/code/#squash-and-rebase

@ankitm123 Done


Update poland.csv

Update poland.csv by adding cases of date 19th october.

Hi @YagyikPrajapat Great! Thanks a lot for update 🔥 Approved 🚀 Best wishes,


Release the 1.0.0 gem

The current rubygems gem is versioned at 0.0.8 but master has lots of fixes and is versioned at 1.0.0.

:+1:

@goodwill please :)

Please?

Done.
Regards,
William Yeung
Tofugear Limited
E<EMAIL_ADDRESS>T: +852 21519830
M: +852 92538475
W: http://tofugear.com

On 25 Apr, 2015, at 8:25 pm, wvengen<EMAIL_ADDRESS>wrote:
Please?
—
Reply to this email directly or view it on GitHub https://github.com/goodwill/capybara-select2/issues/33#issuecomment-96191059.

Thanks!

Thank you!


Is it possible somehow to look at browser console via selenoid ui for debugging?

Just would like to clarify:
Is it possible somehow to look at browser console via selenoid ui for debugging?

@EdgarGalstyan yep, just open it as usually. By default Selenoid UI VNC feature is working in read-only mode (to not accidentally intercept running tests). This can be turned off by clicking on violet button with a padlock icon.

Great!
Thanks Ivan Krutov!)


Bump sqlx & expose sqlx feature rustls flag.

I'm looking to integrate this with the actix-web-starter project I've been working on (needs a new job queue/engine due to a licensing issue that I somehow missed...), and so far it's pretty cool. Very nice project.
This PR should keep all the existing behavior but just exposes another sqlx runtime flag (and bumps sqlx to 0.5.2). If I've missed anything I'm all ears - hoping it's not too big a change.

Thanks for this PR! I'm amazed you found this crate TBH, I hadn't made any attempt to publicise it yet 😄. I should warn you, I haven't even finished the project I built this for yet, so it's still very early stage.

Haha, yeah... I mean unfortunately the various background-jobs type crates in Rust are all in various stages of "new", so I'm not too worried about this one also being new. I just appreciated the rationale for using a database to back it; I think that's easier for  someone just jumping in, which is the point of the starter - one less thing to set up and configure.
Users who need something else can rip it out and replace it themselves without too much hassle, and those users tend to know who they are.
Now I just need actix-web 4.0 to settle down...


dart_analsyer - add stricter type inference checks

This issue was originally filed by<EMAIL_ADDRESS>
The flag "--type-checks-for-inferred-types" warns about:
    var q = new Queue<String>();
    q.iAmNotAMethodOnQueue();
But you don't get warnings for:
    var q = new Queue<String>();
    q = 42;
It would be nice too also warn about this second type of mistake, possibly behind another flag.
If you do really want to mix types in a variable, then label the field as dynamic, and no warnings will be emitted.
   dynamic qOrInt = new Queue<String>();
   qOrInt = 42
This is how c# mixes static type inference and dynamic types.

This is implemented as a strong mode warning.
$ cat 9401.dart
void main() {
  var q = new List<String>();
  q = 42;
}
$ dartanalyzer --strong 9401.dart
Analyzing [9401.dart]...
[error] Type check failed: 42 (int) is not of type List<String> (/Users/srawlins/code/9401.dart, line 3, col 7)
[warning] A value of type 'int' cannot be assigned to a variable of type 'List<String>' (/Users/srawlins/code/9401.dart, line 3, col 7)
[hint] The value of the local variable 'q' is not used (/Users/srawlins/code/9401.dart, line 2, col 7)
1 error, 1 warning and 1 hint found.


webpack_modules properties renamed => breaks code

Using code output from webpack, the obfuscator is making a breaking change if options.renameProperties = true;
The output throws an error on the output line of the form:
return __webpack_modules__[moduleId](module, module[_0x41d9dc(0x43e)], __webpack_require__), module['exports'];
Adding some logging to the obfuscated output, I see that the moduleId property strings have been renamed from the original name ('../src/events.ts' or '../src/menus.ts' affected) to something like _0x90d7c8. I have other similar filenames that aren't being renamed (such as '../src/paths.ts' or '../src/tools.ts') and don't see obvious differences in use or module imports, so I am unclear why these two changing where others are left alone.
this results in an error being thrown: Uncaught TypeError: webpack_modules[moduleId] is not a function
Replacing that line with the code below shows that the problem is that the property in the modules has been renamed, but the array used to loop over it has not.

The moduleId array still lists the original name before obfuscation. (Test 1)
However, the actual property in webpack_modules has been renamed (Test 0)

try {
    console.warn('\n\n\nNow testing: ' + moduleId);
    if (typeof __webpack_modules__[moduleId] !== 'function') {
        for (const props in __webpack_modules__) console.warn(`WEBPACK TEST 0: __webpack_modules__${props} = `, props); _//reviewing console shows one affected module listed as _0x90d7c8 for example_
    }
return __webpack_modules__[moduleId](module, module['exports'], __webpack_require__), module[__0x2e4d00(0x1f3)_];
} catch (e) {
    if (typeof __webpack_modules__[moduleId] !== 'function') console.warn('WEBPACK TEST 1: ', moduleId); _//lists original name for all_
    console.warn('WEBPACK TEST 2: ', __webpack_modules__[moduleId]); //undefined for renamed module
    console.error('WEBPACK TEST 3: ', e);
    return function () {};
}

I do not see a clear pattern as to which names get mangled.
Workaround:
Using the following prevents the issue (all my modules end in .ts since I'm using TypeScript)
options.reservedNames.push('.*.ts')
Your Environment

Obfuscator version used: v2.9.5
Node version used: v12.16.1

Hi. If this option breaks your code - disable it.
https://github.com/javascript-obfuscator/javascript-obfuscator#i-enabled-renameproperties-option-and-my-code-broke-what-to-do

Obfuscating method names is probably the best and most useful feature of this software, and a conflict with webpack is likely to prevent a lot of developers from being able to use it. Chances are it probably affects other scenarios, as the issue is that the object keys are being obfuscated in one context and not another. Any chance of leaving this open?

Property names cannot be done in the same way as identifier names. So the logic is the following:

traverse through all property names
for each property name rename this name and put it in the cache
if the visited property name is the same as already renamed - put the name for this property from the cache

So, it respects only string literal property names. If a property name is computed in some way - this option WILL break your code.

@sanex3339 I appreciate you taking the time to provide that info. That makes sense and I would expect computed keys would break things. In this case, these are calls to retrieve object methods based on string literals.
Would it be possible to update the rename properties feature so that you can prevent it from renaming properties when they are created using string literals for the keys? Disabling these string property replacements would protect webpack, while allowing obfuscation of most of the actual application code. I'd use a Regex, but the other bug about the call stack seems to prevent broad use of Regex to protect certain patterns.
Below are snippets of the code before obfuscation with more detail on the nature of the problem:
========
From Webpack part #1: module assigned as a variable. Webpack provides a string to pull an object method later. Obfuscator leaves these as is, which creates a conflict later with part 4
/* harmony import */ var _src_menus__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./src/menus */ "../LIBRARY/src/menus.ts");
========
Webpack part #2: Webpack uses a generic function to return modules from an object containing them as methods (nothing important affected here):
function __webpack_require__(moduleId) {
    ...
    /******/ 		__webpack_modules__[moduleId](module, module.exports, __webpack_require__);
    ...
    }

========
Webpack part #3: The object methods (obfuscation occurs here and creates problems because the string literal argument above is not obfuscated). The bug occurs when the obfuscator converts from string "../LIBRARY/src/menus.ts" to _0x475d46. Unclear why this string property is converted while most on this same object are not.
/******/ 	var __webpack_modules__ = ({
    ...
/***/ "../LIBRARY/EXPORTS.ts":
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
    "use strict";
    __webpack_require__.r(__webpack_exports__);
    /* harmony export */ __webpack_require__.d(__webpack_exports__, {
    ...

    /***/ "../LIBRARY/src/menus.ts":
    /*!***********************************!*\
    !*** ../LIBRARY/src/menus.ts ***!
    \***********************************/
    /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {...

I think the best way is to use reservedNames option. I don't want to make exceptions based on the current implementation of some libraries.
Right now webpack uses this approach. Later it may use a different approach.

Ok, I appreciate you reviewing it.


Added k8S deployment file and Jenkins pipeline profile

What is the purpose of the change
Added k8S deployment file and Jenkins pipeline profile
Brief change log
Added k8s dir
Added assembly-combined-package\assembly-combined\sbin\k8s start script
Added jenkinsfile
Verifying this change
This change is a trivial rework / code cleanup without any test coverage.
Does this pull request potentially affect one of the following parts:
Dependencies (does it add or upgrade a dependency): (no)
Anything that affects deployment: (yes)
The MGS(Microservice Governance Services), i.e., Spring Cloud Gateway, OpenFeign, Eureka.: (no)
Documentation
Does this pull request introduce a new feature? (yes)
If yes, how is the feature documented? (docs)

copy that


Vendorize: leaflet.opacity.css

A future BL Allmaps release will need to iron out this CSS dependency.
Addresses https://github.com/bplmaps/blacklight-allmaps/issues/51

Thank you @ewlarson !


Add Aditya Dehal to Contributers list

Hi  @aditya2000, I'm quite elated about your pull request. I wanna evolve this project to addresses various problems faced by first-time contributors. I'd love to learn about your journey in open source community, the problems, pain points you had etc.
Could you explain how you felt when you went through the tutorial, made a pull request and learned that I merged it?
We’ve recently added social share  to our web app. Could you please go to https://roshanjossey.github.io/first-contributions/#social-share and share your first contribution to open source?
Also, check out projects with easy issues while you’re there.

Oh the tutorial was really amazing and well written. Going through the
tutorial was a smooth ride. Thanks for providing such an awesome tutorial.
It was so helpful for me. :)
On Mon, Jul 16, 2018 at 9:10 PM Roshan Jossey<EMAIL_ADDRESS>wrote:

Hi @aditya2000 https://github.com/aditya2000, I'm quite elated about
your pull request. I wanna evolve this project to addresses various
problems faced by first-time contributors. I'd love to learn about your
journey in open source community, the problems, pain points you had etc.
Could you explain how you felt when you went through the tutorial, made a
pull request and learned that I merged it?
We’ve recently added social share to our web app. Could you please go to
https://roshanjossey.github.io/first-contributions/#social-share and
share your first contribution to open source? Also, check out projects with
easy issues while you’re there.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/Roshanjossey/first-contributions/pull/5438#issuecomment-405290574,
or mute the thread
https://github.com/notifications/unsubscribe-auth/Aft2K18iD9Z-lwdW4NbA5Jr6EsIOVDOxks5uHLQBgaJpZM4VRW6Z
.

I’d urge you to continue contributing to other open source projects.
We also have a slack team to help/mentor people trying to contribute to open source projects.
You can join the team by going to https://goo.gl/PM1Jdh


Allow user to skip initial venv creation

While performing an initial setup is useful, it can take long. The user should have the possibility to skip it and to perform env setup and formatting on their own later

Done


Disable Public API endpoint to expose clips/images for notifications

I'd like to carry on using the HA integration but at the same time I'd like an option to disable this feature, is it possible currently or can this be implemented?
I understand these clip ID's are randomly generated for the links but is this enough security for complete privacy?

I can look into making it configurable. You would have to know the microsecond the event started and the random event id. The probability of it being guessed is very low, similar to webhooks.

@Morphy99 do you still want this? I'm not sure it's worth the complexity in the code to disable the notifications view -- if you want complete privacy I think a reverse proxy (e.g. Apache or nginx) in front of HA would really be a great start, and at that point it is trivial to block these requests (and any other HA requests you find questionable).

Personally, I'm fine without it. I opened the issue without any knowledge on what work would be involved to implement it, but thinking it wouldn't be too hard. And a lot of HA users are really into privacy and the thought of exposing clips to the internet would bother some. But as Blake said, being able to guess the link is a very low probability. So if it's too much work, don't worry!
Not sure a reverse proxy is the solution for everyone. A lot of users rely on nabu casa cloud to access their instance which is considerably easier to configure than nginx.

Yeah, fair enough. Reverse proxy configuration is certainly not something I can imagine a lot of people want to face.
It would be somewhat difficult to prevent opening the http endpoint in the first place since that's once for the whole integration, and the option would be per instance of the integration. But easy to make that endpoint do nothing if so configured. Will take a look at how involved it would be.


PrismJS?

Hi! first of all, thanks for the great theme, I've been using it on vscode, chrome devtools and iTerm since I saw your tweet 3 months ago and I definitely love it!
That's why I was looking to use it on my website via PrismJS. Is there any way we can get support for that?
Anyway, thanks for the cool package!

My website uses it, so you can find the source for now on the taniarascia.com repo. I’ll try to add it here soon.


Up

Why:

What's being changed:

Check off the following:

[x] All of the tests are passing.
[x] I have reviewed my changes in staging.
[x] For content changes, I have reviewed the localization checklist
[x] For content changes, I have reviewed the Content style guide for GitHub Docs.

MIT License
Copyright (c) [year] [fullname]
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
 IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

https://docs.github.com/articles/about-pull-request-reviews/


new cql file

Codecov Report

Merging #380 into release-1.14-sp3 will not change coverage.
The diff coverage is n/a.

@@                Coverage Diff                 @@
##             release-1.14-sp3    #380   +/-   ##
==================================================
  Coverage                40.9%   40.9%
  Complexity                771     771
==================================================
  Files                     110     110
  Lines                    7541    7541
  Branches                  851     851
==================================================
  Hits                     3085    3085
  Misses                   4128    4128
  Partials                  328     328

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fc7c4da...0dc317f. Read the comment docs.


[Enhancement] Support refresh mv by patition for external table

What type of PR is this：

[ ] BugFix
[ ] Feature
[x] Enhancement
[ ] Refactor
[ ] UT
[ ] Doc
[ ] Tool

Which issues of this PR fixes ：

#11116
Problem Summary(Required) ：

Checklist:

[ ] I have added test cases for my bug fix or my new feature
[ ] This pr will affect users' behaviors
[ ] This pr needs user documentation (for new or modified features or behaviors)

[ ] I have added documentation for my new feature or new function

[FE PR Coverage Check]
:heart_eyes: pass : 29 / 31 (93.55%)
file detail

path
covered_line
new_line
coverage
not_covered_line_detail

:large_blue_circle:
com/starrocks/analysis/StringLiteral.java
1
2
50.00%
[70]

:large_blue_circle:
com/starrocks/catalog/MaterializedView.java
4
5
80.00%
[490]

:large_blue_circle:
com/starrocks/scheduler/PartitionBasedMaterializedViewRefreshProcessor.java
14
14
100.00%
[]

:large_blue_circle:
com/starrocks/sql/analyzer/MaterializedViewAnalyzer.java
10
10
100.00%
[]

run starrocks_admit_test

[FE PR Coverage Check]
:heart_eyes: pass : 29 / 31 (93.55%)
file detail

path
covered_line
new_line
coverage
not_covered_line_detail

:large_blue_circle:
com/starrocks/analysis/StringLiteral.java
1
2
50.00%
[70]

:large_blue_circle:
com/starrocks/catalog/MaterializedView.java
4
5
80.00%
[490]

:large_blue_circle:
com/starrocks/scheduler/PartitionBasedMaterializedViewRefreshProcessor.java
14
14
100.00%
[]

:large_blue_circle:
com/starrocks/sql/analyzer/MaterializedViewAnalyzer.java
10
10
100.00%
[]

run starrocks_admit_test


Update the code

Hello,
The RippleDrawable of the Android 9.0 Pie, is very better than the Lollipop one.
Please update the codes to backport Android 9.0 ripples to the older version (back to API 14 or 17).

@hadifaridhadi  latest commit date is 2016 year! if you want something new/better, you need to find something else than that library!


边缘异常

ReplicationPad2d 改为ReplicationPad2d可以避免部分case的边缘异常

Try this
https://github.com/cszn/SCUNet/blob/3d5c19e93ab5723b28a839fe57ee274dd6ae6daa/main_test_scunet_real_application.py#L99

Could I know what you mean by "change ReplicationPad2d to ReplicationPad2d"? It seems that the former and the latter are both "ReplicationPad2d".
请问您所说的"ReplicationPad2d 改为ReplicationPad2d"是什么意思?看起来前者和后者都是"ReplicationPad2d".


Accept input as well as data in eth_call

Context on #6041
We currently only accept data as the name of the payload field when during an eth_call (and presumably other transaction-related RPCs) https://github.com/hyperledger/besu/blob/a90ea056f19915a4eca787fc066c080e1789c14c/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/parameters/JsonCallParameter.java#L52-L53
The spec requires input as the name instead:
https://github.com/ethereum/execution-apis/blob/057892b256c181232ca22499d1801b9637192698/src/schemas/transaction.yaml#L33
We will need to continue accepting data to avoid forcing a lot of tooling to update.
We should add support for input xor data

Context in discord here.


Issue with list in sample config?

Currently there are some lines in the example config where I'm a little confused.
https://github.com/xremap/nix-flake/blob/87eb623781f2b95eef1e48bdabc8d714bcf26323/README.md?plain=1#L55-L58
When using the above example and running nix flake check, I get syntax error, unexpected '=' (at name = "Global"). Which seems to make sense, because I don't think a list can contain a mapping of name=value. But I couldn't find an absolute answer here.
I tried to replace the list with an attribute set like so:
modmap = {
  name = "Global";
  remap = { "CapsLock" = "Esc"; };  # globally remap CapsLock to Esc
};

Nix accepts that and builds successfully, but the xremap service fails to start: Failed to load config '/nix/store/...-xremap-config.yml': modmap: invalid type: map, expected a sequence at line 1 column 11, so here a list would be expected...
Something here must be wrong.
I ended up using yamlConfig instead of config as a workaround, but obviously I'd prefer writing it in Nix.

The example was indeed wrong. config is an attrset with <= two keys expected -- keymap and modmap. They, in turn, should be lists of attrsets.

I can confirm that the corrected example works. Thanks!

Awesome, and thank you so much for the bug reports

Separating the  "nix accepts the config" <=> "xremap accepts the config" part to #45


Fix races in closing a TcpReaderWriter

Each TcpReaderWriter is only accessed by a single thread, but it interleaves
callbacks in ways that aren't safe.  When a TcpInputSubscription or
TcpOutputSubscriber tries to close a TcpReaderWriter, it would only close the
socket, and then let the folly::AsyncSocket callbacks handle the rest in
follow-up events.  Depending on what events are already in the EventBase, we can
run into an inconsistent state.
Fix this by having TcpReaderWriter::close{,Err}() which go through the
{subscriber,subscription,socket}.  They are idempotent, so they are safe to call
in follow-up read{EOF,Err}() events.
Added new test that makes up to 1000 connections in parallel.  Running it
locally without this diff hits CHECK() errors in ~TcpReaderWriter.

Hmm, LSAN says this leaks memory.  I'll take a look...


add query string speed param ?

useful for sharing
example: https://www.youtube.com/watch?v=eZECeD8LcoQ&speed=0.75

added in 1.5.0


Testing of Neo4j MPP and other enterprise edition features.

Hello, colleagues!
As for now current benchmark project use community Neo4j repo to build final jar of benchmark and there is no way to execute the benchmark applying to external Neo4j instance, it seems that one cannot test this benchmark on Neo4j Enterprise Edition.
Are there any opportunity to apply the benchmark to Neo4j Enterprise Edition to evaluate, for example, its MPP feature (Massively Parallel Processing) or some other Neo4j enterprise features ?

Hello @dmkoltsov
the Neo4j implementation was intended as a prototype and it's no longer actively maintained by the Graphalytics task force.

there is no way to execute the benchmark applying to external Neo4j instance, it seems that one cannot test this benchmark on Neo4j Enterprise Edition.
That's correct - in its current form, it's unfortunately not possible to run the implementation in this repository using a client-server setup.

That said, we accept pull requests in case you're interested in extending this benchmark.
Gabor


I want to add more data when touch the chart ,linchar ,barchart

** Don't make a duplicate issue.
You can search in issues to make sure there isn't any already opened issue with your concern.
fl_chart : 0.55
flutter :
[✓] Flutter (Channel beta, 3.3.0-0.5.pre, on macOS 13.2 22D49 darwin-arm, locale zh-Hans-CN)
[!] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
✗ Android license status unknown.
Run flutter doctor --android-licenses to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.
[!] Xcode - develop for iOS and macOS (Xcode 14.2)
✗ CocoaPods not installed.
CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on the Dart side.
Without CocoaPods, plugins will not work on iOS or macOS.
For more info, see https://flutter.dev/platform-plugins
To install see https://guides.cocoapods.org/using/getting-started.html#installation for instructions.
[✓] Chrome - develop for the web
[!] Android Studio (not installed)
[✓] VS Code (version 1.75.1)
[✓] Connected device (3 available)
[✓] HTTP Host Availability
Is your feature request relasted to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
I want to display some data other than coordinate value when the chart is displayed by touch, such as the name of the curve. How to achieve this?  includd,linechart,barchart.
thank you
Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.

Hi
Please check BarChartSample1 (you can do the same in line chart)
Some Samples

Sample 1 (Source Code)


FullName doesn’t work with multi-word surnames

My surname is ‘Le Poidevin’ but this gets changed to just ‘Poidevin’.
$name = new FullName('Richard Le Poidevin');

dd($name->toArray());

//
array:3 [
  "fullName" => "Richard Le Poidevin"
  "firstName" => "Richard"
  "lastName" => "Poidevin" // should be: Le Poidevin
]

It’s a tricky one, where should you break, always the first space? Some people may have multiple first names but I think that’s more likely to be hyphenated whilst surnames with ‘Le’ etc. are pretty common. It’s still better than what usually happens to my name - ‘Richard L’ 😅
Maybe the default behaviour should be firstName is the first word and everything else forms lastName?

Full names in some countries contain multiple names, e.g. Polish "Anna Ewa Kowalska", so we can't break by the first space. I thought of adding the second optional parameter to allow passing the last name as a composite, but not sure how useful that would be.
new FullName('Richard', 'Le Poidevin');

Likely fixed in #17 🙂


Thoughts on the edgar based approach

Using https://www.sec.gov/edgar/searchedgar/companysearch.html
Can search for all companies by an SIC code., which has the following:
https://www.sec.gov/cgi-bin/browse-edgar?company=&match=&filenum=&State=&Country=&SIC=5200&myowner=exclude&action=getcompany
Could write the R web scraping to take the SIC code, and get back a table of CIK, Company names, and states in a tabular form.
Another approach:
Find all annual filings in the last XXX days with https://www.sec.gov/edgar/searchedgar/currentevents.htm
Show on the website, but figure out the URL pattern is: https://www.sec.gov/cgi-bin/current?q1=3&q2=0&q3=
Gives

Company
Cik
url to form

The URL to the "Form" can be converted to the full text by a simple rule
https://www.sec.gov/Archives/edgar/data/1144215/0001144215-18-000110-index.html
becomes
https://www.sec.gov/Archives/edgar/data/1144215/000114421518000110/0001144215-18-000110.txt
Or something like that....

See https://github.com/ubcecon/computing_and_datascience/issues/70 with papers/scripts/etc. for this specific target. @chiyahn


The test test_simulator_online_size is unnecessarily big

The test test_simulator_online_size checks that a timeout error is triggered for big programs when q_program.execute is run. Currently, the test takes 1 minute to run, because that's the default of _wait_for_job (in qiskit/backends/ibmq/ibmqjob.py). This creates a request every 5 seconds, checking if for the status. This creates a lot of load in the backend and some time waste during testing.
I suggest the fix in #790 .

After talking to @atilag we agreed on removing this test. It is not only unnecessary big, it is also stressing the simulator backend unnecessarily, possibly consuming huge amounts of bandwidth and it is not actually testing Qiskit but the backend. @1ucian0 do you mind to get rid of it? I'm changing the title of this issue to reflect what we are doing.

I totally agree. Let's remove this test.


Generate configure files out of tree

Partial fix of #1805, where files that needs to be generated by m4 is now built in CURRENT_BINARY_DIR, along with other files created during configure time. This allows building out-of-tree where netcdf-c is read-only.
This fix is only for the CMake build path, and does not modify the autotools build.

Well done!


What is the unit used for --area and --columns options?

I am trying to guess what kind of units are used for the --area and --columns options. It has been going OK so far with the --columns option by trial and error, but just guessing wildly for the --area option mostly gets me into this trouble:
Exception in thread "main" java.util.NoSuchElementException
	at java.util.ArrayList$Itr.next(ArrayList.java:854)
	at java.util.Collections.min(Collections.java:635)
	at technology.tabula.Page.getArea(Page.java:67)
	at technology.tabula.CommandLineApp.extractTables(CommandLineApp.java:145)
	at technology.tabula.CommandLineApp.main(CommandLineApp.java:60)

Hi @ThomasA,
I guess you resolved the issue by now, but in the benefit of people finding this issue: the units are PDF Units


[YUNIKORN-24] UT compatibility issue with GO 1.13+

I am not to happy about adding testing.Init()
The other option that was discussed and used in a number of places is to move the flag.Parse() call into main()
Why did you choose to keep the parse in the init of the config and not move it into main?

I am not to happy about adding testing.Init()
The other option that was discussed and used in a number of places is to move the flag.Parse() call into main()
Why did you choose to keep the parse in the init of the config and not move it into main?

hi @wilfred-s , thanks for the review. Actually, that was an easier solution (a workaround).
Moving the flag.Parse() call into main() is not enough. I just uploaded a complete solution, that removes all init() calls in the conf, dispatcher, and log package. Replacing them with sync.once through a getter. Lots of files got affected, because the change of log.Logger to log.Logger(). But I think this is necessary if we want to have something better than the previous workaround.
What do you think?


To where has the Container class of keras.engine.topology been moved?

To where has the Container class from keras.engine.topology been moved?

This issue is referenced here: #10023.
Container is now called Network.


[documentation] docker run does not include info on "--volume-driver"

Problem
The online documentation for Engine does not seem to include any reference to --volume-driver  for either run or create. Since Volume Drivers are no longer "experim,ental" in 1.8 I would expect to see documentation for this flag.
See https://docs.docker.com/reference/commandline/create/
Solution
Add documentation.
Environment
N/A

Hi!
Please read this important information about creating issues.
If you are reporting a new issue, make sure that we do not have any duplicates already open. You can ensure this by searching the issue list for this repository. If there is a duplicate, please close your issue and add a comment to the existing issue instead.
If you suspect your issue is a bug, please edit your issue description to include the BUG REPORT INFORMATION shown below. If you fail to provide this information within 7 days, we cannot debug your issue and will close it. We will, however, reopen it if you later provide the information.
This is an automated, informational response.
Thank you.
For more information about reporting issues, see https://github.com/docker/docker/blob/master/CONTRIBUTING.md#reporting-other-issues

BUG REPORT INFORMATION
Use the commands below to provide key information from your environment:
docker version:
docker info:
uname -a:
Provide additional environment details (AWS, VirtualBox, physical, etc.):
List the steps to reproduce the issue:
1.
2.
3.
Describe the results you received:
Describe the results you expected:
Provide additional info you think is important:
----------END REPORT ---------
#ENEEDMOREINFO

It's there now. Closing issue.


fix: pagination over time + tooltip

Overview
Allow the user to paginate across time. Pagination will allow users to shift the time displayed on the dashboard widgets by that given range. For example, if the user is viewing data from the last week, they can paginate forward to see next weeks data or backwards to see last weeks data being displayed on their dashboard widgets.
Verifying Changes
https://github.com/awslabs/iot-app-kit/assets/145582655/cf4211c0-7c15-44be-831c-33680d24c8e0
Legal
This project is available under the Apache 2.0 License.

Since, we changed the x-axis to go into the future, the disable feature of the forward pagination has been removed in the latest commit


2.13 Release notes

Description
[Describe what this change achieves]

Adds 2.13 release notes for https://github.com/opensearch-project/security/issues/4032

Check List

[ ] ~New functionality includes testing~
[ ] ~New functionality has been documented~
[x] Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

I have asked @gaiksaya if https://github.com/opensearch-project/security/pull/4100 can be included in 2.13. If we get a green light we can add a line in this PR.

I was thinking to add in 1 release note PR. We got green light to get it merged. Here is the backport PR: https://github.com/opensearch-project/security/pull/4147
@scrawfor99 your call

Please go ahead and merge it asap. Also backport everything to 2.13 branch.


Gradle Dependency issue

Hi,
I have added the dependency as
dependencies {
androidTestCompile 'com.github.andrzejchm.RESTMock:android:0.2.1'
}
also included the maven url in the project build.gradle.
But I am not able to access the api.
When I keep the below as dependency
dependencies {
compile 'com.github.andrzejchm.RESTMock:android:0.2.1'
}
then I am able to access the API.
Could you please let me know which one to follow
Thanks,
Chaitanya

dependes on where you want to access it, unit tests? android tests?
If you plan to use it with android tests (run on a device/emulator)
you have to add
androidTestCompile 'com.github.andrzejchm.RESTMock:android:0.2.1'

and have your tests classes located in $projectRoot/app/src/androidTest/ folder.
On the other hand, if you plan to use it with jvm unit tests, then
testCompile 'com.github.andrzejchm.RESTMock:core:0.2.1'

and have your tests located in $projectRoot/app/src/test/ folder.

I assume the problem has been solved, closing


High CPU load even if hidden

Hi. If I have a view like this:
	@ViewBuilder var listView: some View {
		if isLoading {
			skeletonView.shimmer()
		} else {
			listView
		}
	}

Then even if isLoading is false is still consumes CPU. The more cells the more consumption. I have about 36% on my iPhone 11 even if there's no shimmering view on screen. If remove shimmering then CPU load is 0%.

The library uses branching for active and not active states. So first of all, you need to explicitly pass in the active argument:
.shimmering(active: shouldShim)

Also, you are using branching too! So the code will not call the false
state if you just put it in the way you write it!
So you need to extract the shimmer out like:
func listView(shouldShim: Bool) -> some View {

        var listView: some View {
            if shouldShim {
                return skeletonView
            } else {
                return listView // <- What is this by the way ? do you mean self.listView ? 🤔
            }
        }

        return listView
            .shimmering(active: shouldShim)
    }

This is just a work around and I hope the library supports the branching and auto animation stop for reduce the CPU usage


Docs website is down

Describe the bug
Console says there is a React error
Your minimal, reproducible example
none
Steps to reproduce
go to https://tanstack.com/query/latest
Expected behavior
Website works
How often does this bug happen?
None
Screenshots or Videos

Platform
Firefox and Chrome
Tanstack Query adapter
None
TanStack Query version
not known
TypeScript version
No response
Additional context
No response

Still down

You can use https://web.archive.org/ to view archived pages until the site is up.

https://github.com/TanStack/query/issues/7307#issuecomment-2067599677


Fix go-sec issues

The CI for go-sec fails due to some unhandled errors in some packages. Ref: https://github.com/kubearmor/kubearmor-client/actions/runs/4106954987/jobs/7085843416.

I'd like to work on this

Nice! Assigning it to you :D

Thank you!


Add raft trace logging to config

Raft already has an option to enable trace level logging. This needs to be exposed to the influxdb config file.

Fixed by https://github.com/influxdb/influxdb/commit/c714f147e82f9560b99710f44a83d94099dbcc79


from wtforms import validators imports the incorrect one

Instead to import the wtforms/validators.py it imports flask_wtf/recaptcha/validators.py
Any clue why is that?
If I try to import it from python it works as expected
I've read this: https://github.com/lepture/flask-wtf/issues/46 and seems to be related but there isn't any update to solve it
Any clue?

I don't understand your question.

I'm trying to import fields and validators from wtforms doing:
from wtforms import fields, validators

But when I try to use:
validators.Optional()

it raises an error saying that validators doesn't have Optional
Then I do:
print(dir(validators))

And I found __file__ as a member of the module so I do:
print(validators.__file__)

And for my surprise it points to validators.py on recaptcha instead of the asked one at wtforms
I start googleing and found the import issue back then very similar so I wonder if this is a regression or something because then someone recommends to update the library
Did I make more sense now? (Sorry for my english, it is not my main language)

@Garito That's weird. Can you show me the whole code and error stack?

The code
# -*- coding: utf-8 -*-

from sys import version_info
from collections import OrderedDict

from wtforms import Form, validators
#from flask.ext.wtf import Form

#from wtforms.fields import *
#from wtforms.validators import *

from flask.ext.babel import gettext

print(dir(validators))
print(validators.__file__)

The output:
['RECAPTCHA_VERIFY_SERVER', 'Recaptcha', 'ValidationError', '__all__', '__builtins__', '__doc__', '__file__', '__name__', '__package__', 'current_app', 'http', 'json', 'request', 'to_bytes', 'to_unicode', 'url_encode']
/Users/garito/TimeFounder/App/0.3/env/lib/python2.7/site-packages/flask_wtf/recaptcha/validators.pyc
 * Running on http://<IP_ADDRESS>:5000/ (Press CTRL+C to quit)
 * Restarting with stat
['RECAPTCHA_VERIFY_SERVER', 'Recaptcha', 'ValidationError', '__all__', '__builtins__', '__doc__', '__file__', '__name__', '__package__', 'current_app', 'http', 'json', 'request', 'to_bytes', 'to_unicode', 'url_encode']
/Users/garito/TimeFounder/App/0.3/env/lib/python2.7/site-packages/flask_wtf/recaptcha/validators.pyc

I understand that you are talking about this code, tell me if you need more
The point is I'm trying to create a dict2wtforms code base on this one: https://github.com/MongoEngine/flask-mongoengine/blob/master/flask_mongoengine/wtf/orm.py changing the mongoengine model + field_args for a dict with all the configuration needed
What do you think? Thanks!

How could it be?
BTW, change the import from flask.ext to flask_:
from flask_wtf import Form
from flask_babel import gettext

No, it doesn't work at all
If I try to import from flask_wtf it do the same as before
But thanks for the try

You won't belive me: today I go back to
from wtforms import validators

and it works as expected. Don't ask me how, I don't really know


why cocat f_encoder_list[-j-2]w with the current upsampled feature ?

      In RandLANet.py line 69, it is written:

f_decoder_i = self.decoder_blocks[j](torch.cat([f_encoder_list[-j - 2], f_interp_i], dim=1))
I'm wondering why not concatenate the f_encoder_list[-j - 1] and f_interp_i?

Take j=0 for example, the the f_interp_i is recovered from f_encoder_list[-1] by nearest_interpolation, which means f_interp_i's is related to f_encoder_list[-2].

      In RandLANet.py line 69, it is written:

f_decoder_i = self.decoder_blocks[j](torch.cat([f_encoder_list[-j - 2], f_interp_i], dim=1))
I'm wondering why not concatenate the f_encoder_list[-j - 1] and f_interp_i?

Take j=0 for example, the the f_interp_i is recovered from f_encoder_list[-1] by nearest_interpolation, which means f_interp_i's is related to f_encoder_list[-2].


Module resolution since 1.0.4 is broken when symlinking secondary projects

Bug Report or Feature Request (mark with an x)
- [x] bug report -> please search issues before submitting
- [ ] feature request

Versions.
Output from: ng --version.
MacOS Sierra
@angular/cli: 1.1.0-rc.2
node: 7.8.0
os: darwin x64
@angular/common: 4.1.3
@angular/compiler: 4.1.3
@angular/core: 4.1.3
@angular/flex-layout: 2.0.0-rc.1
@angular/forms: 4.1.3
@angular/http: 4.1.3
@angular/material: 2.0.0-beta.6
@angular/platform-browser: 4.1.3
@angular/platform-browser-dynamic: 4.1.3
@angular/router: 4.1.3
@angular/cli: 1.1.0-rc.2
@angular/compiler-cli: 4.1.3

Repro steps.

 Calling function 'InjectionToken', function calls are not supported. Consider replacing the function or lambda with a reference to an exported function, resolving symbol LOAN_ORIGINATION_BASE_URL in<EMAIL_ADDRESS>resolving symbol LOAN_ORIGINATION_BASE_URL in<EMAIL_ADDRESS>resolving symbol LOAN_ORIGINATION_BASE_URL in<EMAIL_ADDRESS>resolving symbol LOAN_ORIGINATION_BASE_URL in<EMAIL_ADDRESS>resolving symbol LOAN_ORIGINATION_BASE_URL in<EMAIL_ADDRESS>resolving symbol AppModule in /Users/blake.lafleur/borrowworks/lending-portal-sage/src/app/app.module.ts, resolving symbol AppModule in /Users/blake.lafleur/borrowworks/lending-portal-sage/src/app/app.module.ts, resolving symbol AppModule in /Users/blake.lafleur/borrowworks/lending-portal-sage/src/app/app.module.ts
webpack: Failed to compile.

Browser
compiler.es5.js:1540 Uncaught Error: Unexpected value '[object Object]' imported by the module 'AppModule'. Please add a @NgModule annotation.
    at syntaxError (http://localhost:5555/vendor.bundle.js:9162:34)
    at http://localhost:5555/vendor.bundle.js:22116:44
    at Array.forEach (native)
    at CompileMetadataResolver.getNgModuleMetadata (http://localhost:5555/vendor.bundle.js:22099:49)
    at JitCompiler._loadModules (http://localhost:5555/vendor.bundle.js:33252:66)
    at JitCompiler._compileModuleAndComponents (http://localhost:5555/vendor.bundle.js:33211:52)
    at JitCompiler.compileModuleAsync (http://localhost:5555/vendor.bundle.js:33173:23)
    at PlatformRef_._bootstrapModuleWithZone (http://localhost:5555/vendor.bundle.js:39071:25)
    at PlatformRef_.bootstrapModule (http://localhost:5555/vendor.bundle.js:39057:21)
    at Object../src/main.ts (http://localhost:5555/main.bundle.js:324951:124)

The warning above are my 3 projects that are symlinked into my CLI app.
If i remove the node_modules folder from
<EMAIL_ADDRESS>Everything compiles fine. This change was introduced via https://github.com/angular/angular-cli/commit/1659b74
on 1.0.4

Please see the documentation here for information pertaining to the use of linked libraries during development.

I have and it still does not fix my issue.

I have same problem today with 1.0.6

@pumano At the bottom of my post, I have a temporary fix. Hopefully the AngularCLI team will fix this.

@Blackburn29 the documentation item that @clydin linked should allow working with linked libraries.
All the errors you have seem to be related to missing sourcemaps:
WARNING in ../theming-ng-lib/~/angular-sortablejs/dist/index.js
(Emitted value instead of an instance of Error) Cannot find source file '../index.ts': Error: Can't resolve '../index.ts' in '/Users/blake.lafleur/borrowworks/theming-ng-lib/node_modules/angular-sortablejs/dist'

WARNING in ../theming-ng-lib/~/angular-sortablejs/dist/index.js
(Emitted value instead of an instance of Error) Cannot find source file '../index.ts': Error: Can't resolve '../index.ts' in '/Users/blake.lafleur/borrowworks/theming-ng-lib/node_modules/angular-sortablejs/dist'

We ignore sourcemaps listed in node_modules but not anywhere else, and if you have a symlinked project then its real path is not in node_modules. That might be the cause.
If you can setup a simple repro I can take a look, but without one the best I can say is that your library might not be packaged correctly.

I just encountered this issue today with<EMAIL_ADDRESS>I didn't get any error about missing sourcemaps though. I only encountered the following in-browser JIT compiler error.
Uncaught Error: Unexpected value 'MyModule' imported by the module 'AppModule'. Please add a @NgModule annotation.
    at syntaxError (http://localhost:5000/vendor.bundle.js:5753:34)
    at http://localhost:5000/vendor.bundle.js:18707:44
    at Array.forEach (native)
    at CompileMetadataResolver.webpackJsonp../node_modules/<EMAIL_ADDRESS>(http://localhost:5000/vendor.bundle.js:18690:49)
    at JitCompiler.webpackJsonp../node_modules/<EMAIL_ADDRESS>(http://localhost:5000/vendor.bundle.js:29843:66)
    at JitCompiler.webpackJsonp../node_modules/<EMAIL_ADDRESS>(http://localhost:5000/vendor.bundle.js:29802:52)
    at JitCompiler.webpackJsonp../node_modules/<EMAIL_ADDRESS>(http://localhost:5000/vendor.bundle.js:29764:23)
    at PlatformRef_.webpackJsonp../node_modules/<EMAIL_ADDRESS>(http://localhost:5000/vendor.bundle.js:35662:25)
    at PlatformRef_.webpackJsonp../node_modules/<EMAIL_ADDRESS>(http://localhost:5000/vendor.bundle.js:35648:21)
    at Object../src/main.ts (http://localhost:5000/main.bundle.js:20987:124)

The module causing this error is npm linked. This only fails on JIT compilation, not AoT. When the same module is npm installed, there is no error. Changing only the version of @angular/cli from 1.1.0 to 1.0.0 resolves the problem.

@menzer it is caused because you use yarn. i don't know why, but yarn postinstall can cause that problems. I use npm, because yarn harm builds.

@pumano it's not caused by yarn.
I have the exact same issue, I don't use yarn.

@pumano I don't use yarn either.

@menzer this is the root of my problem. Not the source maps as @filipesilva mentioned. FWIW ive tried both NPM and Yarn. It is irrelevant to this issue.

@menzer Please ensure that your application is configured appropriately for linked library usage.  See this comment from a similar issue for details.  Also, please ensure that your linked library follows the other guidelines provided in the documentation as well.
@Blackburn29  The next beta (1.2.0-beta.1) will have a new command line option --preserve-symlinks which should help with your use case without resorting to a more complicated path mapping setup.

@Blackburn29 To ensure your use case is captured and tested, are you using a monorepo setup (lerna or otherwise)?

@clydin Thank you for linking me to the comment on the similar issue. I've resolved my problem, and I think I've identified the source of the confusion. I read the documentation you linked to in the Wiki, but the description of the necessary step is less clear than your description in that issue. I'm actually still unclear whether the documentation is confusing, or the documentation and the comment describe two different, necessary, steps.
From the documentation:

You should list all the peer dependencies that your library uses in ./tsconfig.json, pointing them at the local copy in the apps node_modules folder. This ensures that you all will always load the local copies of the modules your library asks for.

From the comment:

Your component library setup looks fine.
The app needs some slight adjustment to ensure that the application's Angular libraries are used and not the library's development dependencies. This change will essentially mimic the standard behavior of the Angular peer dependencies in the context of a linked library.
In src/tsconfig.app.json, add the paths setting as follows:

Before ever encountering the issue, my library was set up as instructed in the documentation. My .tsconfig in the library already had the path mapping. My application, which I use to test my library via npm link, did not. If the intention is to instruct a user to add path mapping to the application consuming the library via linking, that is not clear. Updating the documentation to make this more clear will probably help reduce the number of times this issue is filed. 😃
As an aside, TypeScript is misspelled as TypesScript in the heading of the section you linked me to in the wiki. If someone updates the documentation, they might want to make that fix while they're in there.
Thanks for the help resolving my issue, and I hope this feedback helps identify the root cause of people encountering this issue after reading your docs.

I have managed to reproduce this in the attached.  The error is:
Uncaught Error: Unexpected value 'DataTableModule' imported by the module 'AppModule'. Please add a @NgModule annotation

I have followed the linked guide but it hasn't worked for me - if you can spot what I've done wrong (if anything) I'd be grateful for any pointers.
Attached

A demo library (adapted from ng2-datatable-bootstrap4) ng2-datatable-bootstrap4.zip

An angular-cli generated Application npm-link-issue-test.zip

My console log localhost-1505557898672.log.zip

Steps to reproduce
mkdir npm_issue && cd npm_issue
tar xzf ng2-datatable-bootstrap4.tar.gz
tar xzf npm-link-issue-test.tar.gz

# build library
cd ng2-datatable-bootstrap4
npm install

# Run aot build
npm run build-only

# add link
npm link

# build application
cd ../npm-link-issue-test
npm install
npm link ng2-datatable-bootstrap4

# run application
ng serve

# Browser (localhost:4200) console log shows error (attached)

Versions
$ ng version
@angular/cli: 1.4.2
node: 6.9.5
os: linux x64

$ npm --version
3.10.10

I've run into the same issue.  it use to work but doesn't any more.  I have fallen back to npm pack and using a direct linked tar ball, but I would rather use npm link.  In my case we have separate package.json's for development and deployment following the ng material 2 project structure.

So this is still broken... Time to replace angular with vue I think.

@babeal Thanks for the suggestion.  In the example I posted earlier, the application loads without issue via ng serve if I use a direct link directory or tarball using a local path in package.json.  However I couldn't get that to work in my actual project.
I found the source of the issue, which was that another dependency I was using (angular-datatables) was also including node_modules/@angular/core.  I removed this dependency, and now the project loads ok using a local link to my library.
This is a bit of a diversion from the original issue, but it seems clear that if any dependency bundles @angular/core then this issue might occur.  You can obviously search for these with:
find node_modules -name 'core' -type d

I don't think that libraries should be bundling core angular libraries, because that is what the peerDependencies declaration is for, but perhaps the source of this issue is that angular-cli is incorrectly picking up @angular/core from node_modules.  (referenced here by @Blackburn29 in the original post)

I'm not bundling it and I'm getting the error anyway. @angular/core is as peerDependency in my package.
Using now Angular CLI 1.5.0. Any update on that?

@dgroh do you hit this issue with the latest CLI?

Closing the issue due to inactivity. If the problem still exists in the latest version of the CLI, please open a new issue following the template and providing a minimal demo where we can reproduce it. Thanks! :-)


nixos/binfmt: move systemd-binfmt.service to binfmt module

Also, remove the dangling systemd.services.systemd-binfmt.wants = [ "proc-sys-fs-binfmt_misc.mount" ]; in systemd.nix.
If boot.binfmt.registrations != {}, systemd will install
proc-sys-fs-binfmt_misc.automount, which will auto-mount
/proc/sys/fs/binfmt_misc as soon as systemd-binfmt tries to access it.
Fixes https://github.com/NixOS/nixpkgs/issues/87687
Fixes https://github.com/NixOS/nixops/issues/574
Motivation for this change
#87687
Things done

[ ] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[ ] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Ensured that relevant documentation is up to date
[ ] Fits CONTRIBUTING.md.

I'd appreciate especially some input from people making use of the binfmt functionality.
cc @lovesegfault

I don't use binfmt, but I know @cleverca22 does

I added a small VM test to verify boot.binfmt.emulatedSystems still works after this change, and rebased on master.
I picked the configuration example from NixOS_on_ARM#Compiling_through_QEMU.


Fix compatibility with older versions of guava

Follows on from #88

@kashike Feel free to merge this if you want it in.


Installation issue

Hi there,
I am using Mac OSX El Capitan. Python version 2.7
I downloaded pip using the get-pip.py method, then later uninstalled and reinstalled using easy_install pip.
Now, when trying 'sudo pip install soundscrape(and other variations like using the-Hflag, the--upgrade` flag, etc.) I receive this error:
No files/directories in /private/tmp/pip-build-5Fb2Po/soundscrape/pip-egg-info (from PKG-INFO)

and I KEEP getting it no matter what I try. I've uninstalled pip, uninstalled Python, and I'm stuck! Help :)

Likely same issue, opened requirements.txt installed manually all requirements via pip and after this,  pip install soundscrape worked. As well as downloads are working.

i recommend uninstalling pip and reinstalling it using brew install pip. Then pip install soundscrape.

It worked after I installed all the requirements , I thought the requirements should be installed by default. So my comment was more helpful for people who did not have the  requirements  as they are in the requirements.txt :)

This seems unrelated to SoundScrape.