feat(Popup): add component

Port of SUI Popup module
Fixes #193

[x] sizing
[x] content / header
[x] positioning
[x] events
[x] hover
[x] click
[ ] focus
[x] hoverable (will be fixed by #590)
[x] widths

[ ] use SUI enums

[x] sizes

[ ] use SUI enums

[x] inverted
[ ] fluid (can be hacked using the style prop)
[x] basic
[x] offset
[ ] transition (animation will probably be for later)
[ ] hideOnScroll (quick solution to scrollable sub-content like a sidebar)
[x] exclusive
[x] custom class names
[x] custom styles

Current coverage is 98.82% (diff: 7.69%)

Merging #570 into master will decrease coverage by 0.67%

@@             master       #570   diff @@
==========================================
  Files           112        113     +1
  Lines          1767       1780    +13
  Methods           0          0
  Messages          0          0
  Branches          0          0
==========================================
+ Hits           1758       1759     +1
- Misses            9         21    +12
  Partials          0          0

Powered by Codecov. Last update dceef53...88de8c6

Hey @levithomason,
I know that's not your initial design but I feel like adding an anchor element and an open state would simplify the implementation and open the way to additional feature (like a click trigger instead of a hover). The counter argument would be that it would complicate usage, as the user would have to maintain a state for the open status. The anchor element could be transmitted using event.currentTarget by the event handler.
Something among those lines:
export default class PopupOnClick extends Component {

  buttonClick = (event) =>
    this.setState({
      open: true,
      target: event.currentTarget,
    })

  render() {
    return

      <button onClick={this.buttonClick} >Click me</button>
      <Popup
        open={this.state.open}
        content="foo bar"
        target={this.state.target}
      />

  }
}

I don't want to impose my style, I came here to help and I'm totally open to your opinion.

I think we can transform render part to this.
const { active } = this.state

return (

     <Portal isOpened={active}>{popup}</Portal>
     {trigger}

 )

Then we can make Popup autoControlled  for passing active as prop.
Also, I like SUI ideas there, can we implement them there?

I've made a few update to handling part of the positioning without introducing refs.
While having an open prop on the popover isn't exactly the SUI approach, I believe it's actually closer to the react way. @layershifter this also open the door to custom event triggering the popover as you suggested .

Hey so I wound up writing our own Portal component (based on react-portal which we're currently using). I explain in more detail why in the comment here https://github.com/TechnologyAdvice/stardust/pull/571, but I think the changes could be useful here:

It takes a trigger element which let's you avoid the wrapping div.
You can optionally configure to show up onClick or onMouseOver.

If you have any feedback on some of the open items on that issue I'd appreciate it. Assuming we like that approach, the sooner we can work out the kinks the sooner we can apply it here.

@jcarbo this could indeed resolve my initial problem. I would need an additional onMouseOut on your implementation but it looks like it would be a trivial addition (unless I missed it). Lastly I think your Portal version would allow me to retrieve the event and therefore position the popover accurately.

@debrice - thanks for the suggestions! Wound up implementing all three options (closing onMouseLeave/onBlur and opening onFocus), see https://github.com/TechnologyAdvice/stardust/pull/571/commits/92390a02c936e91b475ce751d082ff31e9b861bf and https://github.com/TechnologyAdvice/stardust/pull/571/commits/e92914a215bfba883084a587c9cd31936545222e.

This is great, thank you @jcarbo , I'll pull your branch in and start implementing today.

Left an interim review for now.  LMK when it's stable enough for a full review and I'll pull it down, try it out, and offer more input.  Cheers!

@levithomason I'm at a place where I could use some feedback from a UI experience. I'm not familiar with animation for example and how you expect them to be handled.
Also I'm using findDOMNode which I believe isn't a sustainable solution but I should be able to drop it once I get access to the trigger's event from Portal.
Positioning will need to have the "center" attribute too, but I can't think of a way to read the size of the popup without using ref with a function (...or react-dom):
//...
  popupMounted = (ref) => {
    this.setState({'popupBoundingRect': ref.getBoundingClientRect()})
  }
  render(){
    return <Popover ref={this.popupMounted} />
  }
}

Thank you for your help and patience!

I'm at a place where I could use some feedback from a UI experience. I'm not familiar with animation for example and how you expect them to be handled.

We're forgoing animations until we get all components and APIs done.  We are just adding/removing the visibility classes as needed for now.  Later, we'll add a utility that reuses SUI CSS transitions by adding these classes (and styles) in sequence to trigger animations. See #200 for more notes on that.

Also I'm using findDOMNode which I believe isn't a sustainable solution but I should be able to drop it once I get access to the trigger's event from Portal.

👍 Looks like the Portal is now passing the necessary events, see https://github.com/TechnologyAdvice/stardust/pull/571#issuecomment-250891167

Positioning will need to have the "center" attribute too, but I can't think of a way to read the size of the popup without using ref with a function (...or react-dom):

Measuring is one of those things (focus being the other) that you just have to use a ref for.  I think you're OK there.  Though perhaps we consider borrowing a pattern from something like react-measure.  Where we have an abstract component that can measure other components.  I don't want to use react-measure directly since it has a dependency element-resize-detector that is >1600 LOC.

@debrice - could you rebase this PR against the most recent master? The Portal code has been merged in so it'll make the changes easier to read.

@jcarbo I never rebased any code in the past, so that was quite an adventure (100 commits now).

@levithomason @jcarbo I'm a bit unfamiliar with rebasing/cleaning up a PR . I believe I have 2 options now:

I can have a single commit on my fork master branch but I would have to create a new PR.
I could squash the commits on my current branch and force push the single squash commit.

Any advice ?

I'd squash down the current branch to one commit. So assuming 2c144d1 is the commit you're rebased off of you would do:

git reset 2c144d1 - would put you back at 2c144d1 with all of the changes from this branch unstaged
git add . - stage your changes
git commit -m 'feat(Popup): add component'
git push --force

All commits on a feature branch wind up getting squashed down to one anyway when they're merged into master but this would just clean things up a bit for now.

@jcarbo thanks for the help, force push is done 🎊
Regarding Portal, I need to build hoverable props, which would allow a user to hover from the trigger to the popup, without the popup going away by the mouseleave:

Should that be a feature of the Portal or the Popup? For it to be on the Popup, I believe I would still need some changes on the Portal to grant more control on the event.

Regarding the hoverable prop, I'd think that would set the Portal closeOnMouseLeave to false but keep openOnMouseEnter set to true.
This would leave the Popup open with no way to close it, since blur (mouseLeave) doesn't. Perhaps we'd use some kind of timer that would close the Popup but reset on hover. This way could move the mouse from the trigger (timer starts), mouse enters the Popup (timer cancelled), mouse leaves Popup (timer starts again), finally after X seconds the timer expires and the Popup closes.

I think we can handle it by modifying one prop and adding another:

Change closeOnTriggerMouseLeave to just closeOnMouseLeave. Calls onClose when the mouse leaves the trigger OR the portal
Add mouseLeaveDelay. On mouseleave, we delay for mouseLeaveDelay milliseconds before calling onClose and if we receive a mouseenter on the trigger OR portal during the delay we clear the timer. This is actually what SUI proper does. We could default to 70ms like they do (https://github.com/Semantic-Org/UI-Popup/blob/master/popup.js#L1373-L1377).

I can also see adding two other props for symmetry:

closeOnTriggerClick
mouseEnterDelay - SUI defaults this to 50ms

I'll open up a quick PR with these additions unless there are any objections.

@levithomason I can't think of an elegant way to attach a mouseLeave listener on the trigger as those are being overwritten on Portal. SUI offers a delay on close and open, which I believe could be helpful on the portal itself.
For know I can think of two solutions:

Portal could accept event which would overwrite the existing one (or be triggered in addition of the existing ones)
Portal would handle some sort of delay and does not close when Focus, Click or Hover events are happening within the Portal (I believe this is what you've suggested @jcarbo )

Just pushed up a PR (#590) that gives the Portal the flexibility to handle the popup's use-cases. I tested that commit against this branch and it all worked well. You'll just need a few updates once that PR is merged in:
     if (this.props.on === 'click') {
       portalProps.openOnTriggerClick = true
+      portalProps.closeOnTriggerClick = true
       portalProps.closeOnDocumentClick = true
     }
     if (this.props.on === 'hover') {
       portalProps.openOnTriggerMouseOver = true
-      portalProps.closeOnTriggerMouseLeave = true
+      portalProps.closeOnMouseLeave = true
+      // Taken from SUI: https://git.io/vPmCm
+      portalProps.mouseLeaveDelay = 70
+      portalProps.mouseOverDelay = 50
     }

Sweet, I'll review the portal updates now.

I can't think of an elegant way to attach a mouseLeave listener on the trigger as those are being overwritten on Portal.

Note, no component should ever overwrite handlers.  They should wrap them.  This way a component can have it's own handler do what it needs to do, then inside that handler, check and call any parent handlers of the same name.  I believe we are doing this, if not, there is a bug and we'll fix it 👍

@levithomason should the popup be covering all functionalities of the SUI one for initial release or could we go with the most common features being covered ?

@jcarbo The hoverable works nicely, but the Portal updates might have re-introduced the bug on the focus where click to focus is removing the popup

should the popup be covering all functionalities of the SUI one for initial release or could we go with the most common features being covered ?

MVP components are definitely acceptable.  I prefer quick iterations over single large shipments.  As long as we've vetted the API enough as to reasonably not expect to have boxed ourselves in when expanding it later.

@levithomason & @jcarbo
I believe I'm at the last main feature needed for the Popup which is allowing the popup to be within an independent scrollable container. As of right now, since the popup is positioned relative to the body, scrolling such an element would make the trigger move away and the popup style fixed on the page. I haven't thought of all the possibility but here are what I could think of so far:

My preferred option would be to offer a hideOnScroll prop as provided by SUI. It would listen to window scroll events and temporarily take control of the open state of the Portal or simply replace the portal by the trigger when a scroll occurs, putting back the portal when the scrolling stops using a debounce.

The other solution I thought of is that I might be able to make it work with the mountNode feature of the Portal but it's a bit convoluted as a ref needs to be passed to the Portal through the popup, which pretty much looks like something like that and requires a different positioning logic:

export default class PopupMountExample extends Component {
  state = {}

  divMounted = (ref) => {
    this.setState({ mountPoint: ref })
  }

  render() {
    return (

        <Popup
          trigger={<Button icon><Icon name='add' /></Button>}
          content="A custom mounted popup."
          mountNode={this.state.mountPoint}
          on='click'
        />

    )
  }
}

My concern is offering a mountNode props might not be a feature we want to keep as I would rather have an boolean inline option in the long run. The inline option would make the popup a sibling element of the the trigger and require a bit more kung-fu for positioning but would also be more intuitive and closer to the spirit of SUI. I'm not sure how long it would take me to build a clean inline feature so I would rather deliver the popup without it initially.
Thanks for your help!

Hm, I'll have to pull this down and try it/review to give an appropriate response.  Will do soon as I can.

It looks like this branch needs updated to the latest master.  The index.js files in each component type folder (i.e. modules) was deleted.  We now export everything in the src/index.js file.  You'll need to add an src/modules/Popup/index.js as well that just exports the Popup.  That way, it can imported like so:
import Popup from 'src/modules/Popup`

Then, the src/modules/index.js can be deleted in this branch as it is in master.  You can reference the other component directories for more examples.

@levithomason I believe (unless I'm mistaking, which happens quite often) I've already migrated to the new index.js structure. Also, I just pulled and merged master in again

@levithomason - would be great if you could give a checklist of things left to do here, or comment on the one above. My opinion would be to solidify the functionality currently provided in this PR and add specs so that we can merge. Save any enhancements beyond that for separate issues/PRs.

@jcarbo I put the checklist on the first comment of this PR

@jcarbo can you think of an easy way to have the portal to be injected as a sibling to the trigger? That's might be the only thing that prevent me from implementing the inline feature

I've already migrated to the new index.js structure

Indeed, my branch was old, apologies!
@jcarbo agreed, let's feature freeze this where it is, cleanup and merge.  Then any extras can come later.  I'll start a final review now.

@jcarbo agreed, let's feature freeze this where it is, cleanup and merge. Then any extras can come later. I'll start a final review now.

@levithomason in that case I'll work on spec ASAP

@levithomason, @layershifter  I addressed the PR comments, will start working on the specs now.
Also @jcarbo I can't get the focus through click to behave on Popup (the popup appears and disappear almost instantly). Would you mind checking that my Portal config https://github.com/TechnologyAdvice/stardust/pull/570/files#diff-daca312d5932d8a0a079b86773c0ee3cR206 ?

Hey @debrice that was "unfixed" when I added closeOnTriggerClick. Here's the diff that will fix it if you want to just add it on your branch:
--- a/src/addons/Portal/Portal.js
+++ b/src/addons/Portal/Portal.js
@@ -205,14 +205,14 @@ class Portal extends Component {
       e.stopPropagation()
       this.close(e)
     } else if (!open && openOnTriggerClick) {
-      // Prevents closeOnDocumentClick from closing the portal when
-      // openOnTriggerFocus is set. Focus shifts on mousedown so the portal opens
-      // before the click finishes so it may actually wind up on the document.
-      e.nativeEvent.stopImmediatePropagation()
-
       e.stopPropagation()
       this.open(e)
     }
+
+    // Prevents closeOnDocumentClick from closing the portal when
+    // openOnTriggerFocus is set. Focus shifts on mousedown so the portal opens
+    // before the click finishes so it may actually wind up on the document.
+    e.nativeEvent.stopImmediatePropagation()
   }

   handleTriggerFocus = (e) => {

Also, can you squash your commits back down again? The reason your rebase was difficult last time was because you had merged a few times before and git had to try to parse through all the merged commits with duplicate code.
Once you squash again, any time you want to pull in the latest changes from master if you use rebase you shouldn't have any conflicts and your work will be back on top without any merge commits.

Great, thank you very much @jcarbo, this fixes the issue indeed! I will do the rebase very soon, once I'm done wrapping up the unit test.

@levithomason I think we're ready for the final review.

There's still quite a few lines missing test coverage. We keep this package at 100% test coverage so we won't be able to merge until all lines are covered. You can see the coverage by clicking details here:

You can also install the codecov.io browser extension to see the coverage right in github:

@jcarbo sounds good, I'll work on getting 100% coverage. Thanks for the heads up

@jcarbo I'm almost done. I'm missing some positioning/sizing tests for which I haven't yet find a solution.

Coverage Report
You can also get a killer coverage report by opening:
file:///<path_to_project>/coverage/lcov-report/index.html

Where <path_to_project> is your absolute file path to the project root.

Investigating Coverage
You can sort, drill down to directories/files, and see specific lines:

Thanks @levithomason, I found the coverage yesterday evening after @jcarbo comment but I really appreciate how all of you go above and beyond to guide and help.
I know it's a bit late but, is there some guide I should read ? Also, which element would incarnate the project code style (including test and example) ?
For example, many example are using Components while being stateless which turns out to be something we don't want. If we could illustrate guidance through an exemplary implementation of a SUI element I believe a new contributor (like myself) could save you a lot of time.
Finally, testing the positioning logic turns out to be quite a puzzle, I really want to to cover it fully prior to release but it might take a few more days.

I know it's a bit late but, is there some guide I should read ? Also, which element would incarnate the project code style (including test and example) ?

Not sure if you've read the CONTRIBUTING.md yet.  It is a walkthrough from cloning the repo, to documenting and testing your component.  So, it is meant to be read like a book, from top to bottom.  It is fairly comprehensive, but could always be better.  LMK if you feel something is missing from there.

@levithomason did the CONTRIBUTING.md got deleted?

Whoops, no it moved to .github.  I had an old link, updated, try it now 👍

Current coverage is 100% (diff: 100%)

Merging #570 into master will not change coverage

@@           master   #570   diff @@
====================================
  Files         119    122     +3
  Lines        1890   2000   +110
  Methods         0      0
  Messages        0      0
  Branches        0      0
====================================
+ Hits         1890   2000   +110
  Misses          0      0
  Partials        0      0

Powered by Codecov. Last update 586bdd4...e68874d

@jcarbo and @levithomason, the branch finally got a 100% code coverage 🎉
I believe I could test the library more but I need more research on phantomJS (event boundingRectangle returns 0 for all coordinates).

@levithomason I think we are good for the final review (unless there is something else I didn't see) :smile:

Cool, this looks like a great first shipment for this component.  Thanks for hanging in there and pioneering this stuff!

Released in<EMAIL_ADDRESS>

Thank you guys for your patience and especially @jcarbo for his great work on porting and upgrading the Portal lib! I had a blast 👍


Cow: Watch mssqlskill.blogspot

Cow requests the watch of the watch_keyword mssqlskill\.blogspot. See the MS search here and the Stack Exchange search in text, in URLs, and in code.

mssqlskill\.blogspot has been seen in 1 true positive, 0 false positives, and 0 NAAs.

Approved by VLAZ in Charcoal HQ


Create dataset loader for IndoLEM Tweet Ordering

Dataset name: IndoLEM Tweet Ordering
Dataset description: This task is based on the sentence ordering task of Barzilay and Lapata (2008) to assess text relatedness. We construct the data by shuffling Twitter threads (containing 3–5 tweets), and assessing the predicted ordering in terms of rank correlation (ρ) with the original.
Dataset URL: https://github.com/indolem/indolem/tree/main/tweet_ordering
Dataset Publication: IndoLEM and IndoBERT: A Benchmark Dataset and Pre-trained Language Model for Indonesian NLP
Task: Thread ordering
Languages: ind
Dialect/Style (optional): Colloquial
Domain: Social media
Dataset Size: 4327 train, 760 dev, 1521 test
License: MIT
Is Synthetic: No


Suggestion: Adhere to java naming conventions when generated from json data

Hello John,
I have found that generated class names are not as per the java naming conventions while some json data field names contain full capital letters and underscores as below.
---- Json Data ---
 "CONTACT_INFO_V7": {
      "COMM_CHANNEL": "BY EMAIL",
       "PHONE_LIST_V7": {
            "PHONE_LIST_ITEM_V7": {
                    "PHONE": "22222222"
             }
        }
}

---- Generated classes ----
@JsonInclude(JsonInclude.Include.NON_NULL)
 @JsonPropertyOrder({
         "COMM_CHANNEL",
         "PHONE_LIST_V7"
 })
 public class CONTACTINFOV7_ {
    @JsonProperty("COMM_CHANNEL")
     private String cOMMCHANNEL;
     @JsonProperty("PHONE_LIST_V7")
     private PHONELISTV7 pHONELISTV7;

here java class names are not as per the naming conventions but what i was expecting is as below.
@JsonInclude(JsonInclude.Include.NON_NULL)
 @JsonPropertyOrder({
         "COMM_CHANNEL",
         "PHONE_LIST_V7"
 })
 public class ContactInfo7 {
    @JsonProperty("COMM_CHANNEL")
     private String commChannel;
     @JsonProperty("PHONE_LIST_V7")
     private PhoneListV7 phoneListV7;

It would be so better to improve the quality if it would have been generated names as per the conventions.

Seems like this is already there in the queue for review in PR #801


NPM pushes create and leave a 'package' directory

a 'package' directory is created in the current working directory whenever an NPM push is done using charon, and is left in place after the run completes

cc @ligangty @hjmodi

@obriencj Created a jira issue to track.


[Snyk] Security upgrade scipy from 1.2.2 to 1.8.0

This PR was automatically created by Snyk using the credentials of a real user.Snyk has created this PR to fix one or more vulnerable packages in the `pip` dependencies of this project.
Changes included in this PR

Changes to the following files to upgrade the vulnerable dependencies to a fixed version:

distress-identifier/requirements.txt

⚠ Warning
resampy 0.2.1 requires scipy, which is not installed.

Vulnerabilities that will be fixed
By pinning:

Severity
Priority Score (*)
Issue
Upgrade
Breaking Change
Exploit Maturity

758/1000  Why? Proof of Concept exploit, Recently disclosed, Has a fix available, CVSS 7.3
Use After Free SNYK-PYTHON-SCIPY-5759266
scipy:  1.2.2 -> 1.8.0
No
Proof of Concept

(*) Note that the real score may have changed since the PR was raised.
Some vulnerabilities couldn't be fully fixed and so Snyk will still find them when the project is tested again. This may be because the vulnerability existed within more than one direct dependency, but not all of the affected dependencies could be upgraded.
Check the changes in this PR to ensure they won't cause issues with your project.

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open fix PRs.
For more information:
🧐 View latest project report
🛠 Adjust project settings
📚 Read more about Snyk's upgrade and patch logic

Learn how to fix vulnerabilities with free interactive lessons:
🦉 Use After Free

Duplicate


Vim9: unexpected type mismatch error when using variable arguments

Describe the bug
In vim9 script, using variable arguments doesn't work when sending an actual list, but using it through a command works okay.
To Reproduce
Run this shell command:
vim -Nu NONE -S <(cat <<'EOF'
    vim9script
    def Func(...args: list< string >): void
    enddef
    Func(['input'])
EOF
)

E1013 is given:
Argument 1: type mismatch, expected string but got list<string>

Expected behavior
No error is given.
Environment (please complete the following information):

Vim version 8.2.3452
OS: centos8
Terminal: Terminator

Additional context
Using it through a command, works:
command -nargs=* Command call Func(<f-args>)

And then
Command test test

produces no output (which is good!)

Defining a function with signature Func(...args: list<string>): void means the function accepts a variable number of string arguments, like Func('one', 'two', 'three'), but not Func(['one', 'two', 'three']). The arguments itself are accessed through the list args inside the function, like args[0] etc.
If you want to pass a list of strings, you need to use def Func(arg: list<string>), i.e. without the triple dots, but this won't work with <f-args>.

Ah, that makes sense.
For some reason I thought it took a list<string> which was optional (probably because of ...), but had no default value in case it was passed v:none.

But... shouldn't this work, then?
vim -Nu NONE -S <(cat <<'EOF'
    vim9script
    def Func(?arg: number): void
    enddef
EOF
)

No, func(?{type}) is a type declaration, like:
var MyFun: func(?number) = Func

This means that MyFun can be assigned to a function with signature Func(arg: number) or Func(), i.e. the function argument is optional. Assigning MyFunc to a function Func(arg: string) would give you an error.
Example:
def Func1(x: number = 10)
enddef

def Func2()
enddef

def Func3(str: string)
enddef

var MyFun: func(?number) = Func1  " okay

MyFun = Func2  " okay
MyFun = Func3  " E1012: Type mismatch; expected func(?number) but got func(string)

I still think it would make sense to drop the list for variable arguments:
✘
def Func(...varargs: list<string>)
                     ^---^      ^

✔
def Func(...varargs: string)

I've made the same kind of mistakes as the OP in the past.  That is, I've frequently thought that the type was for the members of the list, and not for the list itself.  For me, this suggests that writing the type of the members is more natural, because list is already implied by the ... prefix in front of the name of the variable arguments.

Variable arguments are defined as the last argument, with a name and have a
list type, similar to TypeScript.  For example, a list of numbers: >
def MyFunc(...itemlist: list)
for item in itemlist
...

Finally, the help at :help vim9-variable-arguments seems to suggest that the syntax is inspired from TypeScript:

Variable arguments are defined as the last argument, with a name and have a
list type, similar to TypeScript.  For example, a list of numbers: >

But in TypeScript, it seems that they write the type of the members, not the type of the list:
function buildName(firstName: string, ...restOfName: string[]) {
  return firstName + " " + restOfName.join(" ");
}

// employeeName will be "Joseph Samuel Lucas MacKinzie"
let employeeName = buildName("Joseph", "Samuel", "Lucas", "MacKinzie");

Notice that on the first line where the header of the buildName() function is written, they specify the type of ...restOfName as being string[].  There is no list in there.  Maybe that's because they came to the same conclusion; i.e. it's more natural to only write the type of the members, rather than the type of the whole list.

Notice that on the first line where the header of the buildName() function is written, they specify the type of ...restOfName as being string[]. There is no list in there.

Actually, the trailing brackets [] might be their own way of expressing list<>.  So, maybe my suggestion isn't so good after all.  I don't know.


Fix link button styling

Describe the bug
Link buttons in the demo are using invalid HTML. Nesting buttons within links is invalid and semantically incorrect.
To Reproduce
The demo is using <button>Button Link</button> for link buttons.
Expected behavior
Valid HTML.
Additional context
I maintain a list of CSS frameworks where Marx is listed. Using valid HTML and proper semantics is a requirement to be listed.

For the record: I removed Marx from the list for now.
https://github.com/troxler/awesome-css-frameworks/commit/910446bbebb303a448f13c29404fda0bbbd2ce12

Hi @troxler, what makes you say the HTML is invalid?
According to MDN,

a  may be placed within any element that accepts "phrasing content" [1]
the  tag supports "phrasing content" as long as there's not also non-phrasing content [2]

[1] https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button
[2] https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#phrasing_content

The content model of the a element specification defines that "there must be no interactive content descendant". A button—among other elements—is interactive content.

Thanks! Today I learned. I'm not the maintainer but it should be pretty easy for you to open a pull request that removes the link button example.

This should do the job: https://github.com/mblode/marx/pull/64


[NuGet.org Bug]: Account linked to another email

Impact
I'm unable to use NuGet.org
Describe the bug
Hello there,
In the past I've created an organization in nuget called codescovery.
Apparently it's linked to the email<EMAIL_ADDRESS>I would like to link the account to<EMAIL_ADDRESS>Repro Steps
Trying to login into nuget.org using<EMAIL_ADDRESS>Expected Behavior
Manage Nuget Account using<EMAIL_ADDRESS>Screenshots

Additional Context and logs
No response

Hey @dev-vinicius-andrade, let's talk about this issue over email since it includes private information. Could you send an email to<EMAIL_ADDRESS>with these details?

Sure


Exception: Type 'HttpRequestEventTarget' is not a subtype of expected type 'HttpRequest'.

macOS 10.14
Dart VM version: 2.0.0-dev.69.0 (Tue Jul 17 14:57:16 2018 +0200) on "macos_x64"
AngularDart Version: 5.0.0-beta+1

I need to HTTP request but I'm getting an exception,
Exception: Type 'HttpRequestEventTarget' is not a subtype of expected type 'HttpRequest'.
I have trouble with that code, could you please help me correct it.
Future<List<Person>> loginWorkflow(String username, String password) async {
    try {

      final response = await _http.post(
        _baseURL + '/signin',
        headers: _headers,
        body: json.encode({
          'username': username,
          'password': password
        })
      );

      final person = (_extractData(response) as List)
        .map((value) => Person.fromJson(value))
        .toList();

      return person;
    } catch (e) {
      print(e.toString());
      throw _handleError(e, 'loginWorkFlow()');
    }
  }

This is not related to AngularDart. You'll need to file your issue(s) over at I believe dart-lang/http.


[BUG] Error when updating mod.

Describe the bug
An error appears while im trying to update "OkZoomer"
To Reproduce
Steps to reproduce the behavior:

Go to 'Mod update page'
Click on 'Update'
See error

Expected behavior
Should get updated instead of error
Screenshots

Please complete the following information:

OS: Windows 10 Home Single Language - Build 21390.co_release.210521-1658
Minecraft version: 1.17.1
Version: 1.0.1-alpha

Logs
Latest log: latest.log
Additional context
I noticed this problem in only OkZoomer mod, idk if theres problem in any other mod.

From the exception it looks like that your installed OkZoomer mod is corrupt i would suggest removing the mod and reinstalling it through ModManager


remove functions deprecated in v0.18.0

Probably not the right place for such a rant, but I must say that I'm sad to see mapObj going away. We upgraded to 0.18 right on launch, and as usual, tried to get rid of deprecated stuff while we're at it. At the end, I decided not to do mapObj->map change for now, as it made very clear pipelines somewhat confusing, as one can no longer - at a glance - know if she's working with an object or an array (think of: pipe(map(...), values)).

@asaf-romano:
const mapObj = R.map;

Or if you don't mind a little mutation, assign it back to R.mapObj.


Update constructor for all the values we need from data

This was a quick 15-30 minute task where I just added some values into our constructor. This will likely changed in the future depending on how we decide to draw everything.


After upgrade missing watchOptions variable

Attempted Debugging

[X] I have read the debugging page

Searched GitHub Issues

[X] I have searched GitHub for the issue.

Describe the Scenario
We upgraded the system , docker-compose up from a 1/2 year old version. Seemed to be running well, but when we directly access a shelve  we get the following error:
/config/log/bookstack/laravel.log:[previous exception] [object] (ErrorException(code: 0): Undefined variable $watchOptions at /app/www/storage/framework/views/eb0f06564035fb8e498f94ee536896aaefa7b3aa.php:79)
/config/log/bookstack/laravel.log:[2024-01-23 14:42:10] production.ERROR: Undefined variable $watchOptions (View: /app/www/resources/views/entities/meta.blade.php) (View: /app/www/resources/views/entities/meta.blade.php) {"userId":6,"exception":"[object] (Illuminate\View\ViewException(code: 0): Undefined variable $watchOptions (View: /app/www/resources/views/entities/meta.blade.php) (View: /app/www/resources/views/entities/meta.blade.php) at /app/www/storage/framework/views/eb0f06564035fb8e498f94ee536896aaefa7b3aa.php:79)
production.ERROR: Undefined variable $watchOptions (View: /app/www/resources/views/entities/meta.blade.php)
Exact BookStack Version
23.12.1
Log Content
/config/log/bookstack/laravel.log:[previous exception] [object] (ErrorException(code: 0): Undefined variable $watchOptions at /app/www/storage/framework/views/eb0f06564035fb8e498f94ee536896aaefa7b3aa.php:79)
/config/log/bookstack/laravel.log:[2024-01-23 14:42:10] production.ERROR: Undefined variable $watchOptions (View: /app/www/resources/views/entities/meta.blade.php) (View: /app/www/resources/views/entities/meta.blade.php) {"userId":6,"exception":"[object] (Illuminate\View\ViewException(code: 0): Undefined variable $watchOptions (View: /app/www/resources/views/entities/meta.blade.php) (View: /app/www/resources/views/entities/meta.blade.php) at /app/www/storage/framework/views/eb0f06564035fb8e498f94ee536896aaefa7b3aa.php:79)
Hosting Environment
Docker compose docker
PHP 8.3.2 (cli) (built: Jan 18 2024 16:40:45) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.3.2, Copyright (c) Zend Technologies
image:
lscr.io/linuxserver/bookstack   latest              e434dd96b53e

Hi @ajwstevens,
Are you using the visual theme system at all to maybe override template files with customizations?

Hello @ssddanbrown  , Dan,
I did not realize, but yes. We were! I found the problem. Thank you very much.
Regards ,
Albert-Jan

Great, good to hear you found the cause of the issue!


Dimensions numbers not fixed

Something happens that I don't know if you meant. When I choose to create an image of size 512 x 512 for example, and choose the Upscale x4 option after the image has been created the Dimensions numbers change to 2048 x 2048 and then if I click on Text2Image again the software will try to increase this size by 4 times and declare a lack of memory.
That means I have to manually return it to 512 x 512 every time

In my opinion, auto-upscaling is not very interesting, it was more of an experimental feature, auto-upscaling has been removed.

I did to your project some publicity:
https://www.facebook.com/groups/stableaisrael/posts/789528682896352/

Thank you for your kindness. If you have any suggestions or problems, please let me know.


Errno reset

fixes #508
errno is always set after a call to gpioInitialise due to open being used to check for the existance of the PID file in initCheckLockFile
This PR resets errno when the expected error occurs.

Seems reasonable.


Quest v0.1 / G6PD: Authentication

This issue includes all work required to allow a user to log in and out of the Quest / G6PD application.
Login / Logout UX:
Pull in the ability for an end user to log into the app via a username and password.
Pull in the ability for an end user to log out of the app via an option in the settings menu in the bottom right navigation.
Reuse the current login UI

Set up Keycloak:
@pld any specific requirements here? Is this shared?

@rowo the Quest mocks here represent a shift to the bottom navigation only. Was this a design system decision for how we wanted to handle our simpler apps? (just want to confirm navigation as it relate to the settings functionality for this case)
If so, then my understanding is that if you hit "settings" in the bottom nav, we would be directed to a simplified version of this view: https://www.figma.com/file/QZ4cdpgBNy86XTOUnrnLap/COVID19-FHIR-Future-Design-System?node-id=2518%3A26055

No keycloak setup needed, we can use the existing keycloak and create a g6pd-demo user (or named whatever) that has a g6pd publisher field somewhere in it so it aligns with #571


query function is always evaluated when the component is created, even if skip function returns true

I have a query function that accesses a prop on my component that is not available in my component at mount (it is populated from an async request). I created a skip function that returns true when that prop is not yet set, expecting this to prevent the query function from being evaluated till it is ready.
However, the query function is always evaluated at least once before the skip function is evaluated. It looks like the query callback is always called during construction, before the skip function is evaluated: https://github.com/Akryum/vue-apollo/blob/master/src/smart-apollo.js#L19
In fact, simply setting skip to true is not sufficient to prevent query from being called at least once.
Ideally the query function would only be evaluated after skip has been verified to be set to (or evaluate to) false.

Currently, skip only prevent the query from running. I agree it would be nice if it also don't run the other callbacks.

What is the preferred way to handle this situation if skip is not the way?

I find myself repeating the same checks in my skip() function and in my query() function.
Any advice on where to start if you are open to pull requests ?

Can someone clarify what skip() actually prevents from happening?
Is it just that future, reactivity-based querying won't happen?
I just spent a half-hour banging my head against this and wonder if there's a way to clarify in the documentation the intended purpose of the skip property...


Added Similarity and InputFile Options

Added -similarity Option which takes a custom floating point to change the clustering percentage. I've had success with more strict, and less strict values (~78%), makes it easier to just make an option rather than rebuild from source each time
Added -inputfile Option which allows aquatone to read the hosts (nmap or raw) from a direct file rather than using STDIN. I have some other tools that are dependent on input from a file, makes my life easier than modifying those tools too.
Thanks for the awesome tool!

It could be great to add these options, but this project seems dead right now.


[RFE] run/toppers: Possible improvements for reading ebpf program's output

As mentioned during https://github.com/inspektor-gadget/inspektor-gadget/pull/2132 review, the user space code for collecting and cleaning up eBPF program's output could be improved using the following suggestions:

Study the possibility of using Iterate().
Study the possibility of using BatchLookupAndDelete()

@blanquicet it's not about bpf code nor for the top file gadget. It's to be done in the Inspektor Gadget side and will affect all toppers.

@blanquicet it's not about bpf code nor for the top file gadget. It's to be done in the Inspektor Gadget side and will affect all toppers.

Oops, you're right. I'll update the title and the description. Thanks!

Done by https://github.com/inspektor-gadget/inspektor-gadget/pull/3182


Add Dj-tracker directly to Test DB and see the dashboard.

Found this tool very useful. However, it's difficult to go to each URL and record it in Dj-tracker.
Is there any way to include it in test cases? I have around 1600 test cases covering all scenarios of my project.
I want to generate a report after running all the test cases, which would display all the records and data in one place.
N+1 queries are very notorious, and checking them one by one is difficult.
Do you think it's possible to achieve this?

Hey @rjsnh1522, thanks for trying it out.

Is there any way to include it in test cases?

Yes, adding TEST_RUNNER = "dj_tracker.test.DjTrackerRunner" in your test settings will ensure the tracker is started before the test suite is run.
I'd highly recommend adding the trackings database - otherwise the tracking data may be lost since test databases aren't generally preserved between runs.


Allow hiding rows that are all green

This allows users to focus on Api's that have possible problems in the
current view.

/cc @twsouthwick @conniey
After hiding columns that have the most errors, a lot of the rows now show all green.  Hiding them allows users to focus on useful things.

#261 Helps address the issue by hiding some information.


Fix survey news showing multiple times and when users opt out

Issue #1086
Bug
Not honoring never setting for Survey news options. The never case is actually the worst one since it can open multiple survey news pages, one for each project.
Fix
Make sure we do honor this option and never automatically display survey news when enabled.
Testing
Manually verified bad behavior before and that this change fixes the bad behavior.
Closes #1086

:+1:


:arrow_up: update scalajs-compiler, scalajs-library, ... from 0.6.33 to 1.4.0

Updates

org.scala-js:scalajs-compiler
org.scala-js:scalajs-library
org.scala-js:scalajs-test-bridge

from 0.6.33 to 1.4.0.
GitHub Release Notes - Version Diff
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

Ignore future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "org.scala-js" } ]

labels: library-update, semver-major

Superseded by #57.


[WIP] testing Multicluster

[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: sebastienvas
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

prow/OWNERS [sebastienvas]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@sebastienvas: The following test failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

prow/istio-pilot-e2e-envoyv2-v1alpha3.sh
6118296dfddd475c671c4e42a88b57bf9295f941
link
/test istio-pilot-e2e-envoyv2-v1alpha3

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@sebastienvas: The following tests failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

prow/istio-pilot-e2e-envoyv2-v1alpha3.sh
6118296dfddd475c671c4e42a88b57bf9295f941
link
/test istio-pilot-e2e-envoyv2-v1alpha3

prow/e2e-mixer-no_auth.sh
6118296dfddd475c671c4e42a88b57bf9295f941
link
/test e2e-mixer-no_auth

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@sebastienvas: The following tests failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

prow/istio-pilot-e2e-envoyv2-v1alpha3.sh
6118296dfddd475c671c4e42a88b57bf9295f941
link
/test istio-pilot-e2e-envoyv2-v1alpha3

prow/e2e-mixer-no_auth.sh
6118296dfddd475c671c4e42a88b57bf9295f941
link
/test e2e-mixer-no_auth

prow/e2e-dashboard.sh
6118296dfddd475c671c4e42a88b57bf9295f941
link
/test e2e-dashboard

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@sebastienvas: The following tests failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

prow/istio-pilot-e2e-envoyv2-v1alpha3.sh
6118296dfddd475c671c4e42a88b57bf9295f941
link
/test istio-pilot-e2e-envoyv2-v1alpha3

prow/e2e-mixer-no_auth.sh
6118296dfddd475c671c4e42a88b57bf9295f941
link
/test e2e-mixer-no_auth

prow/e2e-dashboard.sh
6118296dfddd475c671c4e42a88b57bf9295f941
link
/test e2e-dashboard

prow/e2e-bookInfoTests-v1alpha3.sh
6118296dfddd475c671c4e42a88b57bf9295f941
link
/test e2e-bookInfo-envoyv2-v1alpha3

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@sebastienvas: The following tests failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

prow/istio-pilot-e2e-envoyv2-v1alpha3.sh
6118296dfddd475c671c4e42a88b57bf9295f941
link
/test istio-pilot-e2e-envoyv2-v1alpha3

prow/e2e-mixer-no_auth.sh
6118296dfddd475c671c4e42a88b57bf9295f941
link
/test e2e-mixer-no_auth

prow/e2e-dashboard.sh
6118296dfddd475c671c4e42a88b57bf9295f941
link
/test e2e-dashboard

prow/e2e-bookInfoTests-v1alpha3.sh
6118296dfddd475c671c4e42a88b57bf9295f941
link
/test e2e-bookInfo-envoyv2-v1alpha3

prow/e2e-simpleTests.sh
6118296dfddd475c671c4e42a88b57bf9295f941
link
/test e2e-simple

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@sebastienvas: The following tests failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

prow/istio-pilot-e2e-envoyv2-v1alpha3.sh
6118296dfddd475c671c4e42a88b57bf9295f941
link
/test istio-pilot-e2e-envoyv2-v1alpha3

prow/e2e-mixer-no_auth.sh
6118296dfddd475c671c4e42a88b57bf9295f941
link
/test e2e-mixer-no_auth

prow/e2e-bookInfoTests-v1alpha3.sh
6118296dfddd475c671c4e42a88b57bf9295f941
link
/test e2e-bookInfo-envoyv2-v1alpha3

prow/e2e-simpleTests.sh
6118296dfddd475c671c4e42a88b57bf9295f941
link
/test e2e-simple

prow/e2e-dashboard.sh
2f10b02492e992fb2b53fee7e1457e21563f94c3
link
/test e2e-dashboard

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

/test istio-pilot-multicluster-e2e

@sebastienvas: The following tests failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

prow/e2e-dashboard.sh
2f10b02492e992fb2b53fee7e1457e21563f94c3
link
/test e2e-dashboard

prow/istio-pilot-multicluster-e2e.sh
2f10b02492e992fb2b53fee7e1457e21563f94c3
link
/test istio-pilot-multicluster-e2e

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@sebastienvas: The following tests failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

prow/istio-pilot-multicluster-e2e.sh
2f10b02492e992fb2b53fee7e1457e21563f94c3
link
/test istio-pilot-multicluster-e2e

prow/e2e-dashboard.sh
e23f3329a5c39c33b544f6fc6fcebeb17a6a5e81
link
/test e2e-dashboard

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

/test istio-pilot-multicluster-e2e

@sebastienvas: The following tests failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

prow/e2e-dashboard.sh
e23f3329a5c39c33b544f6fc6fcebeb17a6a5e81
link
/test e2e-dashboard

prow/istio-pilot-multicluster-e2e.sh
e23f3329a5c39c33b544f6fc6fcebeb17a6a5e81
link
/test istio-pilot-multicluster-e2e

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

Patch was merged.


Add the notion of a "filtered" column batch which includes a selection vector

We need to return something from scan that isn't just add files. This should be more like a filtered batch  which holds the raw batch and selection vector, and lets you iterate "valid" rows.

Done


Unexpected A class must be declared after its base class. error with class expression

TypeScript Version:  2.0.2
Code
let cat = new class extends class {
	speak() {
		return "???";
	}
} {
	speak() {
		return "meow";
	}
}();
console.log(cat.speak());

Expected behavior:
We can compile this code.
Actual behavior:
$ tsc -v
Version 2.0.2
$ tsc sample.ts
$ sample.ts(1,29): error TS2690: A class must be declared after its base class.

This code can compiled by tsc 2.0.0.

Isn't this illegal? What should new class extends class even do?

You write some weird code :wink:

It is testcase 😉.

Wow, that is valid ES6.  The crazy things people write.

I don't know, this sample is making me warm up to class based programming in JavaScript ;) It's great when everything is first class!

Well actually it's real case when you don't use modules and you compile into single file.
Looks like in some cases TSC is lost with solving dependencies.
I have this issue with base class in one file / derived class in another.
I'm using TS 2.1 dev.
Checking on 2.0 RC ...

Same on 2.0.2 :(

This is still an open issue, with a milestone target of being fixed in TypeScript 2.1.
Expecting it to be magically fixed before it is closed and marked as fixed and has an associated commit that has been merged into master is folly.

Just informing that's it's not regression of 2.1 as it exist on 2.0.2

Which is what the issue was opened up under:

TypeScript Version: 2.0.2

@pankleks we pushed this to the 2.1 milestone because the provided repro is not realistic code. If you're still seeing this with "real" code we could use a repro -- this is something we'd fix for 2.0 in that case.

I have this issue constantly when using outFile and no modules.
I have lots of classes in multiple files, for majority of them it works - am'I just lucky or TSC have some logic to resolve dependencies?

Your files will be ordered first according to any reference directives, then by the order they were specified as build inputs, then by luck and happenstance. But anyway you should only see this error in cases where the code definitely fails early at runtime. Can you provide a repro?

Will try to reproduce it on some small repo - can't share the one I'm mentioning here.
BTW - is there plan to introduce full dependency resolution to avoid "luck" scenarios?:)

We strongly recommend using modules at this point. With the advent of good bundlers there's not much reason not to. If you can't for whatever reason, using reference paths to declare all your dependencies, or having a references.ts file that list all files in the desired order are the only good options.

we pushed this to the 2.1 milestone because the provided repro is not realistic code. If you're still seeing this with "real" code we could use a repro

@RyanCavanaugh I've just run into this with real code. Minimal repro below.
class Derived extends makeBaseClass() {} // ERROR class must be declared after base class

function makeBaseClass() {
    return class Base {};
}

The above works fine at runtime. It relies on makeBaseClass being hoisted to the top of the scope, and for various reasons we do not wish to unnecessarily move makeBaseClass to the top of the file.

Very fixed https://gist.github.com/aluanhaddad/acaa0ccfa7922a8d4be77b8f1489d283


Update link for Recommended Hardware Specifications

Update link for Recommended Hardware Specifications

@Jiuhong-casperlabs Thanks a lot for your contribution! :pray:


Feature/test fix startup

What
Describe what you have changed and why.
How to review
Describe the steps required to test the changes.
Who can review
Describe who worked on the changes, so that other people can review.

Just to check, I think this was resolved by Kamen's changes, if this can be closed?


python3Packages.aioymaps: 1.1.0 -> 1.2.0

Motivation for this change
Update to latest upstream release 1.2.0
Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all packages 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/)
21.11 Release Notes (or backporting 21.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

Result of nixpkgs-review pr 139348 run on x86_64-linux 1

3 packages built:

home-assistant
python38Packages.aioymaps
python39Packages.aioymaps


Balder/cleanup softtimeout

@havardpe PR
@bratseth PR java code

Your second concern should be fixed now.
Your first concern is still valid


Add filterA

This PR adds the filterA module which allows you to filter an array with an applicative predicate, for example if you have to make calls with IO or Task in said predicate.
Not added versions or descriptions yet, just wondering if the implementation looks good at this point. If/when we're happy with that I'll add those final bits. :slightly_smiling_face:
Cheers!

Thanks @SamHH, released.


Room : Enable permalink for messages and rooms

Re-enable permalink for messages and rooms.
ToDo :

Recover code from Riot
Add "room" to the generated url
Remove "via?" to the generated url

@jploquin do we need to disable email sharing and generated QRCode ?

@jploquin do we need to disable email sharing and generated QRCode ?

I will let it inside a summary tag.

Here is what it looks like :


Custom application cast exception

This Crash I don't know how to have a custom application in an InstantApp

I don't see how your code changes are related to the sample app at hand.

@laurentlr Please let me know what you're intending to demonstrate with this PR.
Next to updating some dependencies you added calls to a non-existing class called Toto.
This is breaking and won't be accepted as it currently stands.


Microsoft.AspNetCore.Server.Kestrel.Core.BadHttpRequestException: Request timed out.

Hi,
We are currently getting a 500 from Kestrel on our net core 2.0 application when a client tries to upload a file and the connection between client and server is terminated (by the client) prematurely. Is this the expected behaviour? Is there a way to prevent it from coming up as a 500 since it is affecting our telemetry/uptime stats. From what I understand it is failing since Kestrel negotiates the file upload (we are using IFormFile) and since the client is disconnecting while the transfer is in progress, it is throwing an error before we hit our controller.
Thanks for any info, I have looked at manually streaming the file (https://docs.microsoft.com/en-us/aspnet/core/mvc/models/file-uploads) but was wondering if it was necessary to go down this route or if I can rather just handle the Kestrel error myself.
Thanks

This is the full error:
Microsoft.AspNetCore.Server.Kestrel.Core.BadHttpRequestException: Request timed out.
   at Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines.PipeCompletion.ThrowFailed()
   at Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines.Pipe.GetResult(ReadResult& result)
   at Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines.Pipe.Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines.IReadableBufferAwaiter.GetResult()
   at Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines.ReadableBufferAwaitable.GetResult()
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.MessageBody.<ConsumeAsync>d__24.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.Frame`1.<ProcessRequestsAsync>d__2.MoveNext()

MVC is the one reading the IFormFile, not Kestrel.  If the upload is substantial then I would recommend the more hands on approach.
It's interesting the client disconnect was reported as a timeout, that implies the connection was kept alive by some intermediary. Are there proxies or load ballancers in the system?

Apologies for not replying, our issue was that we were using the Developer Exception Page which was elevating the timeout from a 408 to a 500 (and the timeout was due to poor connectivity client side). Will mark as closed, you can remove if necessary since it was unrelated. Thanks!


Size of images should focus on top when window is smaller.

When I make the width of the screen smaller, the website focuses on the bottom of the image. IMO it makes more sense for it to focus on the top. But I'd like @GBKS to take a look and provide some guidance on how to handle situations like this.
This is for the chrome browser on mac.

Dimensions were :1300 x 672
This issue is not a blocker for release.

Good one. We briefly discussed this a while ago. The solution here is to have a custom object-position CSS property for this page template (and maybe other templates, too). When an image is cropped, this property defines how to position the image inside its boundaries. You essentially define where the primary point of interest of the image is. Considering we sometimes use different images for desktop and mobile, we may need 2 properties for this also.

Already implemented! just needs to be used here!


Fix typos in documentation

Fix repeated words

This change is

http://cockroach-docs-review.s3-website-us-east-1.amazonaws.com/c6b2e55199e7e0781bbb6dfbe06e5b2c40857ece/

@jseldess Now you've tricked me into whipping up a quick bash one-liner to find other duplicated words in the doc ;)

http://cockroach-docs-review.s3-website-us-east-1.amazonaws.com/5191e196b60c9e561c9bee705ee73310717aa959/

http://cockroach-docs-review.s3-website-us-east-1.amazonaws.com/53a2804e51c1456b15f35abd8e0dac2eff541e06/

@rvbaz What a wonderful bunch of catches. Thank you so much for taking the time to do this!

@jseldess It's very rough (catches a few false positives like repeated integers & co, etc.) but here it is: find . -type f -name "*.md" -print0 | xargs -0 -n 1 grep -o -E '\b((\w+)\s+)(\2|\1)+\b' | sort | uniq

Thanks for sharing this, @rvbaz!


Schedule event in others event space

hi, it is possible to do something like this:
def schedule_event_for_all(when, data_tuple):
    for delegate in active_delegates:
        delegate.scheduler.event_at(when, data_tuple)

how to obtain the active_delegates list?
or
def schedule_event_for_all(when, data_tuple):
    for source in sources:
        bot.scheduler.event_at(when, {'_event': {'source': source, 'data': data_tuple}})

in my example ad admin wants to schedule an event for all delegates.

In effect, you are requiring a way to retrieve the list of all active *Handler objects.
This line in the file __init__.py indicates that there is a field self._delegate_records in DelegatorBot holding all the active delegates. To be precise, self._delegate_records is a list of tuples; each tuple's third element is a dictionary whose keys are delegate's ID and whose values are delegates. Unfortunately, those delegates in the dictionary are not *Handler objects you want to get at. Those delegates are actually threads (or tasks in async version) wrapping around *Handler objects. There is no way to retrieve *Handler objects from delegates.
For what you want to achieve, however, I think of another approach. The way telepot delivers messages and events is by broadcasting all messages and events to all *Handler objects, and lets each *Handler filter for what they want to hear. All *Handlers have a listener object which performs the filtering. Normally, the listener is configured to listen out for those messages and events aimed at its parent *Handler only. For example, this line configures it to listen for chat messages with a certain chat id; this line configures it to listen for events with a certain event space and source id; this line configures it to listen for chat messages with a certain flavor and a certain from id. You tell a listener what to capture by giving it a message pattern or a predicate function. Here is the reference.
To achieve a broadcast (i.e. sending an event to all delegates), you can configure the listeners to be less specific. For example, you can design your broadcast event to have the form:
{'_broadcast': { ... }}

and configure your listener as:
self.listener.capture([lambda msg: flavor(msg) == '_broadcast'])

Then, when you use bot.scheduler to schedule such an event, all delegates should receive it, if all goes well.
 But it should be feasible within telepot's design. Any unintended consequences? I can't think of any, but can't say for sure. Like I said, I haven't done such a thing :blush: Good luck.

The way telepot delivers messages and events is by broadcasting all messages and events to all *Handler objects, and lets each *Handler filter for what they want to hear.

so my schedule_event_for_all is a waste of resources. Thank you very much, your solution is cleaner, i'll try it.


WIP: Initial commit for get and create article

https://stackstorm.slack.com/archives/stackstorm/p1449871410012854


Remove BugSnag

Remove BugSnag from code and build files

I used https://obdev.at/products/littlesnitch/index.html to investigate the behaviour of our wallet. I realised that many servers are being accessed in the background.

Why are all these servers targeted?
Can we remove these external services from our wallet?
Our wallet should address as few external services as possible. We are not interested in tracking and the like.

Why are all these servers targeted?
Can we remove these external services from our wallet?
Our wallet should address as few external services as possible. We are not interested in tracking and the like.

@TaprootFreak I checked the list of server in the screenshot and there are only 2 externals services:

Coingecko: used for quotation.
Bugsnag: bug reporting, it's been removed in #60

All others are peer nodes that the instance of Electrum in the wallet can connect to, so they are not analytics or similars. You can check out the complete list here in the code:
https://github.com/DFXswiss/btc-wallet/blob/48a7ca6831d471543d2bea1b2fd0363f68aa254f/blue_modules/BlueElectrum.js#L51
I would say those are OK, but let me know if you want me to replace them for other nodes that you run or trust.

Ok, thank you
That's good to know!


Recorder - Event not JSON serializable

Home Assistant release with the issue: 0.84.0.dev0 (2018-12-01)
Last working Home Assistant release (if known): -
Component/platform: recorder, logbook, persistent_notification, (other?)
Description of problem:
During the execution of persistent_notification.create and logbook.log with templates as message a recorder warning appears (see below).
Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):
sensor:
  - platform: time_date
    display_options:
      - time

automation:
  - alias: 'Demo'
    initial_state: true
    trigger:
      - platform: homeassistant
        event: start
    action:
      - service: persistent_notification.create
        data_template:
          title: 'Test {{ states("sensor.time") }}'
          message: '**Demo**: {{ states("sensor.time") }}'

Traceback (if applicable):
2018-12-01 22:54:04 WARNING (Recorder) [homeassistant.components.recorder]
  Event is not JSON serializable:
    <Event call_service[L]: domain=persistent_notification, service=create,
      service_data=title=<homeassistant.helpers.template.Template object at 0x7f4561620780>,
      message=<homeassistant.helpers.template.Template object at 0x7f4561620710>>

Additional information:
The template is first rendered during the service call execution. Since we already log the call itself, the error occurs. Might be related to #18720

Exactly the same problem here.

Same for telegramnotify
Event is not JSON serializable: <Event call_service[L]: domain=notify, service=telegramnotify, service_data=message=<homeassistant.helpers.template.Template object at 0x6df93c10>>
and telegram_bot send_message
Event is not JSON serializable: <Event call_service[L]: domain=telegram_bot, service=send_message, service_data=target=[708054045], message=<homeassistant.helpers.template.Template object at 0x6f7b1a90>>

Looks like every notify component is affected.
Seeing this also on iOS and smtp messages.

Also seeing this on 84.0b0 and 84.0b1
Both of these are repeated for persistent notification and service "create"
2018-12-07 12:58:46 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.140670539353224] Unable to serialize to JSON: Object of type 'Template' is not JSON serializable
{'id': 2, 'type': 'event', 'event': {'event_type': 'call_service', 'data': {'domain': 'persistent_notification', 'service': 'create', 'service_data': {'title': <homeassistant.helpers.template.Template object at 0x7ff068a50240>, 'message': <homeassistant.helpers.template.Template object at 0x7ff068a50a90>, 'notification_id': 'config_entry_discovery'}}, 'origin': 'LOCAL', 'time_fired': datetime.datetime(2018, 12, 7, 19, 58, 46, 717462, tzinfo=<UTC>), 'context': {'id': '916f3980f2bb4d23980677384e8a37ec', 'user_id': None}}}

2018-12-07 12:58:54 WARNING (Recorder) [homeassistant.components.recorder] Event is not JSON serializable: <Event call_service[L]: domain=persistent_notification, service=create, service_data=title=<homeassistant.helpers.template.Template object at 0x7ff068a50240>, message=<homeassistant.helpers.template.Template object at 0x7ff068a50a90>, notification_id=config_entry_discovery>

getting the same kind of errors
2018-12-08 21:56:44 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.140627748735072] Unable to serialize to JSON: Object of type 'XiaomiGateway' is not JSON serializable
{'id': 2, 'type': 'event', 'event': {'event_type': 'call_service', 'data': {'domain': 'xiaomi_aqara', 'service': 'stop_ringtone', 'service_data': {'gw_mac': <xiaomi_gateway.XiaomiGateway object at 0x7fe725796898>}}, 'origin': 'LOCAL', 'time_fired': datetime.datetime(2018, 12, 8, 21, 56, 44, 365576, tzinfo=), 'context': {'id': '27122b8840024516a0d37ad2795825e7', 'user_id': None}}}


Fix: substr() on StringView column's behavior is inconsistent with the old version

Which issue does this PR close?

N.A.
Rationale for this change
Recently native StringView type support is implemented on substr() string function, but its behaviour is not consistent with the older implementation on StringArray string physical column type
The function semantics on the original StringArray type is consistent with postgres https://www.postgresql.org/docs/9.1/functions-string.html
The postgres version of substr(s, start, count)'s behavior is: start is 1-indexed, then we have a maybe out of bounds , and 0-indexed character range [start-1, start-1+count) , the valid char range is [0, s.chars().count()), and this function will take the intersection of two.
They handle negative start index differently and also handle invalid range differently
DataFusion CLI v41.0.0
> select substr('foo', -2,4), substr(arrow_cast('foo', 'Utf8View'), -2, 4);
+----------------------------------------+---------------------------------------------------------------------+
| substr(Utf8("foo"),Int64(-2),Int64(4)) | substr(arrow_cast(Utf8("foo"),Utf8("Utf8View")),Int64(-2),Int64(4)) |
+----------------------------------------+---------------------------------------------------------------------+
| f                                      | foo                                                                 |
+----------------------------------------+---------------------------------------------------------------------+
1 row(s) fetched.
Elapsed 0.104 seconds.

> select substr('', -10, 5)='', substr(arrow_cast('', 'Utf8View'), -10, 5)='';
+-------------------------------------------------+------------------------------------------------------------------------------+
| substr(Utf8(""),Int64(-10),Int64(5)) = Utf8("") | substr(arrow_cast(Utf8(""),Utf8("Utf8View")),Int64(-10),Int64(5)) = Utf8("") |
+-------------------------------------------------+------------------------------------------------------------------------------+
| true                                            |                                                                              |
+-------------------------------------------------+------------------------------------------------------------------------------+
1 row(s) fetched.
Elapsed 0.010 seconds.

What changes are included in this PR?
substr's behavior is already consistent with postgres if input is StringArray
This PR changes implementation to keep StringView version also consistent with postgres

Are these changes tested?
Added more sqllogictests

Are there any user-facing changes?

No

FYI @Kev1n8 who I think added substring support in  https://github.com/apache/datafusion/pull/12044

It is really cool, and also fix the potential problem in #12395 !

Thanks for correcting my mistakes. I really appreciate it! I'll be more careful with my code next time.

Agreed -- thanks @2010YOUY01 (and sorry I didn't catch this in review either)
In general I wonder if there is a better way to test the string functions (since many of them now have multiple implementations for different input type combinations, but each implementation should get the same answer)

One thing to do is to duplicate existing SQL test cases and convert StringArray columns to StringView columns, I think not every PR for string function native StringView support did this 🤔
I can do a sample PR and open several issues for string functions missing StringView SQL level tests

One thing to do is to duplicate existing SQL test cases and convert StringArray columns to StringView columns, I think not every PR for string function native StringView support did this 🤔
I can do a sample PR and open several issues for string functions missing StringView SQL level tests

Thanks @2010YOUY01
The potential downside of doing that is that it will not evolve as we add new string functions (e.g. we add a new string function that doesn't handle StringView, how will we know?)
I wonder if we can potentially do something more automated like have the same queries and expected files and run them against different test cases.
I think we could do this in sqllogictest by separating the table definitions into different .slt files and then includeing the same queries file. Here is an example:
https://github.com/apache/datafusion/blob/02eab80cd62e02fcb68dee8b99d63aaac680a66c/datafusion/sqllogictest/test_files/join_disable_repartition_joins.slt#L26-L25

I filed https://github.com/apache/datafusion/issues/12415 to track the idea of a more systematic testing


Make hnmp.Table._rows an OrderedDict if possible (Python 2.7+)

This change ensures that SNMP.table.columns are in the same order as returned by the SNMP query. The difference is shown below:
Without OrderedDict:
>>> ifEntry = '<IP_ADDRESS>.<IP_ADDRESS>.1'
>>> snmp.table(ifEntry).columns[1]
(11, 13, 12, 16, 18, 1, 3, 2, 5, 4, 7, 6, 9, 8)

With OrderedDict:
>>> snmp.table(ifEntry).columns[1]
(1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 16, 18)

Thanks! hnmp doesn't support Python <2.7 at all, so I'll remove that compatibility check.


Deprecate project* attributes

This deprecates #[project], #[project_ref], and #[project_replace] attributes in favor of the naming of projected type.
Closes #225

Hm, deprecation of proc-macro requires Rust 1.40 (https://github.com/rust-lang/rust/pull/65666). I'll add a build script.

bors r+

Hmm... rustdoc doesn't seem to show deprecation note on re-export. https://docs.rs/pin-project/0.4.21/pin_project/#attributes
So, it needs to add descriptions to project attributes.


os.path.sep is not changed after switching fs.os to linux

Describe the bug
I'm running tests under windows using fs.os = OSType.LINUX. I noticed that os.path.sep is not faked.
How To Reproduce
import os
import pyfakefs
from pyfakefs.fake_filesystem import OSType

def test_sep_linux(fs):
    fs.os = OSType.LINUX
    assert os.path.sep == "/"
    # FAILED
    # Expected :/
    # Actual   :\\

Enviroment
>python -c "import platform; print(platform.platform())"
Windows-10-10.0.18362-SP0

>python -c "import sys; print('Python', sys.version)"
Python 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 24 2018, 00:16:47) [MSC v.1916 64 bit (AMD64)]

>python -c "from pyfakefs.fake_filesystem import __version__; print('pyfakefs', __version__)"
pyfakefs 4.3.2

Thanks - good catch! The same is true for os.sep, os.altsep, and os.path.altsep. Changing the OS type does not reset them.


Simplify titles

https://github.com/control-toolbox/OptimalControl.jl/blob/4418aba1a73eaf8e373c07892efb2f7dd80117b5/docs/src/tutorial-basic-example.md?plain=1#L34
Simplify the titles:

Optimal control problem
Solve and plot
State constraint
...

For all the basic examples.

Done!


Extra file on indigenous.abode.pub for Android

I didn't know exactly where to put the issue, so I opened it here.
I'm refactoring the authentication part in the Android app to support multiple accounts and not use the internal browser. For that I need something extra on a domain to trigger the app once the authentication has happened (usually on indieauth.com, but that doesn't matter in the end).
I have it working, but I guess it might be more interesting to host this on https://indigenous.abode.pub/ as it's the central place then for the Indigenous apps. I have a PHP file, but I'm not sure if that is supported on that server ? :)
It currently runs in a file called 'indigenous-android.php' - maybe the path could become something like /oauth/android', that's even cleaner :)
This is the code.
<?php
$code = isset($_GET['code']) ? $_GET['code'] : '';
$state = isset($_GET['state']) ? $_GET['state'] : '';
$url = 'indigenous-android://oauthcallback?code=' . $code . '&state=' . $state;
?>

  <title>Indigenous Android</title>
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <meta http-equiv="refresh" content="0; url=<?php print $url; ?>" />

Indigenous OAuth Sign in.

If Indigenous is not opening, <a href="<?php echo $url; ?>">click here

Apart from that, I have a new release now to support those multiple accounts, but it requires me to have a privacy policy. We'll have to add something on that domain there too.

Sounds good, I should probably have a privacy policy up there for iOS too since I’m hoping to publish it later this month in the app store

I realized this is really just a redirect, so I set up an nginx level redirect rather than using the PHP file. Prevents waiting for the browser refresh. The URL you can use to get the android callback is: https://indigenous.abode.pub/android/login/

The Privacy Policy, etc can be tracked in #225

Cool works, thanks!


Styling tweaks to new UI

New UI looks awesome but there are a few things left to fix.
This bug covers all style fixes besides adding subtopic graphs (#124) and minor font size & spacing changes I will fix in a follow up.
In priority order:

[ ] The footer shouldn't be sticky to the bottom of the window, it should scroll with the rest of the page.
(It's a good idea to put our brand front and center, but I'd rather fix this in a follow up and give the reader back the screen real estate. For now, fine to just have header scroll with the report.)

orb notes: layout management - 1 hour

[ ] Links should be blue.
[ ] Currently some links are bright red and look a bit like error states ("Back to Overview" buttons, hover behavior on "Sign in," "AI Objectives Institute" link, "TttC" hover).
[ ] The blue used for the hover state on the items in lists of representative arguments is a good one. For items on a dark background, instead of changing the text, those links should get a 10% opacity #FFF background on hover (note: I can make the hover change):

orb notes: css review - 1 hour

[ ] Language picker is 90% of the way there, but the arrow icon should be white, there should be no baseline, and the flag icon should be slightly bigger:

orb notes: might need to build this component from scratch / review other libs: 2 hours

[ ] Pipeline icon currently at bottom left corner should be at bottom right corner instead.
(For reports with many topics, icon may overlap with "Appendix" text; at bottom right, it will nearly always have space without blocking other elements.)

[ ] In the appendix, the "show code" and "show prompt" links should change to "hide code" and "hide prompt" links when clicked, so that the revealed code/prompt can be collapsed again. If you don't have time to get to this one this week, that's ok--this can be a fast follow-up

orb notes: 1 hour
Total 5 hours

the following changes would constitute a good-enough fix for the language picker (color fix, not flag sizing). may require !importants.
.mdc-select__dropdown-icon {
fill: #ffffff;
}
.smui-select--standard:not(.mdc-select--disabled) .mdc-line-ripple::before,
.smui-select--standard:not(.mdc-select--disabled):hover .mdc-line-ripple::before {
border-bottom-color: #ffffff;
}

looks great!


Connect-MsolService: Could not load file or assembly 'System.IdentityModel, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b77a5c561934e089'. The system cannot find the file specified.

Prerequisites

[X] Write a descriptive title.
[X] Make sure you are able to repro it on the latest released version
[X] Search the existing issues.
[X] Refer to the FAQ.
[X] Refer to Differences between Windows PowerShell 5.1 and PowerShell.

Steps to reproduce
I ma using MacOS Big Sur on Intel Platform. I have tried latest version of Powershell using
brew cask install powershell.
I am able to start powersehll with pwsh command after that I Install module using Install-Module MSOnline and Imported module with Import-Module MSOnline after that whenever I tried to run the command Connect-MsolService. I get following error message
Connect-MsolService: Could not load file or assembly 'System.IdentityModel, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b77a5c561934e089'. The system cannot find the file specified.
I have install .net SDK 5 to see if that solved the problem but it did not. Following is the $PSVersionTable command
Name                           Value

PSVersion                      7.1.4
PSEdition                      Core
GitCommitId                    7.1.4
OS                             Darwin 20.6.0 Darwin Kernel Version 20.6.0: Wed…
Platform                       Unix
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           <IP_ADDRESS>
WSManStackVersion              3.0
Expected behavior
Connect-MsolService command should work

Actual behavior
Connect-MsolService: Could not load file or assembly 'System.IdentityModel, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b77a5c561934e089'. The system cannot find the file specified.

Connect-MsolService: Could not load file or assembly 'System.IdentityModel, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b77a5c561934e089'. The system cannot find the file specified.

Error details
Connect-MsolService: Could not load file or assembly 'System.IdentityModel, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b77a5c561934e089'. The system cannot find the file specified.

Connect-MsolService: Could not load file or assembly 'System.IdentityModel, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b77a5c561934e089'. The system cannot find the file specified.

Environment data
PSVersion                      7.1.4
PSEdition                      Core
GitCommitId                    7.1.4
OS                             Darwin 20.6.0 Darwin Kernel Version 20.6.0: Wed…
Platform                       Unix
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           <IP_ADDRESS>
WSManStackVersion              3.0

Visuals
Connect-MsolService Command should work.

MSOnline  is too old and does not supported on PowerShell 7.

I don't see any resolution on this issue. So the resolution is Connect-MsolService doesn't work on Linux/MacOS? Can you clarify that? Is there a workaround? I'm not very satisfied with the current "resolution".

Hi there... I am experiencing the same. Please advise if anyone here has found resolution to this? Thank you

Correct. This does not work on MacOS PowerShell. This requires a Windows OS with the Sign-In Assistant Module loaded.

Is there any way to connect to the MSOL service on a linux ubuntu server?


Reduce number of item types

I have studied the examples given in #481 and think that we may not need all item types which we have at the moment. Here are two suggestions how we can reduce them:

Delete the item type periodical which seems identical to journal article and because it neither exists in the SciELO Publishing Schema nor in the CSL data schema. Even if someone wants to cite a special issue of a journal rather than a journal article (which is IMO very rare), this is still possible by using e.g. book with its fields.
Merge the item types report, clinical trial, and preprint, because they neither exists as separate item types in the SciELO Publishing Schema nor in the CSL data schema. The overall type could then look like:

Report.schema = {
  type: 'report',
  authors: { type: ['object'], default: [] },
  sponsors: { type: ['object'], default: [] },
  title: { type: 'string', optional: true },
  reportType : { type: 'string', optional: true },
  containerTitle: { type: 'string', optional: true },
  collectionTitle: { type: 'string', optional: true },
  collectionNumber: { type: 'string', optional: true },
  year: { type: 'string', optional: true },
  month: { type: 'string', optional: true },
  day: { type: 'string', optional: true },
  publisherName: { type: 'string', optional: true },
  publisherLoc: { type: 'string', optional: true },
  isbn: { type: 'string', optional: true },
  doi: { type: 'string', optional: true }
}

The sponsors are coming from the clinical tests, but I guess also other reports can be sponsored. We should certainly have the doi field for reports, but there might also be other reports which are printed by a publisher and therefore have an isbn. With reportType you could still indicate e.g. that this report is a preprint, clinical study or also a working paper is possible. The collectionTitle, collectionNumber (or is seriesTitle better) can for example hold the information like "Technical Report Series; 949" from example http://docs.scielo.org/projects/scielo-publishing-schema/pt_BR/1.8-branch/tagset/elemento-element-citation.html#relatorio-1 .  What do you think?

Oh, I see. Then I would suggest to keep this type, but rename it into newspaper-article. The term "periodical" is ambiguous, see e.g. here.

@zuphilip I agree it's ambiguous but I'm not sure newspaper-article is the right name either. Periodical, as eLife uses it, covers magazine articles (e.g. New Scientist or Which? Magazine or something like that) as well as newspapers. It's short-hand for any non-academic piece of periodical literature - as @Melissa37 says, something that has not been peer-reviewed.
I suppose going by the wikipedia article, it's covering 'popular' periodical literature.

"Periodicals" cover all literature appearing on a regular schedule, including magazines, newspapers but also scientific journals. That is IMO a standard definition supported also by Online Dictionary for Library and Information Science or the well-known reference work "Ulrich's International Periodicals Directory". At least I am not aware of any different definitions which would exclude scientific journals from periodicals.
CSL has all three types of articles:

article-magazine
article-journal with special fields DOI, volume, issue, editor
article-newspaper with special fields like edition (e.g. national, international or regional editions) and section (e.g. National, International, Business, Politics, Opinion, Features)

What that cover everything which we need also here?
Well I can think of book series or annual reports also as periodicals. Books appearing in book series can be treated as normal books and can make sure that there is a field for the book serie. Each annual report can be just treated as a report.

OK, we at eLife would be OK with @publication-types "magazine" and "newspaper" to replace "periodical"
Thanks

I just updated the Dar spec according to what has been proposed here. @substance/texture-contributors Please review:
https://github.com/substance/dar/blob/master/DarArticle.md#ref
@zuphilip regarding the section field in newspaper.. which JATS tag would you pick to represent that? See: https://jats.nlm.nih.gov/archiving/tag-library/1.1/element/element-citation.html
@zuphilip let's try to use JATS terminology when discussing requirements (with Melissa and the others) and then internally we map it to the schema properties (which I think should be aligned with CSL/JSON if possible). Maybe in EntityDatabase.js we could add comments for each property, referencing the corresponding JATS element, so we have one place to look up the mapping. I know it's quite some work to have all the converters and mappers in place but I hope those shouldn't change a lot in the future once we have them ready.
Thanks all for your work on this!

Maybe part-title would be suitable for section in newspapers?
For reports I suggest to also include the field series for things like "Technical Report Series; 949". I couldn't find a suitable JATS field to separate the series number.

Also started adding some hints to EntityDatabase.js where the properties do not match the JATS elements. See https://github.com/substance/texture/commit/9e0f4ffa81073751dd6f1e54435c4df5d0bc5228.


[stable/rabbitmq-ha] Updating StatefulSet apiVersion for kubernetes 1.16

Is this a new chart
No, bug fix for existing chart
What this PR does / why we need it:
StatefulSet from apps/v1beta1 was removed as part of k8s 1.16, this migrates to the stable version of the api, apps/v1.
https://kubernetes.io/blog/2019/07/18/api-deprecations-in-1-16/
Which issue this PR fixes
fixes #17561
Special notes for your reviewer:
I updated the minor version of the chart, rather than the patch, because this changes the minimum version of Kubernetes required. This can be adjusted to best reflect how you want to do versioning for the chart.
Checklist
[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]

[x] DCO signed
[x] Chart Version bumped
[x] Variables are documented in the README.md
[x] Title of the PR starts with chart name (e.g. [stable/chart])

/assign @steven-sheehy

Additional changes have been implemented.
The ingress from extensions/v1beta1 will be removed in 1.20, but the new apiVersion ,networking.k8s.io/v1beta1, would bring the minimum cluster version up to 1.14. Do we want to bump that as well now?

No, lets keep it at 1.9 compatibility for now.
/ok-to-test

/retest

It looks good. Can you test an upgrade from a previous version to this version locally to ensure this isn't a breaking change? I think it's compatible, but if it's not we need to bump the major version and add some upgrade notes.

Upgrading locally using didn't run into any issues 👍

Thanks for checking
/lgtm


fix: remove token generation scripts, workflows and related files

Description

Remove token generation scripts, files and workflows which are no longer needed.
What's included?

Deleted _generated folder from token library
Deleted token generation script and github workflow
Removed token generation command from package.json

General Tests for Every PR

[x] npm run start still works.
[x] npm run lint passes.
[x] npm run stylelint passes.
[x] npm test passes and code coverage is not lower.
[x] npm run build still works.

:tada: This PR is included in version 8.5.4 :tada:
The release is available on:

v8.5.4
GitHub release

Your semantic-release bot :package::rocket:


h5返回参数带[ ,会导致返回参数失败

"AgentWebUtils.isjson "  this function is not right,  when my params is not json

this is too simple ,can change a better method :"if (target.startsWith("[")) {"

callJs  not quickCallJs


--include or --exclude options doesn't seem to work at all

For example this excludes nothing:
coveralls --dryrun --root CMakeFiles/ --exclude-pattern "/usr/.*" --exclude-pattern "*.gtest.*"

According to the somewhat absent documentation, you would expect:

everything that starts with /usr/ should be excluded, but it's not
everything that contains gtest should be exclude, but it's not

I'm having the same issue, --exclude-pattern is not excluding any of the directories I specify.

I've spent a while playing with it, and got it to work for my needs. For anyone who's struggling like I did:

Ensure you set the root to the project root ( using the -r option). cpp-coveralls has a segment of code that discards parent directories, so if the root is set to a project subdirectory, you won't be able to get coverage on the rest of the project.

The excluding options apply to different stages of processing, confusingly.

The -exclude option will prevent files/directories from being run with gcov. Keep in mind the directories are relative to the root that you set with the -r option, even though gcov will print out paths such as "/usr/foo/bar.cpp".

The --exclude-pattern option is not used to determine what gets run with gcov, but instead it is used to filter out specific files/directories from being included in the report that gets sent to coveralls.io.

The -include option, similar to the --exclude-pattern option, is used to select specific files/directories to be included in the report. The -include option does not effect what gets run with gcov.

For my project, I have unit tests (using GTest), an example program, and benchmarking. To prevent cpp-coveralls from getting coverage of my example program and only get coverage using my unit tests, I had to be specific in my -exclude. Below is what I used in my .travis.yml to get coverage working for my project:
coveralls -r ..  -i "src/" -i "test/"   --exclude "utils" --exclude "benchmark" --exclude "example" --exclude "build/CMakeFiles/memory_allocator.dir/"  --gcov-options '-lp' --verbose
If you want to reference anything from my project, you can find it here https://github.com/adam-stamand/memory-allocators. Hope this helps somebody.

Which of "--exclude", "--exclude-pattern", or "--exclude-lines-pattern" would work in conjunction with the -l FILE option?
-l FILE, --lcov-file FILE
                        Upload lcov generated info file

I have a pre-existing coverage.info file. Uploading it with cpp-coveralls. Trying to exclude files with "--exclude-pattern".
The fix seems to be lcov --remove filename instead of using cpp-coveralls, for that particular step.
It would be great if @adam-stamand (or someone else) could add a new paragraph in the README that more verbosely clarifies the differences between "--exclude", "--exclude-pattern" and "--exclude-lines-pattern", since the description of all three seems to be "exclude file or directory".


Cursor is nil when subscribing to changes with no error

Hello.
I've been using GoRethink in a real-time system for three months and the performance is awesome. I'm very happy using this library to provide real-time updates to many mobile devices.
Although, sometimes the server dies because of a panic in Go and I was able to log this panic as follows.
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x20 pc=0x50bb16]

goroutine 325129 [running]:
panic(0x813860, 0xc82000a0d0)
	/usr/local/go/src/runtime/panic.go:481 +0x3e6
gopkg.in/dancannon/gorethink%2ev2.(*Cursor).bufferNextResponse(0xc825f10370, 0x0, 0x0)
	/Users/gustavoavila/Documents/gocode/src/gopkg.in/dancannon/gorethink.v2/cursor.go:668 +0x266
gopkg.in/dancannon/gorethink%2ev2.(*Cursor).seekCursor(0xc825f10370, 0x100000001, 0x0, 0x0)
	/Users/gustavoavila/Documents/gocode/src/gopkg.in/dancannon/gorethink.v2/cursor.go:606 +0xe7
gopkg.in/dancannon/gorethink%2ev2.(*Cursor).nextLocked(0xc825f10370, 0x74b260, 0xc826f2adc8, 0x1, 0x44f0d0, 0x0, 0x0)
	/Users/gustavoavila/Documents/gocode/src/gopkg.in/dancannon/gorethink.v2/cursor.go:206 +0x3c
gopkg.in/dancannon/gorethink%2ev2.(*Cursor).Next(0xc825f10370, 0x74b260, 0xc826f2adc8, 0x882540)
	/Users/gustavoavila/Documents/gocode/src/gopkg.in/dancannon/gorethink.v2/cursor.go:189 +0xb0
murealtime/database.SubscribeToCouriersChangefeeds(0xc825f10370, 0xc847c913e0)
	/Users/gustavoavila/Documents/gocode/src/murealtime/database/cliente.go:51 +0x7d
created by murealtime/aplicacionmensajero.subscribeToCourierChangefeeds
	/Users/gustavoavila/Documents/gocode/src/murealtime/aplicacionmensajero/connections_handler.go:62 +0x9a4

This panic occurs because, for some reason, sometimes I try to subscribe for changes in RethinkDB and I get a nil cursor with no error. My code is this:
func subscribeToCourierChangefeeds(globalCourierID int, ch chan<- model.JSON) (*r.Cursor, error) {
	cursor, error := r.Table("couriers").
		GetAll(globalCourierID).
		Pluck("name", "rating", "photo_url", "is_vip", "city_id", "is_express", "is_delivery", "courier_type", "last_known_latitude", "last_known_longitude").
		Changes().Run(database.Session)
	if error != nil {
		log.Error.Println("Error al suscribirse a los changefeeds del mensajero en la aplicación de los mensajeros: " + error.Error())
		return nil, error
	}
	go database.SubscribeToCouriersChangefeeds(cursor, ch)
	return cursor, nil
}

As you can see, I always verify if any errors occurred and immediately I return the function with this error, but for some reason no error is triggered with a nil cursor. Then, when I try to call the function in the database package, a panic is triggered at the line for cursor.Next(&change) { and the server dies :(
func SubscribeToCouriersChangefeeds(cursor *r.Cursor, ch chan<- model.JSON) {
	var change map[string](map[string]interface{})
	for cursor.Next(&change) {
		if cursor.Err() != nil {
			log.Error.Println("Error construyendo el mensajero del changefeed: " + cursor.Err().Error())
			continue
		}

		newVal := change["new_val"]
		oldVal := change["old_val"]

		var courier model.Courier
		var error error
		var action string

		if newVal != nil && oldVal == nil {
			error = encoding.Decode(&courier, newVal)
			action = model.ActionCourierAdded

		} else if oldVal != nil && newVal == nil {
			error = encoding.Decode(&courier, oldVal)
			action = model.ActionCourierDeleted

		} else {
			error = encoding.Decode(&courier, newVal)
			action = model.ActionCourierChanged
		}

		if error != nil {
			log.Error.Println("Error decodificando los datos de los changefeeds del mensajero: " + error.Error())
			continue
		}

		responseJSON := model.JSON{Action: action, Data: courier}
		ch <- responseJSON
	}
}

I return the cursor in the first function because I need to close the cursor when is no longer needed. This is my code:
courierChangefeedsChannel := make(chan model.JSON)
	courierCursor, errorSubscribingCourierChangefeeds := subscribeToCourierChangefeeds(globalCourierID, courierChangefeedsChannel)
	if errorSubscribingCourierChangefeeds != nil {
		return
	}
	defer closeCursor(courierCursor)

I would appreciate any help because this system is already in production.
Thanks.

Hi @gusavila92, really sorry that you are having this issue 😞  I have tried to fix it a couple of times before but have never been able to replicate it reliably. Although looking back I don't seem to have merged my previous fix! Could you try building your application with the hotfix/cursor-panic branch and see if that resolves the issue?
Regarding reproducing the bug how often does the panic occur? Are you able to make it panic reliably or does it just happen after the application has been running for a while?

Hi. I'll build a new app with the hotfix you mentioned. I hope this will fix the issue.
This is a big server and it dies once every three or two days, but this is the first time I log all the panics. I was just logging the "normal" errors. Maybe it died before for some other reasons, so I don't know whether it has to do with this error or not.
I'll get back to you if this error happens again with the hotfix.
Thanks.

@gusavila92 I have merged the hotfix to master with v2.2.1, could you let me know if your application is still panicking because of this bug?

@gusavila92 I have merged the hotfix to master with v2.2.1, could you let me know if your application is still panicking because of this bug?

No, it isn't panicking anymore. I think the bug is fixed.
Thank you.

Ok great 🎉  I will now close the issue. Thanks for the help! 😄