Add no_build_target option

Fixes #37. I assume there is a good reason why a target of None is unwrapped to install, but if not, we can skip adding an extra parameter and simply fall back to no target.

If this change can be rolled into a version update soon, it would be appreciated.

Re-opening the PR to trigger a rebuild...

Thanks!

Thanks for the merge, if this could be rolled into a version update soon I would appreciate it, since it's necessary to compile correctly on some targets.

Published!


Link on npmjs.com broken

Link on https://www.npmjs.com/package/@rebass/grid points at https://rebassjs.org/grid, which results in 404.

Should be pointing to https://grid.rebassjs.org now


Require Java 6

This is a blocker to the release.
As a result of all the work around adding new Op support, it turns out many of those ops all cause a VM Segfault on the latest version of Java 5, but all the functionality works unchanged on Java 6/7.
There is no way imgscalr can ship VM-crashing functionality.
Java 5 has been end-of-lifed and Java 6 has been around for 5 years. This is potentially a breaking change for anyone on Java 5 systems unfortunately, but it can't be any other way.
They will have to stay with imgscalr 3.2.

Fixed. Required in 4.0.


Migration guide from 0.7.1 to 0.8.0

I'm trying to update Dropwizard 0.7.1 to 0.8.0 in one of my applications. I could not get it to work for about 2 complete business days. I have compile errors in every class (really every class, I have no single class without compile errors). It is really hard to find information what to do. I had to search the internet for hours. That was the reason to stop the migration because it is a lot too expensive.
Am I the only one with these problems? I don't think so because I develop software for a long time and I don't think (or hope) that I'm really such bad. Can you please provide a migration guide what has to be done to upgrade Dropwizard?

There's currently a post on the mailing list that describes some migration steps - https://groups.google.com/d/msg/dropwizard-user/S4K3Ayfij3g/AzMBwJekfnEJ

Oh sorry, you are going from 0.7 to 0.8.  What sort of errors are you seeing?  Besides updating a lot of the Jersey Client stuff and then changing all of your unit tests to use assertj (those are the big ones), what else are you experiencing?

There is a post in the dropwizard-dev mailing list about migration from 0.7.1 to 0.8.
Most problem are caused by update to Jersey 2. We had to change a lot internally to fully support
it. Despite that migration could be painful, we had successfull feedback from people about updates to RC builds.
About documentation, you are right - we need some guide about migration. You are not the first, asking for that and refer people to the mailing discussion is not good.

I think a wiki could be useful, where everyone can add information about migration steps. For example I use a lot of Apache commons lang features which are now in a different package. Easy to solve if you know it. Can be hard to find if you first think the library was replaced by guava which provides nearly the same functionality.

I think the wiki is a good idea. Here is a first go:
https://github.com/dropwizard/dropwizard/wiki
We should limit it to documenting the upgrade process
On Wed, Mar 11, 2015 at 11:28 AM, Marcus Fihlon<EMAIL_ADDRESS>wrote:

I think a wiki could be useful, where everyone can add information about
migration steps. For example I use a lot of Apache commons lang features
which are now in a different package. Easy to solve if you know it. Can be
hard to find if you first think the library was replaced by guava which
provides nearly the same functionality.
—
Reply to this email directly or view it on GitHub
https://github.com/dropwizard/dropwizard/issues/934#issuecomment-78286019
.

Thanks @carlo-rtf, I started adding hints to the wiki.


New Resource: github_project_column and github_project_column_positions

Hi, this PR adds the abilities to

manage the projects' columns: github_project_column
maintain the ordering of the columns' positions: github_project_column_positions
into this provider.

It uses the APIs described in https://developer.github.com/v3/projects/columns/.
I have to admit that github_project_column_positions is a bit odd as it does not really create/destroy any resources on GitHub but only maintains the positions of the columns. I am not sure if this violates the philosophy of Terraform.
Would love to hear what you think about this. Thank you.

Hi @radeksimko, I've addressed your comments. Thank you so much for your time. As for github_project_column_positions, I have no strong opinion on this and don't mind at all if it is not merged. I believe that all the codes for github_project_column_positions are in separate commits from the github_project_column:

b38a803
7caaab3
88c152a

I can remove/revert those if you want.

@shihanng Thank you for making those changes, I squashed some commits to make the log a bit cleaner and I also removed the second _position resource as discussed.
Finally I added etag field in the spirit of https://github.com/terraform-providers/terraform-provider-github/pull/143


Setting EngineSettingsBuilder.MaximumOpenFiles to 0 prevents hashing from working

Tested on 3.0.0-beta.rev0106
While MaximumOpenFiles xmldocs say that setting it to 0 will result in unlimited file handles, in reality it seems to actually be 0 handles allowed. Hashing never finishes and no torrents can start.
To reproduce:
    using var client = new ClientEngine(new EngineSettingsBuilder
    {
       MaximumOpenFiles = 0,
    }.ToSettings());

    var torrentPath = @"E:\hi.torrent";
    var contentsPath = @"E:\test";

    var tc = new TorrentCreator
    {
        Name = "test torrent",
    };

    tc.Create(new TorrentFileSource(contentsPath, true), torrentPath);

    var torrent = Torrent.Load(torrentPath);

    var tm = await client.AddAsync(torrent, Path.GetDirectoryName(contentsPath));

    await tm.HashCheckAsync(false);
    // This line is never reached unless MaximumOpenFiles is set above 0
    Console.WriteLine(tm.Progress);

Whoops, yes! That's a regression. If you want to work around the problem for now, just set a limit greater than, or equal to, the number of files in a torrent... even setting it to 1000000 files should be fine!


Provide mouse position to collision detection algorithm

First off just wanted to say thanks for building this! Loving it so far and I've barely got it working.
My goal is to implement a version of useSortable that also allows dropping something inside another target.
I'm still working on this, but I believe in order to do so, I need to use a collision detection algorithm that takes into account the position of the cursor inside the dragging item since it's frequently the case that the draggable is over a droppable, but the cursor is not.
Any advice on how to achieve this with the existing architecture? Is the mouse position already being tracked somewhere that could be passed?

UPDATE: I realized this is as simple as keeping track of mousemove and using that to determine if the current mouse position is over a given rect.
import { CollisionDetection } from "@dnd-kit/core";

let currentMouse;
document.addEventListener("mousemove", (e) => {
  currentMouse = e;
});

const getIntersectionRatio = (entry) => {
  const { clientX, clientY } = currentMouse;
  const isWithinX =
    clientX > entry.offsetLeft && clientX < entry.offsetLeft + entry.width;
  const isWithinY =
    clientY > entry.offsetTop && clientY < entry.offsetTop + entry.height;

  if (isWithinX && isWithinY) {
    // Should compute a score to gauge how close to the center instead of a boolean
    return true;
  }
  return false;
};
/**
 * Returns the rectangle that is centermost with a given
 * rectangle in an array of rectangles.
 */
export const mouseOverIntersection: CollisionDetection = (entries, target) => {
  const intersections = entries.map(([_, entry]) =>
    getIntersectionRatio(entry)
  );

  // Once intersections returns a score, use that to determine the best match
  const firstIndex = intersections.findIndex(Boolean);
  if (firstIndex !== -1) {
    return entries[firstIndex][0];
  }
  return null;
};

This sounds very similar to https://github.com/clauderic/dnd-kit/issues/114 and https://github.com/clauderic/dnd-kit/issues/122.
If you get this working, please share back your finding in those issues 🙏

@jamesopti were you able to get this working? We are investigating implementing a combine+resort behavior, but given that theres only one concept of "over" I dont know how we would distinguish between dropping on top of vs dropping between without a fairly substantial refactor

This feature just landed thanks to https://github.com/clauderic/dnd-kit/pull/556, you can now access pointerCoordinates in collision detection algorithms.
It will make its way into the next major release, but if you're eager to try it out, you can install the latest versions of @dnd-kit packages tagged with next on npm:
npm install @dnd-kit/core@next

@clauderic this is great, I'll see if it helps but I think I actually need it in the SortingAlgorithms I think.
In rectSorting I need to be able to tell whether its in a combine location or a reorder location in order to tell the list that it shouldnt reorder when in a combine location. I did that by doing something like this:
let currentMouse: MouseEvent;
document.addEventListener('mousemove', (e) => {
  currentMouse = e;
});

const getIsInCombinePosition = (
  overIndex: ClientRect,
  currentMouse: MouseEvent
) => {
  const leftCombineBoundary = overIndex.left + overIndex.width * 0.25;
  const rightCombineBoundary = overIndex.right - overIndex.width * 0.25;
  const topCombineBoundary = overIndex.top - overIndex.height * 0.25;
  const bottomCombineBoundary = overIndex.bottom + overIndex.height * 0.25;

  const mouseX = currentMouse.x;
  const mouseY = currentMouse.y;

  return (
    mouseX > leftCombineBoundary &&
    mouseX < rightCombineBoundary &&
    mouseY > topCombineBoundary &&
    mouseY < bottomCombineBoundary
  );
};

This works to tell me if its in a combine location, but the sorting is giving me trouble since I dont have a way to tell the list to "go back to the original configuration when the item was lifted", which is the behavior that should occur when a combine is imminent.
If I could get this to work.. i assume I could do a similar check in the onDrop (for the mouse location) to take one of two actions (either the reorder or the combine)
Does this sound like a reasonable approach? Any advice to getting the list back to its original state before any reordering occurred during the same drag when the item is in a combine location?

I don't think that's the right mental model to think about that specific use-case. Sorting strategies should not be affected by the use-case of combining sortable elements. Sorting strategies should be pure, they should only be used to determine where a sortable should move in response to the over id changing.
I'm working on a change to collision detection strategies where they will return an array of collisions rather than a unique identifier:
export type Collision = [UniqueIdentifier, number];

export type CollisionDetection = (args: {
  active: Active;
  collisionRect: ClientRect;
  droppableContainers: DroppableContainer[];
  pointerCoordinates: Coordinates | null;
}) => Collision[];

The over property would remain a single UniqueIdentifier, and be the first item in the collisions array, but you could also access the collisions property which should give you everything you need to implement the combining functionality.
For example, you could create a collision detection strategy that returns a maximum of two droppable elements. The first element you return in the array could for example be the one that has the pointer within, which will be used to determine the over property (which in turn determines where sortable elements need to move via sorting strategies) and the second element can be another element that intersects more than 20% with the collision rect.
useDroppable and useSortable can have access to the collisions property and you could apply a different visual treatment to highlight the fact that there is a second colliding droppable.
The onDragMove, onDragOver and onDragEnd callbacks would be updated to receive the collisions array property. In the onDragEnd handler, you can decide what to do with the collisions array to decide if an element should be combined or moved to a new position.

For example, you could create a collision detection strategy that returns a maximum of two droppable elements. The first element you return in the array could for example be the one that has the pointer within, which will be used to determine the over property (which in turn determines where sortable elements need to move via sorting strategies) and the second element can be another element that intersects more than 20% with the collision rect.

This makes sense, I think this would need to be flipped. Thats kind of why I'm having an interesting time here. Reorder would be "the card is being dropped between two cards" where combine would be "the card is being dropped on top of a card"
The other issue is the concept of "revert list to default state with active card lifted in initial position if in combine state".. I dont know how given the last ordering and the current ordering how I might go back to an initial ordering. Do you think this would be doable given the solution described?

This makes sense, I think this would need to be flipped.

Perhaps I'm misunderstanding your use-case then, though you could flip it if you wanted.
I built this really quickly, but from what I understand you want something along these lines?
https://user-images.githubusercontent.com/1416436/148289017-87fe6a64-48f6-40f4-b712-82c08a5f3191.mp4

Ah, yea I was just coming back to say to scratch that part. What you have there looks great. Do you have an ETA on when this might be available, or is there any way I can help it along?

Meaning the array of collisions, not the combine list. I realize we will need to implement our own combine logic for the grid view

@sean-esper you can test your use-case against this WIP PR https://github.com/clauderic/dnd-kit/pull/558. In my example, I wrote some very scrappy code to determine if there was a matching "combining" element:
const {
  active,
  collisions,
  items,
  newIndex,
} = useSortable({
  id,
});

const newId = items[newIndex];

const [secondCollidingId, collisionRatio] =
  collisions && collisions.length > 1 ? collisions[1] : [];

const shouldCombine =
  secondCollidingId === newId &&
  collisionRatio != null &&
  id !== active?.id &&
  collisionRatio > X &&
  collisionRatio < Y;

@clauderic I pretty much plopped this code in with a grid view and it appears to work fine using the rectCollision detection. I copied over the grid story and made BasicWithCombine to test.. since thats basically the use case we have.
Seems to work pretty well even without much additional tweaking or custom collision detection using a threshold of 0.1.
Uploading Screen Recording 2022-01-06 at 9.16.18 AM.mov…

@sean-esper Looks pretty good!
I think for something like this to work really well, you have to write a custom collision detection algorithm that is specifically optimized for this type of use-case. You'll also need custom logic to handle keyboard events.
If I were writing a custom collision detection algorithm for this, I'd probably write a method that:

Finds the first matching droppable using a strategy similar to pointerWithin.
Finds the second matching droppable using a strategy similar to rect intersection
Optimize thresholds and add debounce the collision detection algorithm to reduce flickering

Yea makes sense. I didnt want to invest too much time until the PR settles and its clear we can move forward with this solution, but fundamentally it seem like it provides the information we need.
I notice that this is a breaking change which I assume will require a major version change. Do you intend to release it as an RC/beta that we can start building on?

@sean-esper there's already a major version release planned in the next couple of days, I'm debating whether to include one or two more breaking changes at the same time; stay tuned.

Youre my hero, thanks.

@sean-esper the PR has been merged, which means that it has made its way into the releases of @dnd-kit tagged with next on npm
You can install versions of @dnd-kit tagged with next as so:
npm install @dnd-kit/core@next
yarn add @dnd-kit/sortable@next

const newId = items[newIndex];

const [secondCollidingId, collisionRatio] =
  collisions && collisions.length > 1 ? collisions[1] : [];

const shouldCombine =
  secondCollidingId === newId &&
  collisionRatio != null &&
  id !== active?.id &&
  collisionRatio > X &&
  collisionRatio < Y;

Hey! First of all I wanna say that this library is amazing however I am having dificulties in the implementation of this kind of feature. I need to have some combine option to drop inside a draggable item. Can you give me more details about this implementation? I wanna recreate the example in the video. Thank for the help!
Best regards

If clauderic doesn't get back by Monday I can help out.
On Sat, Jan 15, 2022, 7:26 PM Nuno Caseiro @.***> wrote:

const newId = items[newIndex];
const [secondCollidingId, collisionRatio] =
collisions && collisions.length > 1 ? collisions[1] : [];
const shouldCombine =
secondCollidingId === newId &&
collisionRatio != null &&
id !== active?.id &&
collisionRatio > X &&
collisionRatio < Y;
Hey! First of all I wanna say that this library is amazing however I am
having dificulties in the implementation of this kind of feature. I need to
have some combine option to drop inside a draggable item. Can you give me
more details about this implementation? I wanna recreate the example in the
video. Thank for the help!
Best regards
—
Reply to this email directly, view it on GitHub
https://github.com/clauderic/dnd-kit/issues/127#issuecomment-1013789237,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AM6DWTFH2EUP3LWMDG5NU2LUWINEHANCNFSM4ZBEKD4Q
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you were mentioned.Message ID:
@.***>

Thank you bro! I appreciate that. I would like to know before monday but If it's boring for you I can wait :p

If clauderic doesn't get back by Monday I can help out.
…
On Sat, Jan 15, 2022, 7:26 PM Nuno Caseiro @.> wrote: const newId = items[newIndex]; const [secondCollidingId, collisionRatio] = collisions && collisions.length > 1 ? collisions[1] : []; const shouldCombine = secondCollidingId === newId && collisionRatio != null && id !== active?.id && collisionRatio > X && collisionRatio < Y; Hey! First of all I wanna say that this library is amazing however I am having dificulties in the implementation of this kind of feature. I need to have some combine option to drop inside a draggable item. Can you give me more details about this implementation? I wanna recreate the example in the video. Thank for the help! Best regards — Reply to this email directly, view it on GitHub <#127 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AM6DWTFH2EUP3LWMDG5NU2LUWINEHANCNFSM4ZBEKD4Q . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you were mentioned.Message ID: @.>

Thank you bro! I appreciate that. I would like to know before monday but If it's boring for you I can wait :p

I can try earlier, not that it's boring, family is kinda sick right now.
On Sat, Jan 15, 2022, 7:33 PM Nuno Caseiro @.***> wrote:

Thank you bro! I appreciate that. I would like to know before monday but
If it's boring for you I can wait :p
—
Reply to this email directly, view it on GitHub
https://github.com/clauderic/dnd-kit/issues/127#issuecomment-1013790492,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AM6DWTEBYRFPQWDN7HZYCDDUWIN65ANCNFSM4ZBEKD4Q
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you were mentioned.Message ID:
@.***>

I can try earlier, not that it's boring, family is kinda sick right now.
…
On Sat, Jan 15, 2022, 7:33 PM Nuno Caseiro @.> wrote: Thank you bro! I appreciate that. I would like to know before monday but If it's boring for you I can wait :p — Reply to this email directly, view it on GitHub <#127 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AM6DWTEBYRFPQWDN7HZYCDDUWIN65ANCNFSM4ZBEKD4Q . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you were mentioned.Message ID: @.>

No problem, I can wait. All the best to your family!

This is in no way production ready, and does not support keyboard, but here was a proof of concept I did to see if I thought it would work for me. I created a new grid story that included some rudimentary combine functionality. (I think this is also on an older commit, but in my work code its very similar)
You have to do 2 things, use the new collisions from the useSortable hook list to apply styles when it will combine vs reorder. Add the same logic in the onDropEnd check to verify whether the drop behavior is combine or reorder.
The right way to do this is to create a custom collision detection specifically for combine case. I haven't had time to work on that because I'm working on other parts of the tool I'm building. When I get there (no eta) and I think what I have come up with is generic and beautiful, I'll make a PR and maybe try to make this support more native. (Thats if nobody else beats me to it, and the solution I have works well for clauderic.
Anyway hopefully this diff gets you started
diff --git a/stories/2 - Presets/Sortable/3-Grid.story.tsx b/stories/2 - Presets/Sortable/3-Grid.story.tsx
index c253bd9..e1e2dd9 100644
--- a/stories/2 - Presets/Sortable/3-Grid.story.tsx
+++ b/stories/2 - Presets/Sortable/3-Grid.story.tsx
@@ -10,6 +10,7 @@ import {

 import {Sortable, Props as SortableProps} from './Sortable';
 import {GridContainer} from '../../components';
+import {SortableWithCombine} from './SortableWithCombine';

 export default {
   title: 'Presets/Sortable/Grid',
@@ -27,6 +28,30 @@ const props: Partial<SortableProps> = {

 export const BasicSetup = () => <Sortable {...props} />;

+export const BasicWithCombine = () => (
+  <SortableWithCombine
+    {...props}
+    getItemStyles={({shouldCombine}) => {
+      if (shouldCombine) {
+        return {backgroundColor: 'red'};
+      }
+      return {};
+    }}
+    Container={({children}: any) => (
+      <ul
+        style={{
+          width: 400,
+          display: 'flex',
+          flexDirection: 'row',
+          flexWrap: 'wrap',
+        }}
+      >
+        {children}
+      </ul>
+    )}
+  />
+);
+
 export const WithoutDragOverlay = () => (
   <Sortable {...props} useDragOverlay={false} />
 );
diff --git a/stories/2 - Presets/Sortable/SortableWithCombine.tsx b/stories/2 - Presets/Sortable/SortableWithCombine.tsx
new file mode 100644
index 0000000..7be10b1
--- /dev/null
+++ b/stories/2 - Presets/Sortable/SortableWithCombine.tsx
@@ -0,0 +1,396 @@
+import React, {useEffect, useRef, useState} from 'react';
+import {createPortal} from 'react-dom';
+
+import {
+  Announcements,
+  CollisionDetection,
+  DragOverlay,
+  DndContext,
+  DropAnimation,
+  defaultDropAnimation,
+  KeyboardSensor,
+  Modifiers,
+  MouseSensor,
+  MeasuringConfiguration,
+  PointerActivationConstraint,
+  ScreenReaderInstructions,
+  TouchSensor,
+  UniqueIdentifier,
+  useSensor,
+  useSensors,
+  Collision,
+  Active,
+  rectIntersection,
+} from '@dnd-kit/core';
+import {
+  arrayMove,
+  useSortable,
+  SortableContext,
+  sortableKeyboardCoordinates,
+  SortingStrategy,
+  rectSortingStrategy,
+  AnimateLayoutChanges,
+  NewIndexGetter,
+} from '@dnd-kit/sortable';
+
+import {createRange} from '../../utilities';
+import {Item, List, Wrapper} from '../../components';
+
+export interface Props {
+  activationConstraint?: PointerActivationConstraint;
+  animateLayoutChanges?: AnimateLayoutChanges;
+  adjustScale?: boolean;
+  collisionDetection?: CollisionDetection;
+  Container?: any; // To-do: Fix me
+  dropAnimation?: DropAnimation | null;
+  getNewIndex?: NewIndexGetter;
+  handle?: boolean;
+  itemCount?: number;
+  items?: string[];
+  measuring?: MeasuringConfiguration;
+  modifiers?: Modifiers;
+  renderItem?: any;
+  removable?: boolean;
+  reorderItems?: typeof arrayMove;
+  strategy?: SortingStrategy;
+  style?: React.CSSProperties;
+  useDragOverlay?: boolean;
+  getItemStyles?(args: {
+    id: UniqueIdentifier;
+    index: number;
+    isSorting: boolean;
+    isDragOverlay: boolean;
+    overIndex: number;
+    isDragging: boolean;
+    shouldCombine?: boolean;
+  }): React.CSSProperties;
+  wrapperStyle?(args: {
+    index: number;
+    isDragging: boolean;
+    id: string;
+  }): React.CSSProperties;
+  isDisabled?(id: UniqueIdentifier): boolean;
+}
+
+const defaultDropAnimationConfig: DropAnimation = {
+  ...defaultDropAnimation,
+  dragSourceOpacity: 0.5,
+};
+
+const screenReaderInstructions: ScreenReaderInstructions = {
+  draggable: `
+    To pick up a sortable item, press the space bar.
+    While sorting, use the arrow keys to move the item.
+    Press space again to drop the item in its new position, or press escape to cancel.
+  `,
+};
+
+export function SortableWithCombine({
+  activationConstraint,
+  animateLayoutChanges,
+  adjustScale = false,
+  Container = List,
+  collisionDetection = rectIntersection,
+  dropAnimation = defaultDropAnimationConfig,
+  getItemStyles = () => ({}),
+  getNewIndex,
+  handle = false,
+  itemCount = 16,
+  items: initialItems,
+  isDisabled = () => false,
+  measuring,
+  modifiers,
+  removable,
+  renderItem,
+  reorderItems = arrayMove,
+  strategy = rectSortingStrategy,
+  style,
+  useDragOverlay = true,
+  wrapperStyle = () => ({}),
+}: Props) {
+  const [items, setItems] = useState<string[]>(
+    () =>
+      initialItems ??
+      createRange<string>(itemCount, (index) => (index + 1).toString())
+  );
+  const [activeId, setActiveId] = useState<string | null>(null);
+  const sensors = useSensors(
+    useSensor(MouseSensor, {
+      activationConstraint,
+    }),
+    useSensor(TouchSensor, {
+      activationConstraint,
+    }),
+    useSensor(KeyboardSensor, {
+      coordinateGetter: sortableKeyboardCoordinates,
+    })
+  );
+  const isFirstAnnouncement = useRef(true);
+  const getIndex = items.indexOf.bind(items);
+  const getPosition = (id: string) => getIndex(id) + 1;
+  const activeIndex = activeId ? getIndex(activeId) : -1;
+  const handleRemove = removable
+    ? (id: string) => setItems((items) => items.filter((item) => item !== id))
+    : undefined;
+  const announcements: Announcements = {
+    onDragStart(id) {
+      return `Picked up sortable item ${id}. Sortable item ${id} is in position ${getPosition(
+        id
+      )} of ${items.length}`;
+    },
+    onDragOver(id, overId) {
+      // In this specific use-case, the picked up item's `id` is always the same as the first `over` id.
+      // The first `onDragOver` event therefore doesn't need to be announced, because it is called
+      // immediately after the `onDragStart` announcement and is redundant.
+      if (isFirstAnnouncement.current === true) {
+        isFirstAnnouncement.current = false;
+        return;
+      }
+
+      if (overId) {
+        return `Sortable item ${id} was moved into position ${getPosition(
+          overId
+        )} of ${items.length}`;
+      }
+
+      return;
+    },
+    onDragEnd(id, overId) {
+      if (overId) {
+        return `Sortable item ${id} was dropped at position ${getPosition(
+          overId
+        )} of ${items.length}`;
+      }
+
+      return;
+    },
+    onDragCancel(id) {
+      return `Sorting was cancelled. Sortable item ${id} was dropped and returned to position ${getPosition(
+        id
+      )} of ${items.length}.`;
+    },
+  };
+
+  useEffect(() => {
+    if (!activeId) {
+      isFirstAnnouncement.current = true;
+    }
+  }, [activeId]);
+
+  return (
+    <DndContext
+      announcements={announcements}
+      screenReaderInstructions={screenReaderInstructions}
+      sensors={sensors}
+      collisionDetection={collisionDetection}
+      onDragStart={({active}) => {
+        if (!active) {
+          return;
+        }
+
+        setActiveId(active.id);
+      }}
+      onDragEnd={({over, collisions, active}) => {
+        const [secondCollidingId, collisionRatio] =
+          collisions && collisions.length > 1 ? collisions[1] : [];
+        if (secondCollidingId) {
+          const shouldCombine =
+            secondCollidingId !== active.id &&
+            collisionRatio != null &&
+            collisionRatio > 0.1 &&
+            collisionRatio < 0.4;
+          if (shouldCombine && activeId) {
+            const newItems = Object.assign([], items);
+            console.log('COMBINING: ', activeId, ' with ', secondCollidingId);
+            newItems.splice(getIndex(activeId), 1);
+            setItems(newItems);
+            return;
+          }
+        }
+
+        if (over) {
+          const overIndex = getIndex(over.id);
+          if (activeIndex !== overIndex) {
+            setItems((items) => reorderItems(items, activeIndex, overIndex));
+          }
+        }
+        setActiveId(null);
+      }}
+      onDragCancel={() => setActiveId(null)}
+      measuring={measuring}
+      modifiers={modifiers}
+    >
+      <Wrapper style={style} center>
+        <SortableContext items={items} strategy={strategy}>
+          <Container>
+            {items.map((value, index) => (
+              <SortableItem
+                key={value}
+                id={value}
+                handle={handle}
+                index={index}
+                style={getItemStyles}
+                wrapperStyle={wrapperStyle}
+                disabled={isDisabled(value)}
+                renderItem={renderItem}
+                onRemove={handleRemove}
+                animateLayoutChanges={animateLayoutChanges}
+                useDragOverlay={useDragOverlay}
+                getNewIndex={getNewIndex}
+              />
+            ))}
+          </Container>
+        </SortableContext>
+      </Wrapper>
+      {useDragOverlay
+        ? createPortal(
+            <DragOverlay
+              adjustScale={adjustScale}
+              dropAnimation={dropAnimation}
+            >
+              {activeId ? (
+                <Item
+                  value={items[activeIndex]}
+                  handle={handle}
+                  renderItem={renderItem}
+                  wrapperStyle={wrapperStyle({
+                    index: activeIndex,
+                    isDragging: true,
+                    id: items[activeIndex],
+                  })}
+                  style={getItemStyles({
+                    id: items[activeIndex],
+                    index: activeIndex,
+                    isSorting: activeId !== null,
+                    isDragging: true,
+                    overIndex: -1,
+                    isDragOverlay: true,
+                  })}
+                  dragOverlay
+                />
+              ) : null}
+            </DragOverlay>,
+            document.body
+          )
+        : null}
+    </DndContext>
+  );
+}
+
+interface SortableItemProps {
+  animateLayoutChanges?: AnimateLayoutChanges;
+  disabled?: boolean;
+  getNewIndex?: NewIndexGetter;
+  id: string;
+  index: number;
+  handle: boolean;
+  useDragOverlay?: boolean;
+  onRemove?(id: string): void;
+  style(values: any): React.CSSProperties;
+  renderItem?(args: any): React.ReactElement;
+  wrapperStyle({
+    index,
+    isDragging,
+    id,
+  }: {
+    index: number;
+    isDragging: boolean;
+    id: string;
+  }): React.CSSProperties;
+}
+
+export function SortableItem({
+  disabled,
+  animateLayoutChanges,
+  getNewIndex,
+  handle,
+  id,
+  index,
+  onRemove,
+  style,
+  renderItem,
+  useDragOverlay,
+  wrapperStyle,
+}: SortableItemProps) {
+  const {
+    active,
+    attributes,
+    collisions,
+    isDragging,
+    isSorting,
+    items,
+    listeners,
+    newIndex,
+    overIndex,
+    setNodeRef,
+    transform,
+    transition,
+  } = useSortable({
+    id,
+    animateLayoutChanges,
+    disabled,
+    getNewIndex,
+  });
+
+  const shouldCombine = getShouldCombine(
+    id,
+    items,
+    newIndex,
+    collisions,
+    active
+  );
+
+  return (
+    <Item
+      ref={setNodeRef}
+      value={id}
+      disabled={disabled}
+      dragging={isDragging}
+      sorting={isSorting}
+      handle={handle}
+      renderItem={renderItem}
+      index={index}
+      style={style({
+        index,
+        id,
+        isDragging,
+        isSorting,
+        overIndex,
+        shouldCombine,
+      })}
+      onRemove={onRemove ? () => onRemove(id) : undefined}
+      transform={transform}
+      transition={!useDragOverlay && isDragging ? 'none' : transition}
+      wrapperStyle={wrapperStyle({index, isDragging, id})}
+      listeners={listeners}
+      data-index={index}
+      data-id={id}
+      dragOverlay={!useDragOverlay && isDragging}
+      {...attributes}
+    />
+  );
+}
+
+const getShouldCombine = (
+  id: string,
+  items: string[],
+  newIndex: number,
+  collisions: Collision[] | null,
+  active: Active | null
+) => {
+  if (!items) {
+    return false;
+  }
+  const newId = items[newIndex];
+
+  const [secondCollidingId, collisionRatio] =
+    collisions && collisions.length > 1 ? collisions[1] : [];
+
+  return (
+    secondCollidingId === newId &&
+    collisionRatio != null &&
+    id !== active?.id &&
+    collisionRatio > 0.1 &&
+    collisionRatio < 0.4
+  );
+};

Amazing! I will try out. Thank you so much

I think the one thing youll need to change from that diff is the collision data shape changed iirc. Instead of a tuple its an object now and the collision ratio is under value.
This is my more up-to-date shouldCombine
const getShouldCombine = (
  id: string,
  items: string[],
  newIndex: number,
  collisions: Collision[] | null,
  active: Active | null
) => {
  if (!items) {
    return false;
  }
  const newId = items[newIndex];

  if (!collisions || collisions.length < 2) {
    return false;
  }

  const { id: secondCollidingId, data: collisionData } = collisions[1];

  if (!collisionData) {
    return false;
  }
  const collisionRatio = collisionData.value;

  // NOTE: This can be improved with a custom dnd-kit collision detection
  return (
    secondCollidingId === newId &&
    collisionRatio != null &&
    id !== active?.id &&
    collisionRatio > 0.1 &&
    collisionRatio < 0.4
  );
};

I think the one thing youll need to change from that diff is the collision data shape changed iirc. Instead of a tuple its an object now and the collision ratio is under value.
This is my more up-to-date shouldCombine
const getShouldCombine = (
  id: string,
  items: string[],
  newIndex: number,
  collisions: Collision[] | null,
  active: Active | null
) => {
  if (!items) {
    return false;
  }
  const newId = items[newIndex];

  if (!collisions || collisions.length < 2) {
    return false;
  }

  const { id: secondCollidingId, data: collisionData } = collisions[1];

  if (!collisionData) {
    return false;
  }
  const collisionRatio = collisionData.value;

  // NOTE: This can be improved with a custom dnd-kit collision detection
  return (
    secondCollidingId === newId &&
    collisionRatio != null &&
    id !== active?.id &&
    collisionRatio > 0.1 &&
    collisionRatio < 0.4
  );
};

Thank you for the help! In regard of collisions prop in the useSortable.. Are you using the next version of core and sortable packages? Im asking because it says that there is no atribute named collisions on that type

Yes you need to use next. This is an unreleased breaking change

Actually the collisions property was moved out of useDraggable / useDroppable / useSortable because it's not used in those hooks, and it's a property that changes very frequently, which was causing a lot of needless re-renders of components that use those hooks.
It's available under useDndContext() now.
import {useDndContext} from '@dnd-kit/core';
import {useSortable} from '@dnd-kit/sortable';

function MyComponent() {
  const {active, listeners, ...} = useSortable({id});
  const {collisions} = useDndContext();

Ah sorry I didn't catch that change
On Sun, Jan 16, 2022, 9:31 AM Claudéric Demers @.***>
wrote:

Actually the collisions property was moved out of useDraggable /
useDroppable / useSortable because it's not used in those hooks, and it's
a property that changes very frequently, which was causing a lot of
needless re-renders of components that use those hooks.
It's available under useDndContext() now.
import {useDndContext} from @./core';import {useSortable} from @./sortable';
function MyComponent() {
const {active, listeners, ...} = useSortable({id});
const {collisions} = useDndContext();
—
Reply to this email directly, view it on GitHub
https://github.com/clauderic/dnd-kit/issues/127#issuecomment-1013897073,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AM6DWTHMRBJOMJRCGECHRT3UWLQGXANCNFSM4ZBEKD4Q
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you were mentioned.Message ID:
@.***>

Thanks for the help @clauderic :) Are you planning to introduce in the near future the combine option like react beautiful dnd has?

Hi @clauderic, could you please provide a code example with a sortable list like you did in the demo, but with the keyboard accessibility as well?

This makes sense, I think this would need to be flipped.

Perhaps I'm misunderstanding your use-case then, though you could flip it if you wanted.
I built this really quickly, but from what I understand you want something along these lines?
screencast.2022-01-05.16-00-03.mp4

Where should I get the example code for this??


CI Export job is failing

See: https://ci.inria.fr/pharo/view/Pharo bootstrap/job/Pharo-6.0-Bootstrap-Git-Export/280/console
We are loading the correct iceberg version:
github://npasserini/iceberg:dev-0.4-pre-multi-remotes [3652cd8:dev-0.4-pre-multi-remotes]
But apparently our export script is failing with a DNU:
'Errors in script loaded from /builds/workspace/Pharo-6.0-Bootstrap-Git-Export/scripts/export.st'
MessageNotUnderstood: receiver of "fileOut:on:" is nil
UndefinedObject(Object)>>doesNotUnderstand: #fileOut:on:
UndefinedObject>>DoIt

Looks like the class MCFileTreeGitWriter is missing.

I ran a git bisect from 73834208c0b4e51d3081330b7f8eab96a717e006, and I arrive to the guilty commit:
8b9803e2533befa4ff9f9adf834a3335e6d5d13a
The good commit we should tag should be:
97f0e79dddc5495fbfdb333e52da2d180cc2e39f

I just fixed the tag in iceberg:
git tag --delete dev-0.4-pre-multi-remotes
git push --delete origin dev-0.4-pre-multi-remote

git checkout 97f0e79dddc5495fbfdb333e52da2d180cc2e39f
git tag --delete dev-0.4-pre-multi-remotes
git checkout master
git push --follow-tags

Export is fixed:
https://ci.inria.fr/pharo/view/Pharo bootstrap/job/Pharo-6.0-Bootstrap-Git-Export/
https://github.com/guillep/pharo-core/commit/2f2f9deaf379d1219fefee01e2ec06e9d0cda825


"Add to watch" command/shortcut

This is neat function but it isn't declared as command so you always need to use "Add watch" button.
I want to implement add to watch command for atom:

Check if selected text is evaluatable(evaluable, able to eval?)/variable
Add to watch if 1 is true
Show error if not

I think it would be great to add shortcut for that, maybe ctrl-alt-enter. Any ideas?

ctrl-alt-enter would conflict with this PR.

@willwhitney would you merge this if I create PR?

Yup, this would be a great addition. Probably just create a command with no default shortcut for right now so people can map it however they like.
It's probably not possible to check whether the code is valid in a safe way. The best thing might be to add it unconditionally and let the user see the error in the output of the watch expression just as they usually would.

https://github.com/willwhitney/hydrogen/pull/122


Thread-safety issues with HttpRuntime.WebObjectActivator, HttpContext.Current and ConfigureAwait(false)

In my main project that uses AspNetDependencyInjection, I noticed at least one places where after an await someTask.ConfigureAwait(false); a call is made to HttpContext.Current (and possibly HttpRuntime.WebObjectActivator) to instantiate a Control subclass (with injected constructor services) when it came to rendering the page, which fails because the code is running on a separate thread from the thread that "owns" the HttpContext. There may also be issues with this project's HttpContextAccessor too.
There could be a multiple reasons for this - warrants further investigation.
But I did think of a way for threads to get the original HttpContext reference regardless of thread: by storing an immutable thread-id inside HttpContextAccessor, and using a ConcurrentDictionary that maps thread-ids to WeakReference wrappers of HttpContext. The thread-it can be found

See what aspnet:UseTaskFriendlySynchronizationContext does exactly - doesn't it render this whole thing moot because it provides an AsyncLocal synchronization context? In which case, the only thing that needs fixing is to ensure .ConfigureAwait(true) (not false) is used before resuming in the render section of a request lifetime?
If there isn't a request-id feature built-in to ASP.NET, consider adding our own inside the DI HttpModule.
I still need to get around to exposing better direct access to the global and scoped DI container so services and components can safely use GetService/GetRequiredService regardless of the thread they're on - this could be done through HttpContextAccessor instead of (currently, as of 2019-12) requiring them to use HttpRuntime.WebObjectActivator as a workaround.

Hi, I just read this article before your issue. I think they are related, although I don't understand 100% yet. My apologies if It is something known. Thanks for your work


iPhone X support

When presenting the IDMPhotoBrowser, the "Done" button is obscured by the sensor housing notch:

The top half of the "Done" button doesn't respond to touch events.

I just checked if the device is iphone X or not set the top inset of done button as shown below:
browser.doneButtonTopInset = 50.0f;
This will shift the done button little below.

@PrakashMaharjan Right, but ideally the IDMPhotoBrowser would respect the safe insets property

I went with this for now…
if (@available(iOS 11.0, *)) {
    browser.doneButtonTopInset = MAX(browser.doneButtonTopInset, viewController.view.safeAreaInsets.top);
}

A more robust improvement that used the auto-layout constraints would be preferred.

Isn't this closed by https://github.com/thiagoperes/IDMPhotoBrowser/pull/282

is this solved yet?


Update package.json

add .volt and .phtml extensions

Hi @kideny, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!

This seems like a small (but important) contribution, so no Contribution License Agreement is required at this point. Real humans will now evaluate your PR.

TTYL, MSBOT;

Thanks @kideny !

I changed .phtml to associate to php as before.


TypeError: Cannot read properties of undefined (reading 'subscribe')

I know this isn't mantained anymore but thought I'd add an issue I'm facing and if someone knows how I can get around this?
Amazon Linux 2023 [EC2]
Node.js v18.16.0
Steps to reproduce:

Install based on instructions on README
Run: node app.js
Unable to start and following error code is presented:

Error Code:
Refresh Token Updated
Found location: [LOCATION]
	 - Found Doorbell Gen 2 named Front Door.
/home/ec2-user/ring-to-android-tv/app.js:142
            camera.onNewDing.subscribe(async ding => {
                             ^

TypeError: Cannot read properties of undefined (reading 'subscribe')
    at /home/ec2-user/ring-to-android-tv/app.js:142:30
    at Array.forEach (<anonymous>)
    at /home/ec2-user/ring-to-android-tv/app.js:138:26
    at Array.forEach (<anonymous>)
    at startCameraPolling (/home/ec2-user/ring-to-android-tv/app.js:134:15)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Are you able to successfully use the --test flag with the script?

Not a direct answer but I actually moved to home assistant which provides the same functionality with more community support.
…
On Tue, May 23, 2023, 6:58 AM ZuberousMaximus @.> wrote: I know this isn't mantained anymore but thought I'd add an issue I'm facing and if someone knows how I can get around this? Amazon Linux 2023 [EC2] Node.js v18.16.0 Steps to reproduce: 1. Install based on instructions on README 2. Run: node app.js 3. Unable to start and following error code is presented: Error Code: Refresh Token Updated Found location: [LOCATION] - Found Doorbell Gen 2 named Front Door. /home/ec2-user/ring-to-android-tv/app.js:142 camera.onNewDing.subscribe(async ding => { ^ TypeError: Cannot read properties of undefined (reading 'subscribe') at /home/ec2-user/ring-to-android-tv/app.js:142:30 at Array.forEach () at /home/ec2-user/ring-to-android-tv/app.js:138:26 at Array.forEach () at startCameraPolling (/home/ec2-user/ring-to-android-tv/app.js:134:15) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) — Reply to this email directly, view it on GitHub <#32>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARKBETMABXIORRGAEKHHGXLXHS7AXANCNFSM6AAAAAAYL6EQVI . You are receiving this because you are subscribed to this thread.Message ID: @.>

Interesting, I use home assistant as well. What are you using to display notifications on Android TV?

Are you able to successfully use the --test flag with the script?

yes weirdly works fine with the test flag
Attempting to get demo snapshot... Refresh Token Updated Attempting to get snapshot for location #0, camera #0 Snapshot size: 30 kb Snapshot saved! Sent notification successfully: Test Snapshot - This is a test snapshot message!


nextcloud-client: 3.5.4 -> 3.6.0

Automatic update generated by nixpkgs-update tools. This update was made based on information from https://github.com/nextcloud/desktop/releases.
meta.description for nextcloud-client is: "Nextcloud themed desktop client"
meta.homepage for nextcloud-client is: "https://nextcloud.com"
meta.changelog for nextcloud-client is: ""
Updates performed

Version update

To inspect upstream changes

Release on GitHub

Compare changes on GitHub

Impact

Checks done (click to expand)

built on NixOS
The tests defined in passthru.tests, if any, passed
found 3.6.0 with grep in /nix/store/1nklvps3sb6rf3afrvhlzxp5g4ysg66w-nextcloud-client-3.6.0
found 3.6.0 in filename of file in /nix/store/1nklvps3sb6rf3afrvhlzxp5g4ysg66w-nextcloud-client-3.6.0

Rebuild report (if merged into master) (click to expand)

1 total rebuild path(s)

1 package rebuild(s)

First fifty rebuilds by attrpath
nextcloud-client

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/1nklvps3sb6rf3afrvhlzxp5g4ysg66w-nextcloud-client-3.6.0 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A nextcloud-client https://github.com/r-ryantm/nixpkgs/archive/22540cbab9ec1e2e01e229b67fca8306f742202c.tar.gz

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/1nklvps3sb6rf3afrvhlzxp5g4ysg66w-nextcloud-client-3.6.0
ls -la /nix/store/1nklvps3sb6rf3afrvhlzxp5g4ysg66w-nextcloud-client-3.6.0/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review run on x86_64-linux 1

1 package built:

nextcloud-client

Maintainer pings
cc @Kranzes @SuperSandro2000 for testing.

Is this workaround still required?
    # See also: https://bugreports.qt.io/browse/QTBUG-85967
    "--set QML_DISABLE_DISK_CACHE 1"

The mentioned bug got closed in February 2022

Is this workaround still required?

According to my test, it isn't.


Missing prototype in CheckboxesWidget.js

Reasons for making this change
Missing prototype in CheckboxesWidget.js
Referencing issue:
https://github.com/mozilla-services/react-jsonschema-form/issues/413
Checklist

[ ] I'm updating documentation

[ ] I've checked the rendering of the Markdown text I've added
[ ] If I'm adding a new section, I've updated the Table of Content

[x ] I'm adding or updating code

[ ] I've added and/or updated tests
[ ] I've updated docs if needed

[ ] I'm adding a new feature

[ ] I've updated the playground with an example use of the feature

OK ... that didn't work the way I wanted .... I only want one of those patches in this PR :(

Also ... that failed auto-test was a syntax error fixed in a later commit.  Obviously this system requires each individual commit to be good, rather than the set?
Anyway really I just wanted 	c7a7b4a in this PR.  For the life of my though I can't find how to select/deselect the commits I want in my PR ... I'll keep looking and reading.
Sorry for the confusion, but I will get better at this!

Hey now worries, things always have to be learned at some point ;)
Try to learn about rebasing, this is exactly what you need here; the idea would be to force push your branch rebased with your single commit here. There are a lot of good tutos out there about this!

Thanks Nicholas ... will do! :)

Fixed by #416


Allow ChannelPool to refresh its channels and perform actions during channel creation to prime channels

Long lived connections gets torn down periodically by the server forcing clients to reconnect. The first request that establishes the connection can often be expensive because it might need to perform tasks such as TCP/TLS handshake, auth, cache warmup, etc. Due to the abrupt disconnect and expensive initial request, the client sees a spike in latency.
It would be nice to have the capability from the client side to be proactive and establish new connections to the server before the server kills long lived connections.
For example, every 55 minutes, the ChannelPool

creates a new channel
sends a priming request to establish the connection
swap the existing channel with the new one
shutdown the old channel

By doing this, the "timer" from the server gets reset. The client is completely unaware of this and continues sending requests on the new channel as if nothing has happened.

How long does this really take? If it's only every 55 minutes, I'm not sure this optimization buys us much.

It was designed and implemented by @tonytanger, reviewed by @igorbernstein2 and @vam-google . Verified with @igorbernstein2 that the issue can be closed.


Compute multihit combined pval more efficiently

Progress on multihit

Would it be possible to change the strtoull and std::strtoull calls to Util::fast_atoi?

Yes, I think there is no problem changing them. Should I do it for all the strtoull in the multihit part of code?

This would be great!


etcdserver, storage: wait for physical compaction if already compacted

/cc @gyuho

lgtm. Thanks!

merging on greenlight


Sd updates

Updated links to  new video tutorials and  old text in FAQ

changed registry into register, harmonized sensitive data abbreviation, added link to new video tutorials


Bug: renaming an Environment while it is shown does not update the screen title

Steps to reproduce:

create an environment with the name "Example"
click on this environment in the drawer
rename the environment to "Kitchen"
close the drawer

The screen title still is the previous title ("Example"), not the updated one ("Kitchen").

I will check this!

This issue imply:

[x] the one you described above
[x] update the title only if the activity is the same that is already shown

when an environment is deleted and favourites are shown:

[x] update the title (app_name)
[x] hide fab
[x] show loader

This 8ac5bff commit fix the issue


Added packages required to build on OSX

These packages were needed when trying to build on OSX 10.12.6.
$ node --version && npm --version
v6.11.0
5.3.0

@joaocc as far as I can tell, this isn't required to build on Mac. What are you seeing that leads you to think this change is necessary?

This appears to not be necessary.


Question: Login into SAP without captcha and cookies?

Hay,
I am currently working on automated tests for a SAP Fiori application. I am using the WDI5 framework for this. Unfortunately, as soon as I call my application via the test, I have the problem that I have to log in to SAP and accept cookies. Logging in itself was not a problem at the beginning, but as soon as I have logged in for example 5x, I have to solve a captcha.
Do you happen to know how I can solve the problem with the captcha and cookies or is there a solution in the WDI5 framework?
I have already researched a lot but have not found a solution yet.
Thanks in advance!

yeah, we hear this quite often that with the default SAP Cloud IdP on BTP, the Captcha breaks automation flows.
Unfortunately, there is no reliable remedy in wdi5 for that as of now 😢
But: thanks to the sublime debug powers of @jasper07, we were able to introduce a way to circumvent the biometric auth prompt in Work Zone.
Now, I wonder: when the Captcha prompt appears - and you look at the cookies 🍪 in the debug console - might there be a similar identifiable cookie that could be used in wdi5 to circumvent the Captcha prompt?
If you find sth here, I'd be game to help pour this into code...

The problem with cookies is that they do not always appear. The last time I tried, they were no longer there. I don't know what the reason is.
Unfortunately I did not find anything about the cookies regarding the captcha.
However, I have another question, is it possible to use both the BTP authentication variant and the Basic authentication at the same time? That is I log in directly with BTP at the beginning and then log in with Basic Authentication to another tool on the website


Modify the credential selection process during credential share

Describe the bug
The credential selection process needs to change during credential share.

The first credential should be auto selected
The selected credential should be highlighted in green (colour may change based on theme)
The radio button from the credentials should be removed

Pre-requisite
The application should have at least one credential to share.
To Reproduce
Steps to reproduce the behaviour:

Open the application
Click on the QR code scanner
Scan the verifier QR code to connect with the verifier application
Share credential screen is shown below

Expected behaviour

The first credential should be auto selected
The selected credential should be highlighted in green (colour may change based on theme)
The radio button from the credentials should be removed

Screenshots

Smartphone (please complete the following information):
Not Applicable
Additional context
Enhancement as discussed with Sasi on 24th Feb 2023.

The following PRs implements auto selection of first VC on the consent page:
PR for mosip/tuvali: https://github.com/mosip/tuvali/pull/28
PR for mosip/inji: https://github.com/mosip/inji/pull/595, https://github.com/mosip/inji/pull/597
The PRs have been merged in 28-02-2023 Release and the latest commit id on mosip/inji/develop is 7cdee82

The following UI enhancement improves UX by highlighting the selected VC with green border and eliminates the radio button from the VCs on share-screen.
PR for mosip/tuvali: https://github.com/mosip/tuvali/pull/29
PR for mosip/inji: https://github.com/mosip/inji/pull/615
The PRs have been merged in 06-03-2023 Release and the latest commit id on mosip/inji/develop is https://github.com/mosip/inji/commit/8867f3cc2dda5fb19c003f85524a8f5cfce61303

The selected credential should be highlighted in green (colour may change based on theme)

@krishnakumar4a4 Right now the agreed upon colour is green for the VC border let me know if a change has been requested for the same.

The selected credential is getting highlighted in green for both orange and purple themes and radio button from VC is removed.
Attaching the screenshot for the reference.

This is fixed as part of release v0.9.1


Update .buildpacks

Fix link to heroku-buildpack-graphviz

Coverage remained the same at 88.21% when pulling f180f26f1d179333f69c5a8da4d37ede0ddc9b4b on grawn:patch-1 into 923d779cf47f91646f86393e5d633c1e0f7b32e0 on cantino:master.

Coverage remained the same at 88.21% when pulling f180f26f1d179333f69c5a8da4d37ede0ddc9b4b on grawn:patch-1 into 923d779cf47f91646f86393e5d633c1e0f7b32e0 on cantino:master.

Thanks @grawn!


[WIP] Feature/not fowkring

Fixes # .
Changes proposed in this pull request:

@anz-bank/sysl-developers

The PR description isn't very clear. Please elaborate.


fail to update cubemap sky

Describe the bug
I tried to change my skyTexture by updating theme,but it was fail
I use ThemeLoader to load another theme.json, it works on most of styles but sky.
network shows that it has asked the new theme images,but it doesn't show on the map,the sky has no change

function updateSkyBackgroundColors() doesn't work

@aoyaZY , thanks for your issue. Do you have a working demo so that I can debug the problem?

@nzjony , thanks for your notice. But sorry, my demo is working base on my local data server , it may doesn't work in your environment. Maybe I can put some gif and images in here, you can see it.
I change theme like this

and it works like this

here is my tow different sky , they work well alone but update theme

@nzjony , nice!


external APIs changed to optional and frontend examples matching the environment

Made the external apis (cmc and exchangerate) optional by returning early before the values that require those tokens are getting cached if the corresponding token evaluates to undefined.
the /price and /price/exchange-rates endpoints will return 501 Not Implemented with a message that explains why it does not work.
Additionally the frontend examples that display the api url on the homepage now change based on the api url defined in the environment.

I love the idea, thanks for making it easier to mirror this API 🚀


Jitpack.io vs Maven Central

There are some security concerns regarding jitpack.io. In our company it is even banned for these reasons. Would you consider to use Maven Central in instead of or in addition to jitpack?

It seems the usage jitpack already deprecated cause actual version >3

Yes, you are of course right! I missed that. Thank you!


action fails when installing sfdx cli and scanner

I get this error when the action runs. I am attaching all the logs here.
2_Run<EMAIL_ADDRESS>3_Install SFDX CLI and Scanner.txt
8_Post Run<EMAIL_ADDRESS>9_Complete job.txt
1_Set up job.txt

Hello @mani2246, thanks for checking out this action, raising this issue, and sharing the logs.
It looks like your build is failing on the installation of sfdx scanner plugin at the node_modules/sfdx-cli/bin/run plugins:install @salesforce/sfdx-scanner command execution - is that correct? Do you have a link to the pull request or to the action run which you can share with me? I would like to take a look at your workflow's .yml file.
If there is an issue with the scanner plugin installation, we may need to raise an issue in the scanner's repository instead of this sfdx-scan-pull-request action's repository.
Also note that in an ideal world, there would be no need to execute the npm install sfdx-cli and node_modules/sfdx-cli/bin/run plugins:install @salesforce/sfdx-scanner commands. I have created an outstanding issue in this repository to remove that prerequisite step - if we can remove that, then we will be able to reduce the likelihood of unrelated changes within the scanner's repository causing issues with this action.

this is a private repo. the .yml is
name: Label PRs
on:
- pull_request
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: srvaroa/labeler@master
      env:
        GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
  analyze:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
        with:
          fetch-depth: 0
      - name: Install SFDX CLI and Scanner
        run: |
          npm install sfdx-cli
          node_modules/sfdx-cli/bin/run plugins:install @salesforce/sfdx-scanner
      - name: Run SFDX Scanner - Report findings as comments
        uses<EMAIL_ADDRESS>        with:
          pmdconfig: pmd-ruleset.xml
          severity-threshold: 2
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

i now updated the .yml as below (removing the step Install SFDX CLI and Scanner)
name: Label PRs
on:
- pull_request
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: srvaroa/labeler@master
      env:
        GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
  analyze:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
        with:
          fetch-depth: 0
      - name: Run SFDX Scanner - Report findings as comments
        uses<EMAIL_ADDRESS>        with:
          pmdconfig: pmd-ruleset.xml
          severity-threshold: 2
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

this leads to following error

2022-08-08T17:34:00.5442670Z Getting difference within the pull request...
2022-08-08T17:34:00.5565077Z Recursively moving all files to the temp folder...
2022-08-08T17:34:00.5738993Z Performing static code analysis on all of the files in the difference...
2022-08-08T17:34:00.5755159Z /bin/sh: 1: node_modules/sfdx-cli/bin/run: not found
2022-08-08T17:34:00.5791153Z node:child_process:826
2022-08-08T17:34:00.5791636Z     err = new Error(msg);
2022-08-08T17:34:00.5792279Z           ^
2022-08-08T17:34:00.5792576Z
2022-08-08T17:34:00.5793534Z Error: Command failed: node_modules/sfdx-cli/bin/run scanner:run     --pmdconfig="pmd-ruleset.xml"      --format json     --target "temporary"     --outfile "sfdx-scanner-findings.json"
2022-08-08T17:34:00.5794309Z /bin/sh: 1: node_modules/sfdx-cli/bin/run: not found
2022-08-08T17:34:00.5794882Z
2022-08-08T17:34:00.5795171Z     at checkExecSyncError (node:child_process:826:11)
2022-08-08T17:34:00.5796130Z     at execSync (node:child_process:900:15)
2022-08-08T17:34:00.5797115Z     at performStaticCodeAnalysisOnFilesInDiff (/home/runner/work/_actions/mitchspano/sfdx-scan-pull-request/v0.1.2/index.js:121:3)
2022-08-08T17:34:00.5798700Z     at main (/home/runner/work/_actions/mitchspano/sfdx-scan-pull-request/v0.1.2/index.js:284:3) {
2022-08-08T17:34:00.5799231Z   status: 127,
2022-08-08T17:34:00.5799847Z   signal: null,
2022-08-08T17:34:00.5800216Z   output: [
2022-08-08T17:34:00.5800772Z     null,
2022-08-08T17:34:00.5801126Z     Buffer(0) [Uint8Array] [],
2022-08-08T17:34:00.5801713Z     Buffer(53) [Uint8Array] [
2022-08-08T17:34:00.5802113Z        47,  98, 105, 110,  47, 115, 104,  58,  32,  49,
2022-08-08T17:34:00.5802695Z        58,  32, 110, 111, 100, 101,  95, 109, 111, 100,
2022-08-08T17:34:00.5803096Z       117, 108, 101, 115,  47, 115, 102, 100, 120,  45,
2022-08-08T17:34:00.5803689Z        99, 108, 105,  47,  98, 105, 110,  47, 114, 117,
2022-08-08T17:34:00.5804086Z       110,  58,  32, 110, 111, 116,  32, 102, 111, 117,
2022-08-08T17:34:00.5804643Z       110, 100,  10
2022-08-08T17:34:00.5804993Z     ]
2022-08-08T17:34:00.5805526Z   ],
2022-08-08T17:34:00.5805858Z   pid: 1748,
2022-08-08T17:34:00.5806442Z   stdout: Buffer(0) [Uint8Array] [],
2022-08-08T17:34:00.5807131Z   stderr: Buffer(53) [Uint8Array] [
2022-08-08T17:34:00.5807956Z      47,  98, 105, 110,  47, 115, 104,  58,  32,  49,
2022-08-08T17:34:00.5808353Z      58,  32, 110, 111, 100, 101,  95, 109, 111, 100,
2022-08-08T17:34:00.5808961Z     117, 108, 101, 115,  47, 115, 102, 100, 120,  45,
2022-08-08T17:34:00.5809364Z      99, 108, 105,  47,  98, 105, 110,  47, 114, 117,
2022-08-08T17:34:00.5809974Z     110,  58,  32, 110, 111, 116,  32, 102, 111, 117,
2022-08-08T17:34:00.5810341Z     110, 100,  10
2022-08-08T17:34:00.5811088Z   ]
2022-08-08T17:34:00.5811424Z }
2022-08-08T17:34:00.5894022Z Post job cleanup.

I am able to execute the installation of the CLI and scanner plugin successfully with a .yml file with the following structure:
name: Static Analysis
on:
  pull_request:
    types: [opened, reopened, edited, synchronize]
  workflow_dispatch:
jobs:
  analyze:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
        with:
          fetch-depth: 0
      - name: Install Salesforce CLI
        run: |
          npm install sfdx-cli
          node_modules/sfdx-cli/bin/run plugins:install @salesforce/sfdx-scanner
      - name: Run SFDX Scanner - Report findings as comments
        uses<EMAIL_ADDRESS>        with:
          severity-threshold: 4
          strictly-enforced-rules: '[{ "engine": "pmd", "category": "Performance", "rule": "AvoidDebugStatements" }]'
          pmdconfig: "ruleset.xml"
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

The difference I notice is the beginning of your ,yml file:
build:
    runs-on: ubuntu-latest
    steps:
    - uses: srvaroa/labeler@master
      env:
        GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

I am not certain what the labeler does or how it might interfere with the installation of the scanner CLI plugin. Can you try with the .yml structure I have provided and let me know if you continue to experience installation issues?

I used exactly the same .yml file you provided and get this error
1m 34s
Run npm install sfdx-cli

npm WARN old lockfile
npm WARN old lockfile The package-lock.json file was created with an old version of npm,
npm WARN old lockfile so supplemental metadata must be fetched from the registry.
npm WARN old lockfile
npm WARN old lockfile This is a one-time fix-up, please be patient...
npm WARN old lockfile
npm WARN deprecated xmldom@0.[1](https://github.com/LIQIDTechnology/salesforce/runs/7740104494?check_suite_focus=true#step:3:1).27: Deprecated due to CVE-2021-21366 resolved in 0.[5](https://github.com/LIQIDTechnology/salesforce/runs/7740104494?check_suite_focus=true#step:3:5).0
npm WARN deprecated<EMAIL_ADDRESS>Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated<EMAIL_ADDRESS>Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated<EMAIL_ADDRESS>Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility
npm WARN deprecated source-map-resolve@0.[5](https://github.com/LIQIDTechnology/salesforce/runs/7740104494?check_suite_focus=true#step:3:6).3: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated<EMAIL_ADDRESS>See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated<EMAIL_ADDRESS>https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated cli-ux@5.[6](https://github.com/LIQIDTechnology/salesforce/runs/7740104494?check_suite_focus=true#step:3:7).[7](https://github.com/LIQIDTechnology/salesforce/runs/7740104494?check_suite_focus=true#step:3:8): Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm WARN deprecated<EMAIL_ADDRESS>this package is now deprecated
npm WARN deprecated request@2.[8](https://github.com/LIQIDTechnology/salesforce/runs/7740104494?check_suite_focus=true#step:3:9)8.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated<EMAIL_ADDRESS>this library is no longer supported
npm WARN deprecated<EMAIL_ADDRESS>Chokidar 2 does not receive security updates since 201[9](https://github.com/LIQIDTechnology/salesforce/runs/7740104494?check_suite_focus=true#step:3:10). Upgrade to chokidar 3 with 15x fewer dependencies
npm WARN deprecated babel-eslint@[10](https://github.com/LIQIDTechnology/salesforce/runs/7740104494?check_suite_focus=true#step:3:11).1.0: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.
npm WARN deprecated<EMAIL_ADDRESS>This SVGO version is no longer supported. Upgrade to v2.x.x.
npm WARN deprecated<EMAIL_ADDRESS>Use the original unforked package instead: postcss-markdown
npm WARN deprecated<EMAIL_ADDRESS>Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm WARN deprecated<EMAIL_ADDRESS>Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm WARN deprecated<EMAIL_ADDRESS>Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm WARN deprecated<EMAIL_ADDRESS>Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm WARN deprecated<EMAIL_ADDRESS>Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm WARN deprecated<EMAIL_ADDRESS><EMAIL_ADDRESS>is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
npm ERR! code 1
npm ERR! path /home/runner/work/salesforce/salesforce/node_modules/sharp
npm ERR! command failed
npm ERR! command sh -c (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)
npm ERR! make: Entering directory '/home/runner/work/salesforce/salesforce/node_modules/sharp/build'
npm ERR!   TOUCH Release/obj.target/libvips-cpp.stamp
npm ERR!    In file included from /home/runner/.cache/node-gyp/16.16.0/include/node/v8.h:30,
npm ERR!                  from /home/runner/.cache/node-gyp/16.16.0/include/node/node.h:63,
npm ERR!                  from ../src/common.cc:22:
npm ERR! /home/runner/.cache/node-gyp/16.16.0/include/node/v8-internal.h: In function ‘void v8::internal::PerformCastCheck(T*)’:
npm ERR! /home/runner/.cache/node-gyp/16.16.0/include/node/v8-internal.h:492:38: error: ‘remove_cv_t’ is not a member of ‘std’; did you mean ‘remove_cv’?
npm ERR!   492 |             !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
npm ERR!       |                                      ^~~~~~~~~~~
npm ERR!       |                                      remove_cv
npm ERR! /home/runner/.cache/node-gyp/16.16.0/include/node/v8-internal.h:492:38: error: ‘remove_cv_t’ is not a member of ‘std’; did you mean ‘remove_cv’?
npm ERR!   492 |             !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
npm ERR!       |                                      ^~~~~~~~~~~
npm ERR!       |                                      remove_cv
npm ERR! /home/runner/.cache/node-gyp/16.16.0/include/node/v8-internal.h:492:50: error: template argument 2 is invalid
npm ERR!   492 |             !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
npm ERR!       |                                                  ^
npm ERR! /home/runner/.cache/node-gyp/16.16.0/include/node/v8-internal.h:492:63: error: ‘::Perform’ has not been declared
npm ERR!   492 |             !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
npm ERR!       |                                                               ^~~~~~~
npm ERR! make: *** [sharp.target.mk:139: Release/obj.target/sharp/src/common.o] Error 1
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack     at ChildProcess.onExit (/home/runner/work/salesforce/salesforce/node_modules/node-gyp/lib/build.js:194:23)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:527:28)
npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:291:[12](https://github.com/LIQIDTechnology/salesforce/runs/7740104494?check_suite_focus=true#step:3:13))
npm ERR! gyp ERR! System Linux 5.15.0-10[14](https://github.com/LIQIDTechnology/salesforce/runs/7740104494?check_suite_focus=true#step:3:15)-azure
npm ERR! gyp ERR! command "/usr/local/bin/node" "/home/runner/work/salesforce/salesforce/node_modules/.bin/node-gyp" "rebuild"
npm ERR! gyp ERR! cwd /home/runner/work/salesforce/salesforce/node_modules/sharp
npm ERR! gyp ERR! node -v v[16](https://github.com/LIQIDTechnology/salesforce/runs/7740104494?check_suite_focus=true#step:3:17).16.0
npm ERR! gyp ERR! node-gyp -v v8.4.1
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/runner/.npm/_logs/[20](https://github.com/LIQIDTechnology/salesforce/runs/7740104494?check_suite_focus=true#step:3:21)[22](https://github.com/LIQIDTechnology/salesforce/runs/7740104494?check_suite_focus=true#step:3:23)-08-09T06_11_[47](https://github.com/LIQIDTechnology/salesforce/runs/7740104494?check_suite_focus=true#step:3:48)_[80](https://github.com/LIQIDTechnology/salesforce/runs/7740104494?check_suite_focus=true#step:3:81)5Z-debug-0.log
Error: Process completed with exit code 1.

It looks like the installation fails when it tries to install this dependency:
npm ERR! code 1
npm ERR! path /home/runner/work/salesforce/salesforce/node_modules/sharp
npm ERR! command failed

Are you trying to include node_modules in your repository, or is that in .gitignore?
This also could an issue with your package-lock.json file - can you share that file as well?

node_modules is in the .gitignore . So it it not tracked in the repo.
Attached is the package-lock.json file. I have changed the extension from .json to .txt for sharing
package-lock.txt

It looks like the sharp package is defined as a dependency in your project's package-lock.json.  There's probably an issue with the dependency version. Check https://www.npmjs.com/package/sharp for more details about this package. It looks like the current version is 0.30.7, but your package-lock.json defined a dependency on 0.23.4. Perhaps updating the version will resolve the issue.
Unfortunately, you'll need to troubleshoot that within your repository as it is not in the source of this sfdx-scan-pull-request action.

thanks @mitchspano for your inputs. i will have a look


Html css upgrade

Thanks to Michaela I came across these templates. I ignored CSS all this while since I didn't want to spend time laying things out, but now I have no excuse to freshen up my website. So I integrated this template and in the process caught some bugs in my previous HTML/JavaScript code while trying the website out.
As for formatting, I guess I can do it, but I'll wait for preliminary approval first before reformatting.
Here are screenshots of each of the three views:

First view
Second view
Third view

Ok I now updated the PR description with screenshots and adjusted the links in the PR.

LGTM
Sorry for delay. I've made a pass. But there is no way i can review all these changes in reasonable time. And I don't think it's review-able given it's copied from some other place. I'me not sure if it's 100% copy or you've made changes yourself or added other things in addition to the template in this PR? Anyway, since we're moving away from weekly assignment repos, let's not worry about it.


Supporting of \mathcal

Do you have any plan for supporting fonts like \mathcal and \mathbb? They are heavely used in scientific writings and it's barely avoidable to use them in plottings.

 Forget this issue.


Update URL of irc.freenode.net to webchat.freenode.net

can't access irc.freenode.net, it should be webchat.freenode.net.

Yes, this change is not correct. I have a branch with updates for Slack that I need to finish; let me push that today


Multi-Matrix Build

Multi-Matrix Build

The ability to test each pact cli distribution cross platform, and test each of our provider/consumer examples

notes - trigger builds by running ./scripts/trigger-cross-test.sh or once its merged, you can do it via the workflow panel, and set the version numbers of the tools.
Tests against

Distributions

pact_broker-client gem
pact-cli-docker

OS

macos
windows
ubuntu

Add Pactflow Command to CLI sources

[x] Gem pact_broker-client
[x] Docker pact-ruby-cli

Add examples

[x] Gem pact_broker-client
[X] Docker pact-ruby-cli
[x] Demo postman
[x] Demo cypress

Improve examples

GitHub Actions

[x] Allow triggering of build with PACT_CLI_DOCKER_VERSION
[x] GH Matrix - Separate Workflow, use composite consumer name
[x] build to test Different OS's (mac/linux/windows)
[x] build to test Different Docker CLI versions
[ ] build to test Different ways of publishing

[x] Gem pact_broker-client
[ ] CLI pact-ruby-standalone
[x] Docker pact-ruby-cli

Trigger example build on update of CLI tools

[X] allow triggering via script or GitHub UI
[ ] Gem pact_broker-client
[ ] CLI pact-ruby-standalone
[ ] Docker pact-ruby-cli
[ ] GitHub Action github-actions-pact-publish-provider-contract

publish-provider-contract
Usage:
  pactflow publish-provider-contract CONTRACT_FILE ... --provider=PROVIDER -a, --provider-app-version=PROVIDER_APP_VERSION -b, --broker-base-url=BROKER_BASE_URL

Options:
      --provider=PROVIDER
              # The provider name
  -a, --provider-app-version=PROVIDER_APP_VERSION
              # The provider application version
  -h, [--branch=BRANCH]
              # Repository branch of the provider version
  -t, [--tag=TAG]
              # Tag name for provider version. Can be specified multiple
                times.
      [--specification=SPECIFICATION]
              # The contract specification
              # Default: oas
      [--content-type=CONTENT_TYPE]
              # The content type. eg. application/yml
      [--verification-success], [--no-verification-success]
              # Whether or not the self verification passed successfully.
      [--verification-exit-code=N]
              # The exit code of the verification process. Can be used instead
                of --verificaiton-success|--no-verification-success for a
                simpler build script.
      [--verification-results=VERIFICATION_RESULTS]
              # The path to the file containing the output from the
                verification process
      [--verification-results-content-type=VERIFICATION_RESULTS_CONTENT_TYPE]
              # The content type of the verification output eg. text/plain,
                application/yaml
      [--verification-results-format=VERIFICATION_RESULTS_FORMAT]
              # The format of the verification output eg. junit, text
      [--verifier=VERIFIER]
              # The tool used to verify the provider contract
      [--verifier-version=VERIFIER_VERSION]
              # The version of the tool used to verify the provider contract
  -o, [--output=OUTPUT]
              # json or text
              # Default: text
  -b, --broker-base-url=BROKER_BASE_URL
              # The base URL of the Pact Broker
  -u, [--broker-username=BROKER_USERNAME]
              # Pact Broker basic auth username
  -p, [--broker-password=BROKER_PASSWORD]
              # Pact Broker basic auth password
  -k, [--broker-token=BROKER_TOKEN]
              # Pact Broker bearer token
  -v, [--verbose], [--no-verbose]
              # Verbose output. Default: false

see postman PR here https://github.com/pactflow/example-bi-directional-provider-postman/pull/15

This is so ✨ !


Add STS rule overview with dependencies

Note that we could get these for "free" (as in free shrink :P) if we structure our rules in modules and use graphmod, e.g.:

For Byron I added this task to the "work proposals" section of our roadmap.

@dnadales nice, didn't know that. But I also wanted to have the consumer / producer dependencies of the sub-rules, would that be possible, too ?

@dnadales nice, didn't know that. But I also wanted to have the consumer / producer dependencies of the sub-rules, would that be possible, too ?

That much I don't know but isn't the direction of the arrow enough?

Oh, I see. Then no, I don't think we'll get that for free :)


The order is always showing a test order while using the actual product ID?

It is always showing a test order while doing the transaction, even if I am using the actual product ID.

It is hard for me to understand your issue. Could you be more specific?


subroute multiple keys

Feature description

Route directories when they contain a :key path ignore all others in the directory.
I'm hoping for support for something like this, this is just an example.
/users/
/users/{uuid}/
/users/create/

users/create isn't available because it'd be passed to users/{uuid}.
Feature motivation

More complex and detailed API structures.

You can achieve this using wildcards, also because "create" can be a valid uuid in this example.
for example i will use a pattern like this:
/users/
/users/@{uuid}/
/users/create/

you can replace the @ with any "special" character you want


Move backups out of the Devilbox

ISSUE TYPE

Feature request

SUMMARY
Following the Best Practice to move data out of the Devilbox, I would like to have the same way for backups.
Goal

To do it, I've :

added a non official HOST_PATH_BACKUPDIR env var in my .env file
added a docker-compose.override.yml file with such content

# IMPORTANT: The version must match the version of docker-compose.yml
---
version: '2.3'

services:
  php:
    volumes:
      # Mount Backup directory
      - ${HOST_PATH_BACKUPDIR}:/shared/backups:rw${MOUNT_OPTIONS}

@cytopia Thanks to include it in upcoming release

Fixed here: https://github.com/cytopia/devilbox/pull/750


Wait until the next tick to pause the stream

Registering handlers on a stream with on causes resume to be called, but only on the next tick.
This leads to a race condition where the pause can happen before that delayed resume, which then resumes the stream earlier than we were expecting.
Reopening as requested in #38 as this still seems to be required for the tests to pass with both nodejs 4.4.5 on Fedora 24 and nodejs 6.2.2 in Fedora Rawhide. Without it we get these two failures:
    not ok 21 emits warning only after it was resumed
      ---
        file:   /builddir/build/BUILD/package/test/readdirp-stream.js
        line:   245
        column: 11
        stack:
          - getCaller (/usr/lib/node_modules/tap/lib/tap-assert.js:418:17)
          - Function.assert (/usr/lib/node_modules/tap/lib/tap-assert.js:21:16)
          - Test._testAssert [as ok] (/usr/lib/node_modules/tap/lib/tap-test.js:87:16)
          - ReaddirpReadable.<anonymous> (/builddir/build/BUILD/package/test/readdirp-stream.js:245:11)
          - emitOne (events.js:96:13)
          - ReaddirpReadable.emit (events.js:188:7)
          - Immediate._onImmediate (/builddir/build/BUILD/package/stream-api.js:75:32)
          - tryOnImmediate (timers.js:543:15)
          - processImmediate [as _immediateCallback] (timers.js:523:5)
      ...

and:
    not ok 23 emits errors only after it was resumed
      ---
        file:   /builddir/build/BUILD/package/test/readdirp-stream.js
        line:   249
        column: 11
        stack:
          - getCaller (/usr/lib/node_modules/tap/lib/tap-assert.js:418:17)
          - Function.assert (/usr/lib/node_modules/tap/lib/tap-assert.js:21:16)
          - Test._testAssert [as ok] (/usr/lib/node_modules/tap/lib/tap-test.js:87:16)
          - ReaddirpReadable.<anonymous> (/builddir/build/BUILD/package/test/readdirp-stream.js:249:11)
          - emitOne (events.js:96:13)
          - ReaddirpReadable.emit (events.js:188:7)
          - Immediate._onImmediate (/builddir/build/BUILD/package/stream-api.js:83:32)
          - tryOnImmediate (timers.js:543:15)
          - processImmediate [as _immediateCallback] (timers.js:523:5)
      ...

@toddself is this related to your change?

Or I'm confused, didn't @es128 just land a PR like this?

Ideally not?  I can dive in and take a look in a few minutes.

@thlorenz if you mean my PR #38 then no - it was closed with a request for me to open a new one if it was still an issue.

My change was related to being able to actually call pause().  Prior to that it was impossible to pause the stream correctly.

I'm a bit confused too because this patch only modifies the test script, but the tests are already passing.
I guess the assertion is that they're only passing by some degree of chance, but sometimes the race condition creeps in making them non-deterministic


Add RsPaint plugin

an initial version. none of gamma's crazy ideas. hopefully later.

What's the difference with this and Brush Markers ?


Improved notifications

The goal of notifications is to keep you informed without overwhelming you with too much information. We could also be better by sending out emails from different accounts<EMAIL_ADDRESS>vs<EMAIL_ADDRESS>etc). This could help you to filter emails out and find what you are looking for.
It would also be nice to send notifications in these use cases in addition to the use cases we already support:

[ ] A event marked as fixed, user comments on an error, adds a reference link.
[ ] A projects event rate is increasing abnormally.
[ ] Additional information on all emails (tags, descriptions, user identity).
[ ] Ability to configure rules based on types, tags, time of day, number of exceptions, or environment.
[ ] Ability to snooze notifications for a period of time.
[ ] Send a periodic digest email based on activity
[ ] Don't send as many emails if there hasn't been any changes in activity. Example a user hasn't configured there project shouldn't get a daily notification saying they are Exceptionless every day. Maybe the best option is to allow the user to choose between a daily or weekly summary.
[ ] Emails on billing failures/status
[x] Email when being throttled or plan limit reached

Third Party Integrations
Provide a easy way to manage third party integrations. Currently these integrations can be done with zapier. We should define what the default message should look like.

[ ] Slack
[ ] Hipchat

Feedback
Please leave your feedback in the comments below. Here is a bulleted list of feedback so far:

@webcoda suggested that it would be really nice to be able to send an alert to any user (even if they are not part of the system).

Please add an "daily/weekly/monthly" option

Please remove the "congrats, no event was logged" mails - they are just noise

@ejsmith what do you think about not sending dailies if there are no events? Could lead me to think that notifications are not working or we have not yet configured our project. We do have project is configured flag. Maybe we add configuration required emails and option to not send.

I want to receive exceptions from you, not the normal case :-) All monitoring systems we use only send notifications on exceptions/deviations - none are sending "everything ok mails".
But if your current users are depending on these "everything ok" mails, then add a "send summary mails even if no exceptions has been logged" flag (imho with default = no)

HipChat integration would be useful for certain critical events, such as a new type of error. As long as  you can just the dial on noise vs signal then you're OK.

Yeah we absolutely have to do a good job with our signal to noise ratio

The biggest thing I've noticed so far in the email notifications is that if there is a new exception I'd rather have the full stack trace in the email so I can quickly decide whether I need to go in and investigate or whether I should ignore it (for now). Of course the "new error" part is the hard part but I don't have any reason to think you'd mess that up :smile:

Add snooze actions to stack
make it easy to trigger snooze actions from emails
Add stack trace to email.
Keep track of emails and stop spamming emails. It's crazy. We gotta figure out how much were sending and stop sending streams of emails. Emails should be important!

We need to look at our own email inbox and see how we can ditch 90% of our emails.

For error emails we should have the link open to the stack trace tab for quick viewing as well as add the stack trace to the emails as previously noted.

Here is what our current thought process is for working notifications starting today (finally).

[ ] We update our email templates and make them easier to edit and add content.

[ ] We are thinking about using https://mjml.io or (https://github.com/leemunroe/responsive-html-email-template combined with https://putsmail.com/inliner) to quickly generate valid markup from simple html.
[ ] Then we can test our emails using a service like litmus
[ ] we need to figure out a way to easily update our razor templates or find a better way to generate our emails from the email templates above.

[ ] Next, we are going to add additional information as stated above to emails.

[ ] Add tags
[ ] Stack traces and more

[ ]  We need to identify ways to reduce noise of emails

[ ] Identify sources of noise by looking at all our current inboxes.
[ ] Look into doing anomaly detection

There is a lot to do but here are the first steps. We want to do everything on this issue but we feel like these are the first steps that need to occur..

 I'd really love to know more about what made you go for this framework rather than MJML 🙂 .
Cheers!

@ngarnier I think both FFE and MJML were in a close running and have a large community base and both great solutions. We went with FFE because we felt it was a bit cleaner syntax (with inky) overall and more aligned with what we are using (lots of people using handlebars already with zurb, which we are going to use server side to do a second pass on the template). It felt like it had less of a learning curve. For example doing partial templates is pretty straight forward in FFE and I'm not sure I even seen an example of it in your docs and am not sure if it's possible.
I do think MJML is a bit sexier, and we have some friends who use it in their react projects (it’s how I heard about it). I'm wondering If our project was in react, if we would have leaned more to pick miml.

Thanks a lot for the feedback @niemyjski!
Regarding partials, it's done with mj-include. If you're talking about templating languages, it's true we prefer not to implement our own but rather enable users to use the one they want.
About React, we're actually dropping it in the next version (see the MJML 4 announcement) to improve performances, so it shouldn't be the main argument. Rather than using React, the JSON format of MJML makes it really easy to build/manipulate a responsive email programatically.
Thanks again for the feedback and feel free to reach out if you have any question regarding MJML!

Thanks for the update and I'll follow the project and v4. For us, having our server side stuff in .net, we'd have to prerender the templates or rewrite our mail job to be a node app (doable but a pain as we'd have to hook into our queues). So we wouldn't get the perf benefits of vnext, but it does sound like it's going to make your lives easier and less of a hack transforming the html :).
One of the things I think FFE does better at least out of the box is having convention / structure for the body of the email and then a partial for the content. I think if you went this route in your samples it would go a long way (I remember looking at your sample repo and you had thrive header, thrive body and thrive something and it was confusing as they all seemed to contain the same content...) Most of the content in the samples is slightly duplicated from one to the next. You're probably always going to have the same header and footer throughout your app so why specify it multiple times. It was nice to dig into and just update the main body in FFE. Please correct me if I'm wrong, I spent an hour or two looking at both :)

Oh yes you're right about having to run your own node app. Another option would be to use the MJML API but it does add a dependency to your email system.
Regarding the thrive examples, I see. They were meant to illustrate the different advancement steps of the email for a tutorial rather than how to use partials, but it makes sense that it might have been confusing now. We'll work to improve the documentation to reflect this better as it's really easy to do with mj-include.
I'm glad you appreciate it, I didn't mean to overflow your issue's thread but rather to learn what we can do better, so thanks again for your answers!

We need to add rules for overage emails so you can opt out of them.

We should also look into something like https://image-charts.com for awesome charts in emails

@ejsmith  we should add the count for each item in the most frequent list on the summary email. I like that I can see the list of the top issues for the day, but seems like I would want to know how many times they happened. I think we should do top 5 and then under that put “X other issues occurred N times” and that is a link to view the list of all the stacks that happened that day.

We should send an email the first time you are throttled every day.

Added: ability to set what time daily notifications go out.


Code For NOSQL DATABASE USING REACTJS

Signed-off-by: harsh6768-svg<EMAIL_ADDRESS>
This isa simple react app which will take the login details of the user and will add the database in mongodb database
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context.
Fixes #1359

Type of change 📝

Domain of Contribution 📊

[x] Database

[x] Frontend Dev React/Angular/Vue

Checklist ✅

[x] I follow Contributing Guidelines & Code of conduct of this project.
[x] I have performed a self-review of my own code or work.
[x] I have commented my code, particularly in hard-to-understand areas.
[x] My changes generates no new warnings.
[x] I'm GWOC'21 contributor

Screenshots / Gif (Optional) 📸

/assign


[Doom] Better debugging of data sources

Initla proposal from: https://github.com/dust-tt/decisions/issues/105 was:

If a file is in error, the status displays it. If a file is in error under on a sub-node, we display in the status in orange.
We give access to source URL and dust interpretation of it (in a side modal)

--
There is no concept of error of a file but we can surely give the last update on some platforms. We definitely want to enable access to the source URL + view of the content of the file as seen by dust

We won't be able to have errors on sub-file for sure

I don't understand the "error" thing. Yes we can give the last update, but there are to my knowledge 0 cases where we can display an error ?
Do we want to display the last upsert time for the doc ? likely not in orange/red thoughm right ?


Hash change event not fired in IE9

When using IE9 (Version 9.0.8112.16421) the hash change in HashLocation is bound using
if (window.addEventListener) {
window.addEventListener('hashchange', onHashChange, false);
} else {
window.attachEvent('onhashchange', onHashChange);
}
onHashChange is never fired when using addEventListener, however, when I change the code so it uses attachEvent instead it works.

React Router v0.13.x is no longer supported. Please upgrade to React Router v1.0.0, which has many bug fixes around history integration.


Return mixed type instead of void

It's better to specify a mixed return type instead of void on the component handlers like:
onClick?: (SyntheticEvent<HTMLButtonElement>) => void,

.../button/types.js.
mixed means the function can return anything and do not care what it is unless you need to use it.

+1 for being more flexible with the return types. One case where I've found this useful is if I want to make my handler an async function.
async onChange (params) {
  await fetch('/api', params);
}

^ async functions implicitly return a promise and flow complained that baseui expected void. Seems like mixed would fix this–I don't have a better alternative.

good suggestion. I think making this change should be safe

this is released