Proposal: Add Indices/Items info to SelectionModelSelectionChangedArgs and support Batching

Proposal: Add more info to SelectionModelSelectionChangedArgs
Summary
As described in #1645 SelectionModelSelectionChangedEventArgs carries no information about what changed in a selection. This is a proposal to add that information, based on modifications done to a port of SelectionModel in Avalonia. An implementation of this (in C#) can be found at https://github.com/AvaloniaUI/Avalonia/pull/3470.
Rationale

When a selection changes, it is important to be able to tell what changed, otherwise once has to store a secondary copy of the current selection and diff if with the new selection on change
Secondary: it can be useful to be able to batch changes

Scope

Capability
Priority

Include information on items/indexes added/removed to/from selection
Must

Support batching of changes
Could

Important Notes
The proposed API for SelectionModelSelectionChangedEventArgs is the following:
public class SelectionModelSelectionChangedEventArgs : EventArgs
{
	/// <summary>
	/// Gets the indices of the items that were removed from the selection.
	/// </summary>
	public IReadOnlyList<IndexPath> DeselectedIndices { get; }

	/// <summary>
	/// Gets the indices of the items that were added to the selection.
	/// </summary>
	public IReadOnlyList<IndexPath> SelectedIndices { get; }

	/// <summary>
	/// Gets the items that were removed from the selection.
	/// </summary>
	public IReadOnlyList<object?> DeselectedItems { get; }

	/// <summary>
	/// Gets the items that were added to the selection.
	/// </summary>
	public IReadOnlyList<object?> SelectedItems { get; }
}

The class contains selected and deselected collections containing both indexes and items. These collections are lazy (using a modified version of the existing SelectedItems collection) and populated in the following scenarios:

SelectedItems/DeselectedItems are always populated when items are added/removed to/from the selection
In addition DeselectedItems is populated when selected items are removed from the ItemSource
SelectedIndices/DeselectedIndices are always populated when items are added/removed to/from the selection
DeselectedIndices is not populated when selected items are removed from the ItemSource because these items no longer have an index
All of the collections are unpopulated when a change to the item source results in just the selected indexes being adjusted

Where "unpopulated" means "return 0 items".
In addition, you may want to consider batching changes to the selection. This is done with the following method on SelectionModel:
public IDisposable Update();

Calling this method increases the operation count, and disposing the returned object decreases the operation count.
While the operation count >0 no SelectionChanged events are raised. When the operation count reaches 0 a SelectionChanged event is raised if the operation has resulted in a change to the selection.
Rather than going into more detail in this proposal, it may be useful instead to link to the unit tests for the feature in Avalonia. They start at the following line:
https://github.com/AvaloniaUI/Avalonia/blob/3910c7c856ffe18e6ac5fb08cf81c55d46c0c14a/tests/Avalonia.Controls.UnitTests/SelectionModelTests.cs#L892
Open Questions
Because the collections in SelectionModelSelectionChangedEventArgs are lazily evaluated, if the user makes a change to the items source in a SelectionChanged handler, then reading these collections could result in bad information. Does this case need to be handled? e.g.
[Fact]
public void Changing_Items_In_SelectionChanged()
{
	var target = new SelectionModel();
	var data = new ObservableCollection<int>(Enumerable.Range(0, 10));
	var raised = 0;

	target.Source = data;
	target.SelectionChanged += (s, e) =>
	{
		if (raised++ == 0)
		{
			data.Clear();
			Assert.Equal(1, e.SelectedItems.Count);

			// OutOfRange exception here, but could equally result in wrong item being returned.
			Assert.Equal(4, e.SelectedItems[0]);
		}
	};

	target.Select(4);

	Assert.Equal(2, raised);
}

A few questions:

Is there a benefit in keeping the IndexPaths for the changed items? It seems like we would just store more information that is rarely used but will impact performance negatively.
How do the DeselectedIndices map to the DeselectedItems? Do they map at all or could it be that the first entry in DeselectedIndices wouldn't actually be the index of the first DeselectedItem?
What exactly do you mean by "lazily" evaluated? Since every item in the ItemsSource is pass by reference I think, those collection should/could probably be empty lists when created and not related to the actual list.
Having this "batch" processing would create a huge overhead (collect changes, what if we undo an operation, check when we raise batch etc.). Is there really a benefit to having this? I can't think of a use case right now, where it makes sense to wait for let's say 4 selection changes and then only raise the event. If you don't want to process it immediately, you can either save them yourself and deal with it later or you are actually only interested in the selections at some point later (e.g. a filepicker) and you don't need that event at all.
If we would add the batch processing, we should think of a more natural way of increasing/decreasing the counter. Having an IDisposable and calling it or disposing it to increase/decrease really seems unnatural to me and a bit complicated.

Hi @chingucoding, good questions!

Is there a benefit in keeping the IndexPaths for the changed items? It seems like we would just store more information that is rarely used but will impact performance negatively.

Yes, if you have duplicate items in your item source then you'll need the indexes to identify them. This can come up when for example, displaying a list of strings. Here's an issue that was opened against Avalonia when someone hit upon this: https://github.com/AvaloniaUI/Avalonia/issues/2004

How do the DeselectedIndices map to the DeselectedItems? Do they map at all or could it be that the first entry in DeselectedIndices wouldn't actually be the index of the first DeselectedItem?

When both collections are present, then the ordering will be the same. They're both iterating over the same collection of IndexRanges.

What exactly do you mean by "lazily" evaluated? Since every item in the ItemsSource is pass by reference I think, those collection should/could probably be empty lists when created and not related to the actual list.

When I mean is that the collections aren't materialized as lists which contain every item. Like SelectionModel.SelectedIndices and SelectionModel.SelectedItems, they're implemented as a view over a collection of IndexRanges. See the existing SelectedItems class for how it works currently for SelectedItems.

Having this "batch" processing would create a huge overhead (collect changes, what if we undo an operation, check when we raise batch etc.). Is there really a benefit to having this? I can't think of a use case right now, where it makes sense to wait for let's say 4 selection changes and then only raise the event. If you don't want to process it immediately, you can either save them yourself and deal with it later or you are actually only interested in the selections at some point later (e.g. a filepicker) and you don't need that event at all.

The state for batch processing is actually required internally anyway (at least in my implementation) because many operations internally consist of more than one physical operation on the selection. See for example the SelectedIndex setter which first clears the selection and then selects the new item. Because these operations are actually taking place across any number of SelectionNodes, there needs to be a central place to record the change.

If we would add the batch processing, we should think of a more natural way of increasing/decreasing the counter. Having an IDisposable and calling it or disposing it to increase/decrease really seems unnatural to me and a bit complicated.

An IDisposable makes sense in C# because it means you'll usually surround the operation with a using block. I guess C++ tends to use RAII so might make sense to expose it in a different way to C++?

Yes, if you have duplicate items in your item source then you'll need the indexes to identify them. This can come up when for example, displaying a list of strings. Here's an issue that was opened against Avalonia when someone hit upon this: AvaloniaUI/Avalonia#2004

I think we are boxing non pass by reference, but I am not entirely sure on that. And for pass by reference, is it really a problem? After all you would have to add the EXACT same item twice, which most likely doesn't make a whole lot sense when talking about selection.

When both collections are present, then the ordering will be the same. They're both iterating over the same collection of IndexRanges.

Maybe we should provide a more robust way for this then or get rid of one of the sides. One possible return value could be a tuple of <IndexPath,Object> so those mappings don't get "destroyed" so easily.

So if you have a collection with 1,000,000 items, and do a "select all", the change is stored as a an IndexRange of [0-999999]. SelectedItems and SelectedIndices are views over that IndexRange rather than being collections holding 1,000,000 items each.

Thanks for the explanation. With that in mind, maybe we should just return the selected indices and let the developer get the items? Otherwise we would have to spent a lot of resources on just creating the event args, which would definitely be bad.

The state for batch processing is actually required internally anyway (at least in my implementation) because many operations internally consist of more than one physical operation on the selection. See for example the SelectedIndex setter which first clears the selection and then selects the new item. Because these operations are actually taking place across any number of SelectionNodes, there needs to be a central place to orchestrate the change, which is essentially what is being exposed here.

Yes that's a bit problematic. Internally, we just pass parameters to indicate whether to raise the event or not.

See #1872 for an example of where batch processing is useful.

I think in that case there are other workarounds that are better, for example you could calculate the diff of the range and deselect the appropriate range. That's of course more difficult but also in my opinion more cleaner than suppressing the event for some operations and then raise it again.

An IDisposable makes sense in C# because it means you'll usually surround the operation with a using block. I guess C++ tends to use RAII so might make sense to expose it in a different way to C++?

Semantically an IDisposable indicates that an object can release unmanaged ressources. If I understand you correctly, how you would try to solve the batch problem is definitely not about clearing ressources but about raising a counter, maybe something like a semaphore.
It just feels counterintuitive to call Dispose to indicate the selectionmodel that it can raise it's event now (or it should not), especially if we are behaving more like a counter.
Regarding the interop between C++ and C#, we are using the winrt projections. Since C# is one of our main audiences but not our only one, we should try to create a solution that feels intuitive for everyone, and not just for C#.
Also what do you mean by "[...] you'll usually surround the operation with a using block" with regard to an IDisposable? (Real question, is this some pattern I haven't heard of before?)

@grokys Thank you for creating the proposal.
I believe ICloseable in WinRT maps to IDispose in C# so we can use that to get the same behavior.
DeselectedIndices is not populated when selected items are removed from the ItemSource because these items no longer have an index

I'm curious. why not pass the indices before it got removed ?
Because the collections in SelectionModelSelectionChangedEventArgs are lazily evaluated, if the user makes a change to the items source in a SelectionChanged handler, then reading these collections could result in bad information. Does this case need to be handled? e.g.

If changing selection in the SelectionChanged handler is not supported (reentrancy) we should really guard against that because that can lead to subtle bugs. I think this might be supported currently because the event is raised at the very end. If this is specific to when reading the new properties, we can guard against that specifically.

@grokys, adding a sample of how to use the batching above would be useful. I think batching can be quite helpful to avoid raising a bunch of intermediate selectionchanged events.

Couldn't we run into the risk of locking the SelectionChanged event if we have that "counter" behavior?

Let me try to explain what I understand of the batching behavior and we can figure out the correct way to achieve it. Assume that I want to do a bunch of selection operations but all of them come one after the other. Currently each individual change would cause a SelectionChanged to fire and everyone listening to the event would react to it. Instead I want to do all the updates and then raise just one event that captures all the changes.
@grokys has achieved this through this pattern.
 using (selectionModel.Update())
            {
                selectionModel.Deselect(1);
                selectionModel.Select(4);
            }

Update is a bit confusing. Some more options that provide to get the same behavior.
selectionModel.StartBatch();
selectionModel.Deselect(1);
selectionModel.Select(4);
selectionModel.CommitBatch()

auto batch = selectionModel.CreateBatch();
selectionModel.Deselect(1);
selectionModel.Select(4);
batch.Commit();

using(selectionModel.CreateBatch())
{
  selectionModel.Deselect(1);
  selectionModel.Select(4);
}

In all these cases, what we want is SelectionChanged to be raised just once at the end.
@MikeHillberg Is there a preference/precedence for this? I think comp might have something similar.

I think we are boxing non pass by reference, but I am not entirely sure on that. And for pass by reference, is it really a problem? After all you would have to add the EXACT same item twice, which most likely doesn't make a whole lot sense when talking about selection.

The most common case for this is displaying a list of strings: take a look at the issue I linked. If you display the list: [ "Foo", "Foo", "Bar" ] and then say "Foo" has been selected, which "Foo" are we talking about?

I think in that case there are other workarounds that are better, for example you could calculate the diff of the range and deselect the appropriate range. That's of course more difficult but also in my opinion more cleaner than suppressing the event for some operations and then raise it again.

Seems like you'll be forcing a user to raise multiple selection changed events and making the class harder to use, all to avoid exposing some internal state that's there anyway?

Semantically an IDisposable indicates that an object can release unmanaged ressources. If I understand you correctly, how you would try to solve the batch problem is definitely not about clearing ressources but about raising a counter, maybe something like a semaphore.

That may have been the original meaning of IDisposable but in my experience it's often used as a RAII pattern for C#. Some prior art:

https://reactiveui.net/docs/handbook/obsolete/collections/reactive-list#suppressing-notifications
http://introtorx.com/Content/v1.0.10621.0/03_LifetimeManagement.html#IDisposable

I'm sure there's more - I'm pretty sure there's examples of this in the BCL, though I can't remember where...

maybe something like a semaphore.

A semaphore as traditionally defined is for synchronization across threads, what do you mean here?

Also what do you mean by "[...] you'll usually surround the operation with a using block" with regard to an IDisposable? (Real question, is this some pattern I haven't heard of before?)

I mean you could do something like this:
using (selection.Update())
{
    selection.ClearSelection();
    selection.SelectRange(...);
}

Or with a C# 8 using declaration:
{
    using operation = selection.Update();
    selection.ClearSelection();
    selection.SelectRange(...);
}

Couldn't we run into the risk of locking the SelectionChanged event if we have that "counter" behavior?

Of course, if the Update() wasn't placed in a using block or in a using statement scope. Not sure how one would implement this without running that risk however.

How would the using pattern work in C++? Can we just "transfer" that or wouldn't it be used easily?
The "Start" and "Commit" batch seems a bit more intuitive, but also could result in race conditions with multi threading.

The naming 'Update' is a bit confusing in my opinion. Some more options that provide to get the same behavior.
Is there a preference/precedence for this? I think comp might have something similar.

Yeah, if there's existing terminology for this, would be best to use that.

The "Start" and "Commit" batch seems a bit more intuitive, but also could result in race conditions with multi threading.

I don't think SelectionModel is designed to be thread-safe anyway?

I'm curious. why not pass the indices before it got removed ?

I figured this would be confusing if sometimes the indexes referred to indexes in the current collection, and sometimes to indexes in a previous state of the collection. Also what would you do with those indexes anyway? They're no longer valid, so I can't see any way to make use of them.

If changing selection in the SelectionChanged handler is not supported (reentrancy)

I think reentrancy is useful here - for example if you want to always have an item selected, you would do this by listening for a selection changed event and re-selecting an item if nothing is selected.

The most common case for this is displaying a list of strings: take a look at the issue I linked. If you display the list: [ "Foo", "Foo", "Bar" ] and then say "Foo" has been selected, which "Foo" are we talking about?

The "Foo" you are whose pointer you have. At least in ItemsSourceView, those get boxed so you can identify them even if you have the value "Foo" twice.

Seems like you'll be forcing a user to raise multiple selection changed events and making the class harder to use, all to avoid exposing some internal state that's there anyway?

It's not really an internal state, we don't really track "should we raise now" or not as some sort of state, operations just request to not raise it, but yes I see your point. In the issue linked, you could probably only raise the event once, but in some other scenarios it might not be possible. Maybe it would be better to have.

That may have been the original meaning of IDisposable but in my experience it's often used as a RAII pattern for C#. Some prior art:
https://reactiveui.net/docs/handbook/obsolete/collections/reactive-list#suppressing-notifications
http://introtorx.com/Content/v1.0.10621.0/03_LifetimeManagement.html#IDisposable
I'm sure there's more - I'm pretty sure there's examples of this in the BCL, though I can't remember where...

Well they use the "using" pattern, but we should not just pick an interface that was designed for something different.

A semaphore as traditionally defined is for synchronization across threads, what do you mean here?

The fact that a semaphore uses an counter internally but also defines the appropriate actions. Update and Dispose are not actions you would expect to use to increase/decrease a counter.

Of course, if the Update() wasn't placed in a using block or in a using statement scope. Not sure how one would implement this without running that risk however.

Guess that people just have to live with that risk then.

I don't think SelectionModel is designed to be thread-safe anyway?

I am not sure, I think we didn't take any precautions with that. However since with event handlers, you can not be entirely sure when code does get executed, so you could potentially have a problem here. Maybe this is irrelevant though.

I think reentrancy is useful here - for example if you want to always have an item selected, you would do this by listening for a selection changed event and re-selecting an item if nothing is selected.

Agree, we should be able to change selection inside the handler (though you have to watch out to not create a stackoverflow currently right?).

One alternative to the batch idea could be to just expose functions that suppress that event, just like we do internally. That way we wouldn't have to think about locks and possible problems of scoping.
Your thoughts @grokys and @ranjeshj ?

One alternative to the batch idea could be to just expose functions that suppress that event, just like we do internally. That way we wouldn't have to think about locks and possible problems of scoping.
Your thoughts @grokys and @ranjeshj ?

It is not just suppressing the event though right ? when the event finally gets raised, I still want to know everything that has changed.

Oh, that's true. We could have an internal batch then on which we add the changes. And the next time the event get's raised we will just show the changes of all previously suppressed "unhandled" changes and then clear the lists.

The "Foo" you are whose pointer you have. At least in ItemsSourceView, those get boxed so you can identify them even if you have the value "Foo" twice.

This might be a difference between C# and C++, in C# there's no easy way to do this I don't think. Also strings can be interned.

Well they use the "using" pattern, but we should not just pick an interface that was designed for something different.

Perhaps, I'm not aware of any guidance that states that IDisposable should only be used for managed resources, but I could have missed it ;)

One alternative to the batch idea could be to just expose functions that suppress that event, just like we do internally. That way we wouldn't have to think about locks and possible problems of scoping.
It is not just suppressing the event though right ? when the event finally gets raised, I still want to know everything that has changed.

Exactly, if you have items [0-5] selected then you clear the selection and reselect 5, the event will be raised with [0-4] as the deselected items.

Perhaps, I'm not aware of any guidance that states that IDisposable should only be used for managed resources, but I could have missed it ;)

Well it says "Provides a mechanism for releasing unmanaged resources." in the documentation, and I don't think that is what we are doing here.

This might be a difference between C# and C++, in C# there's no easy way to do this I don't think. Also strings can be interned.

If we cross the "border of ABI" C# strings will get boxed into winrt::hstring if I recall correctly, which support that. Interning of course would be a problem here, though it is a bit "weird" to have interned strings and add them multiple times to your selectionmodel. But we should probably support it?

@chingucoding, one piece of information that might be useful for you regarding needing indexes, is that in Avalonia, SelectionModel will be used provide the selection state for e.g. ListBox.
ListBox in UWP/WPF current handles duplicate items and so Avalonia needs to support this by extension.
If you have a list of string and receive a notification that an item "Foo" has been selected, you need to find the ListBoxItem that holds that item. The quickest way to do this is by looking it up by index, otherwise you need to enumerate every single string in your ListBox to find the correct one (even if you are able to distinguish between duplicates somehow).
You mention elsewhere:

With that in mind, maybe we should just return the selected indices and let the developer get the items?

Two responses to this:

When items are removed from the source collection, they no longer have an index
SelectionModel already exposes SelectedItems as well as SelectedIndices, which I think is a recognition that both ways of looking at the selection can be useful

@chingucoding, one piece of information that might be useful for you regarding needing indexes, is that in Avalonia, SelectionModel will be used provide the selection state for e.g. ListBox.

ListBox in UWP/WPF currently handles duplicate items and so Avalonia needs to support this by extension.

If you have a list of string and receive a notification that an item "Foo" has been selected, you need to find the ListBoxItem that holds that item. The quickest way to do this is by looking it up by index, otherwise you need to enumerate every single string in your ListBox to find the correct one
(even if you are able to distinguish between duplicates somehow).

Yes, that's true. One could use IndexOf to get the index. Though if we already have that internally we should expose it. Agreed, Thanks for the explanation!

Two responses to this:

When items are removed from the source collection, they no longer have an index

Should we remove the index too in that case? And how would your mapping work if we have an item in the collection, but it has no valid index? Wouldn't the collections get out of sync with batch processing?

SelectionModel already exposes SelectedItems as well as SelectedIndices, which I think is a recognition that both ways of looking at the selection can be useful

That's a good point.

My personal feeling is that that documentation is outdated. As I say, I could be wrong here though ;)

I think there's a difference between how some people use it and what it was designed to be used for. Maybe you should create an issue or PR for the doc page :)

Getting on this thread late, but loving the very detailed and technical discussion going on here.
One initial question I had while reading the proposal:

All of the collections are unpopulated when a change to the item source results in just the selected indexes being adjusted

If an item is added to the ItemsSource, is it guaranteed that it won't change the indices of the other items in the list? If so, shouldnt Selected/DeselectedIndices collections change when an item is added to the ItemsSource, regardless of if it's selected? The indices of selected items would be changing.
Although a lot of the details about the batching implementation have admittedly  gone over my head a bit, I think it is worthwhile to have as a part of the selection model as I see the importance of wanting to only raise one SelectionChanged event rather than one for each change.

If an item is added to the ItemsSource, is it guaranteed that it won't change the indices of the other items in the list?

No, it's quite likely that it will change the indices of the other items in the list. Let's first clarify what's happening here:

We have a list of chars as the ItemsSource: ['a', 'b', 'c', 'd']
We have index 2 selected, i.e. 'c'
Now we insert a new item at index 0 into the ItemsSource: itemSource.Insert(0, 'x)
Now our selection hasn't changed, but the index of the selected item has
SelectionChanged needs to be fired here, what with?

My decision was to fire SelectionChanged with all of the collections empty wasn't easy, but I debated it (with myself) and came to the following conclusions:

The selection hasn't actually changed - the same items are selected
Although the index of the selected item has changed - because ItemsSource has now been mutated the previous index now has no meaning: there's no way to use the old index to do anything useful with the current state of ItemsSource
Suppose we do want to populate DeselectedIndices with the old index. In all other cases DeselectedIndices refers to an index in the current ItemsSource - how do we tell the difference between "The deselected index refers to the current ItemsSource" and "The deselected index refers to a state of ItemsSource that is now lost"?

Because I couldn't come up with a use-case for the old index, I decided to signal this case by just leaving everything empty.
I definitely don't believe that this is the optimal solution however, and if we can come up with a use-case where the old index is useful then it may be that we need to find a way to signal this. Note that I did mention this subject in https://github.com/microsoft/microsoft-ui-xaml/issues/1645#issuecomment-576689668:

Should there be a flag for "indexes changed" where the selection hasn't changed, but the indexes of some of the selection has changed?

Maybe we do need such a flag, but I figured "empty collections all round" was as good a flag as any ;)

Is there value in having a separate IndicesChanged list ? Also, how did you handle the reset case ? I think it would be useful to clarify what the args will hold for each scenario below. I think I covered everything, please update the list if I missed something.

Item(s) selected
Items(s) deselected
Collection changes
(a) Items added, some selected items may have changed indices now
(b) Items moved, some selected items may have changed indices now
(c) Items removed, some selected items might have been removed
(d) Items replaced, some selected items might be replaced (same index, but new item)
(e) Reset -
i. source supports IKeyIndexMapping, in which case we can recreate what changed and make this a combination of a,b,c,d
ii. No IKeyIndexMapping, we are truly blind as to what changed, so just notify somehow that a reset happened.
What happens in cases above when there is no bound ItemsSource.

Maybe, instead of raising SelectionChanged, we could introduce a new event "IndicesChanged" or something along the lines. For that event, we could then provide a event args appropriate for that case. For example a mapping between the old and new index of the selected items.
The problem with handling this in SelectionChanged is what would happen if there are more and more corner cases? We would then have to bloat the SelectionEventArgs with properties that may be empty/false in most cases.

Yeah.. That crossed my mind as well. I think it would make sense to look at how this would be used from a control perspective. What would the handler code look like to handle all the cases.

Perhaps. Again I think we'd need some sort of use-case though.
In the case of Avalonia all controls that use SelectionModel also listen to the INotifyCollectionChanged.CollectionChanged event on the items source because they also need to update the containers that aren't selected. That means that additional information about how the indexes have changed in SelectionModel isn't necessary.
I suspect that this would be the case with most controls that want to use SelectionModel, but again, hard to know without more use-cases.

Fair point. Since without an IObservableCollection we aren't able to detect indices changes correctly, maybe we shouldn't inform about index changes then?
After all, if we are not giving information about what changed, there isn't much to do anyway except essentially "reload" everything.
I think the most common (and also designed) use case is using it with an ItemsRepeater. And mapping items to their selected state there is most commonly done by referring to the item in the collection since the ItemsRepeater only accepts simple indices but no IndexPath. And maybe there you wouldn't gain much by getting information "object a is now at index 3, not 4" since you can also access your UIObjects using the object.
So I am inclined to say,, this wouldn't help much at all. Maybe we shouldn't raise SelectionChanged in that case?

So I am inclined to say, this wouldn't help much at all. Maybe we shouldn't raise SelectionChanged in that case?

Possibly! Though note that SelectionChanged is currently raised in this case (which is why I left it in).

That's a good point indeed. Currently however the event is mostly useless in regard to clean up work on unselected items and similiar situations, so every event cause behaves the same.
I think in the NavigationView case which uses the SelectionModel, we are handling collection changes ourselves and wouldn't benefit from knowing the difference or being notified by the SelectionModel that the list has changed. But maybe this is something @ojhad can comment on, as he was the one who implemented the switch from ListView to ItemsRepeater (and SelectionModel) with #1818 .

After reading the last few comments it seems like there isn't a super common use case in which you'd need access to the changed indices after selection, and I see the dilemma that SelectionChanged is called in this instance, as @grokys laid out in this example above.
However I also see that it's important that SelectionChanged be called if the indices of selected items change - in case you have two duplicate strings and one becomes unselected, just knowing the list of objects that are selected won't inform you which of the duplicate strings is currently selected. Or is there a solution for that? If so, it seems like we don't need a Deselected/SelectedIndices list or an IndicesChanged list/event. Correct me if I'm wrong!  It just seems like having the object itself should be enough.

I think there isn't a solution for having the same object multiple times except using indices.
In most cases, having just the object is enough, but in some corner cases that can get problematic. To cover every case, we should probably include the indices too.
Would it make sense to decouple the event args from batching and have two proposals? Adding the event args is something we should probably do sooner than the batching, since the lack of any information what changed is a huge issue if we talk about performance or ease of use.

Sounds like two orthogonal problems to solve, so yes, they can be two separate proposals if that helps stage them independently. Thanks!

@grokys Do you want to create a separate proposal for batching or would you like me to do that?

Feel free to do it! I've not got a whole lot of time at the moment.

@grokys Created #2330 for this. Could you update your proposal to only include the SelectionModelSelectionChangedArgs ? :) Thank you!

Thanks for splitting up the issues! What are the loose ends here?
For the IndicesChanged list, providing that after an item is removed would only cause confusion and not be useful - for that reason, if it's possible we should return an IndicesChanged list for other collection change events, but not for removal.

I am not entirely sure when exactly we should raise the event:

When items get inserted?
When items get removed?

On the one hand, developers in some instances need to know that indices changed, on the other hand raising the SelectionChanged event with empty lists could be confusing.
I think the rest of this proposal is pretty clear: We have a list of deselected and selected indices and items where the n-th item of the selected indices list is the index of the n-th item in the selected items list. I would prefer having an object that contains both informations in a single object, instead of having two lists that are loosely coupled, but both solutions seem fine to me.

I am not entirely sure when exactly we should raise the event:

Are you referring to the SelectionChanged event?

When items get inserted?
When items get removed?

On the one hand, developers in some instances need to know that indices changed, on the other hand raising the SelectionChanged event with empty lists could be confusing.

When items are inserted, DeselectedIndices will return a list of the indices that were selected before this item's entrance (if it caused items to move around and the selection to change). If items are removed, and one of the removed items was previously selected, DeselectedIndices will return the index of the previously selected item that is now removed - that number is pretty useless and points to something else now. I think it would be appropriate in that case to just return null for DeselectedIndices to avoid confusion, rather than an empty list.
However, I still think that SelectionChanged should be raised whenever the selected indices or selected items change, whether that be by actual selection/deselection or by collection changes. Instead of controlling when to fire the event, it may make more sense to control which types of selection changes provide which types of information. @chingucoding and @ranjeshj let me know your thoughts.

I think the rest of this proposal is pretty clear: We have a list of deselected and selected indices and items where the n-th item of the selected indices list is the index of the n-th item in the selected items list. I would prefer having an object that contains both informations in a single object, instead of having two lists that are loosely coupled, but both solutions seem fine to me.

What kind of object are you thinking of here? A new type that has SelectedIndices and SelectedItems as list-type properties or just a list of two lists?

Are you referring to the SelectionChanged event?

Yes, sorry about the confusion.

I think it would be appropriate in that case to just return null for DeselectedIndices to avoid confusion, rather than an empty list.

That's true, returning null is probably be better. Though I am not such a fan of returning null in events as this would require additional code handling (check for null, then go through lists).

Instead of controlling when to fire the event, it may make more sense to control which types of selection changes provide which types of information.

If we are really technical, the items that have been selected to not change when we insert items, only the index of those items (which we can't inform the user about what the new one is). And since we don't tell the user what exactly is the new selection index wise, maybe a separate event is more logical here? If we were able to provide some sort of list of the old indices and the corresponding new ones, it might make more sense to raise SelectionChanged.

What kind of object are you thinking of here? A new type that has SelectedIndices and SelectedItems as list-type properties or just a list of two lists?

I was more thinking about an object that contains an IndexPath and an object, so we have to lists of those objects and you can iterate over those and ask for the index or object (or both) in a single iteration. E.g:
public SelectionTuple
{
    IndexPath Index;
    Object Item;
}

Hmm, okay, I'm definitely starting to come around to the idea of having a separate event for IndicesChanged. It makes more sense from an implementation side, but I'm not sure if it's something that would be so intuitive from the developer's side - i.e. developers may not think to listen for that event as they would selection changed.
However, if we had a separate event we could still return SelectedIndices with the SelectionChanged event as it might be useful. Looking for some clarity here: For IndicesChanged, it would fire every time an index gets matched up with a new item. Would we return a list of SelectionTuples as you drew out above? Or would it be a list of now-selected indices and now deselected indices? How could you use those two lists to compare to previous selections?
I'm also concerned that providing a more vague event like IndicesChanged makes it difficult to determine the best IndicesChangedEventArgs - it's very possible people would be using this for more than just selection.

It makes more sense from an implementation side, but I'm not sure if it's something that would be so intuitive from the developer's side - i.e. developers may not think to listen for that event as they would selection changed.

Agreed, that is one potential downside. The change if indices is somewhat a selectionchange and somewhat it is not, so it is hard to argue here what is the right event to handle that kind of change.

However, if we had a separate event we could still return SelectedIndices with the SelectionChanged event as it might be useful

Totally agree, I think we should still return the indices with the items that have been selected.

For IndicesChanged, it would fire every time an index gets matched up with a new item. Would we return a list of SelectionTuples as you drew out above? Or would it be a list of now-selected indices and now deselected indices? How could you use those two lists to compare to previous selections?

I think the best case would be something like "Old index -> New index" mapping that developers than can process as they wish. That way I think we have maximum transparency on what has happened. Because that is essentially what happens, some item moved from index  a to index b, and if you need the index, you would probably know that your selected item sits at index a which you could then update.

I'm also concerned that providing a more vague event like IndicesChanged makes it difficult to determine the best IndicesChangedEventArgs - it's very possible people would be using this for more than just selection.

Maybe we could name it like "SelectedItemsIndicesChanged" so it is clear that we are only caring about items that have been selected and whose index has changed. Having a "SelectedItemsIndicesChangedEventArgs" object would also probably prevent it from becoming to general as the name already is quite specific compared to IndiciesChangedEventArgs.

Agreed - something specific like SelectedItemsIndicesChanged or even just SelectionChangedIndices would get the message across. This might be the easiest way to control what info we pass back when theres a selection or collection change. @ranjeshj What do you think of this method of having two separate events, so we can control where we provide information on indices (preventing us from providing misleading or confusion info on every SelectionChanged event)?
Also, returning an object where the old index maps to the new index sounds like the right idea. Perhaps a slight change to the SelectionTuple object where it provides
IndexPath OldIndex;
IndexPath NewIndex;
object Item;

Also, returning an object where the old index maps to the new index sounds like the right idea. Perhaps a slight change to the SelectionTuple object where it provides
IndexPath OldIndex;
IndexPath NewIndex;
object Item;

Great idea! I think for the indices changed event that is all the information one might need to deal with that event.


Fix semantic release issues

Description
Amendments to the signed commit process to allow signed commits on concourse, signed commits confirmed to be possible on dev branch
If you have not checked any of the lists below explain why here.
Type of change
Please delete options that are not relevant.

[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] Technical Enhancements

Checklist:
If any of these are not completed, please explain why in the notes.
Definition of Done
Code and merges

[x] Code to be commented on where applicable
[x] Documentation updated where required
[x] Have considered non-functional requirements such as Security, Performance, Scalability, and Fault Tolerance
[x] I have linted the code

Testing

[x] All levels of acceptance test are passing (automated, integration, manual, accessibility, etc.)
[x] I have run the behave command to check the selenium behaviour tests pass locally
[x] Acceptance criteria met

Other Checks

[x] I have performed a self-review of my own code
[x] I have checked for spelling errors
[x] I have commented on my code, particularly in hard-to-understand areas
[x] My changes don't break anything unexpected
[x] I have checked and updated the security.txt file where required
[x] Up to date with the main branch

DEPLOY_URL=https://d2wze9kpy2sqb3.cloudfront.net/
cloudfront_id=ERRCFLCTKUGKE

DEPLOY_URL=https://d2wze9kpy2sqb3.cloudfront.net/
cloudfront_id=ERRCFLCTKUGKE

DEPLOY_URL=https://d2wze9kpy2sqb3.cloudfront.net/
cloudfront_id=ERRCFLCTKUGKE

rebase performed to pick out commits made by ci without signed commits


claimserver

add claim server module

Also, I've opened this issue #87 to organize the code better.  In this commit I can see that some code is copied from other servers.


Use of this in Commercial Products will require MFI Licence ?

Please forgive me if i am confused.
But i saw that the other sdk from espressif has a different commercial version, and that can be used for commercial version and for that mfi license is compulsory.
I wonder if we can use this library in commercial products or not without mfi license?

Hi, the one of the significant libraries which are used for this implementation is wolfssl, whisch  is under GPL-2.0 License, therefore my understanding, you are not permitted to use my implementation for commercial purpose.


Having JS off or a broken connection not downloading all js result in bad layout

I am often out of good reception walking with my dogs, and often loading breaks mid download. So I feel this lacks a good default non-js-layout. As an example the menu to the right with the content after is not defaulting to be responsive. One must scroll like 10 pages to get to the content...

..so for my this means a bad mobile experience. AMPs shoudl have a good default layout so that they render good even before the js is downloaded..

Could you please provide a few more details:

what device and which browser are you using?
what do you mean by menu on the right?

Doesn't matter what device. I just simulated that the js was not downloaded
and it looks like this. Maybe it is just this sites' css that is missing
some default styling though...
Bästa hälsningar
Anders Lönnberg
REISEGIGANTEN AS
Rosenkrantz' gate 9
N-0159 Oslo
<EMAIL_ADDRESS>mob +46 708 30 43 53
fax   +47 21 09 50 01
sistaminuten.se http://www.sistaminuten.se/, reisegiganten.net
http://www.reisegiganten.net/, afbudsrejser.dk
http://www.afbudsrejser.dk/, restplass.no http://www.restplass.no/,
solfaktor.dk http://www.solfaktor.dk/, solfaktor.no
http://www.solfaktor.no/, solfaktor.se http://www.solfaktor.se/
2016-09-21 12:49 GMT+02:00 Sebastian Benz<EMAIL_ADDRESS>
Could you please provide a few more details:

what device and which browser are you using?
what do you mean by menu on the right?

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/ampproject/amp-by-example/issues/374#issuecomment-248576531,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AGpk6d4Vs5ayuDNZ7h9UQx-fnnk-rkmHks5qsQvOgaJpZM4KCNo1
.


Can't get input value if there is no input event listener

I have a component named wxc-form which should get input value without oninput OR onchange.
Here is an online demo:  input-bug, demo code
When you input 1111 to first input control, 2222 to second input control. Get current input value. The result is: input-1 equal to 1111 which is i want, input-2 is equal to an empty string which i think is a bug.
The same issue is occurred on android too.

Relative issues: #1000

This is an known issue. Yes you have to add event listener for it. Sorry about that...
Maybe we will find some way to solve it in the future.
Thanks.


chore(main): release 2.1.1

:robot: I have created a release beep boop
2.1.1 (2024-07-16)
Bug Fixes

cloud: get default keys as static (#229) (815643a)

This PR was generated with Release Please. See documentation.

Summary by CodeRabbit

Bug Fixes

Resolved an issue with retrieving default keys in the cloud functionality.

Chores

Updated version number to 2.1.1.

:warning: Please install the  to ensure uploads and comments are reliably processed by Codecov.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 35.95%. Comparing base (815643a) to head (ad3036a).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #230   +/-   ##
=======================================
  Coverage   35.95%   35.95%
=======================================
  Files          81       81
  Lines        7064     7064
=======================================
  Hits         2540     2540
  Misses       4524     4524

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:robot: Created releases:

v2.1.1
:sunflower:


Update quickstart to v21 core and XDR.

If you approve https://github.com/stellar/quickstart/pull/594 and merge it first, this PR should pass.


Error when running using Python 3.11.1

This error occurred when I tested my project using Python 3.11.1 and mutatest 3.1.0, with the following command mutatest -t "python -m pytest".
Traceback (most recent call last):
  File ".../src/backend/venv/bin/mutatest", line 8, in <module>
    sys.exit(cli_main())
             ^^^^^^^^^^
  File ".../src/backend/venv/lib/python3.11/site-packages/mutatest/cli.py", line 731, in cli_main
    main(args)
  File ".../src/backend/venv/lib/python3.11/site-packages/mutatest/cli.py", line 779, in main
    results_summary = run.run_mutation_trials(
                      ^^^^^^^^^^^^^^^^^^^^^^^^
  File "..../src/backend/venv/lib/python3.11/site-packages/mutatest/run.py", line 609, in run_mutation_trials
    mutation_sample_dispatch(
  File ".../src/backend/venv/lib/python3.11/site-packages/mutatest/run.py", line 530, in mutation_sample_dispatch
    current_mutation = random.sample(mutant_operations, k=1)[0]
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "~/.pyenv/versions/3.11.1/lib/python3.11/random.py", line 436, in sample
    raise TypeError("Population must be a sequence.  "
TypeError: Population must be a sequence.  For dicts or sets, use sorted(d).

I realize that this package does not support Python 3.11.1, however, the fix for this should be as simple as converting the mutant_operations set to a list using list().

Ah, i see this has been addressed already, closing the issue

Where was this addressed please? I still have to manually do this when pip installing mutatest.


Logs?

Love the integration thanks so much for it. It's so slick compared to good old bwalarm. The only thing I'm missing is the tablet friendly arm/disarm screen that bwalarm had.
Quick query: is there a log anywhere for Alarmo? The documentation makes reference to it but I can't find one anywhere.
Thanks

Alarm Iogs should appear in the home assistant log.
It’s not very common for a component to have it’s own separated log, but it may be added at some point.
Alarmo focuses on the easy of configuration rather than providing a GUI for operation of the alarm (as BWalarm does).
There are many Lovelace cards available which you can use to create your own panel. It seems like the way forward.
I might consider adding an Alarmo-specific keypad card since I think the default one has some quirks.

Alarm Iogs should appear in the home assistant log.
It’s not very common for a component to have it’s own separated log, but it may be added at some point.
Alarmo focuses on the easy of configuration rather than providing a GUI for operation of the alarm (as BWalarm does).
There are many Lovelace cards available which you can use to create your own panel. It seems like the way forward.
I might consider adding an Alarmo-specific keypad card since I think the default one has some quirks.

Thanks.  The reason I wondered if it had separate logs I noticed an employee tried to arm the alarm yesterday and it wouldn't arm because of open sensors but couldn't see that the reason got spat out anywhere. I had a look in the HA logs but couldn't see anything.

Thanks.  The reason I wondered if it had separate logs I noticed an employee tried to arm the alarm yesterday and it wouldn't arm because of open sensors but couldn't see that the reason got spat out anywhere. I had a look in the HA logs but couldn't see anything.

This is what should be logged when you arm the system:

2021-01-20 18:38:44 INFO (MainThread) [custom_components.alarmo.alarm_control_panel] Alarm is now arming. Waiting for 30 seconds.
Followed by this message (after the exit delay) in case there are open sensors:

2021-01-20 18:39:14 INFO (MainThread) [custom_components.alarmo.alarm_control_panel] Cannot transition from state arming to state armed_away, there are open sensors
The details of which sensors + their states can be found in the entity attributes:

I recommend to either send a push message or having a wall panel display for sharing this info with the end-user.

This is what should be logged when you arm the system:

2021-01-20 18:38:44 INFO (MainThread) [custom_components.alarmo.alarm_control_panel] Alarm is now arming. Waiting for 30 seconds.
Followed by this message (after the exit delay) in case there are open sensors:

2021-01-20 18:39:14 INFO (MainThread) [custom_components.alarmo.alarm_control_panel] Cannot transition from state arming to state armed_away, there are open sensors
The details of which sensors + their states can be found in the entity attributes:

I recommend to either send a push message or having a wall panel display for sharing this info with the end-user.

2021-01-20 18:38:44 INFO (MainThread) [custom_components.alarmo.alarm_control_panel] Alarm is now arming. Waiting for 30 seconds.

Interesting - Alarmo doesn't seem to log a thing on my system, as I thought. I'm looking at this URL:
http://homeassistant.local:8123/config/logs
Is it possible you've got some kind of logging enabled as the dev that users don't automatically have setup?

2021-01-20 18:38:44 INFO (MainThread) [custom_components.alarmo.alarm_control_panel] Alarm is now arming. Waiting for 30 seconds.

Interesting - Alarmo doesn't seem to log a thing on my system, as I thought. I'm looking at this URL:
http://homeassistant.local:8123/config/logs
Is it possible you've got some kind of logging enabled as the dev that users don't automatically have setup?

You can set the log level in configuration.yaml. Also you can use a custom log level for components.
E.g.:
logger:
  default: info
  logs:
    custom_components.alarmo: debug

Most useful loggings for alarmo have log level info.
I use debug for development purposes/troubleshooting.

You can set the log level in configuration.yaml. Also you can use a custom log level for components.
E.g.:
logger:
  default: info
  logs:
    custom_components.alarmo: debug

Most useful loggings for alarmo have log level info.
I use debug for development purposes/troubleshooting.

I'm closing this issue, assuming that your question is answered.
Please use GitHub issues only for bugs and feature requests.
Questions can be asked through the forum thread: https://community.home-assistant.io/t/custom-component-alarmo-browser-managed-alarm-system/238910

I'm closing this issue, assuming that your question is answered.
Please use GitHub issues only for bugs and feature requests.
Questions can be asked through the forum thread: https://community.home-assistant.io/t/custom-component-alarmo-browser-managed-alarm-system/238910


Missing Damaged God Books

As the title says, the Damaged Book's don't count toward protection, although they do provide protection as stated on the wiki.
Example:
https://oldschool.runescape.wiki/w/Damaged_book_(Armadyl)

Fixed in PR
#4


FeatureRequest-Build skia to UWP from source steps

Hello Guys,
Could you please share the steps of building skia from SKIA source to universal windows platform ?
Any help, tips is appreciated.

You should be able to run the externals-uwp task to get the native bits:
> .\bootstrapper.ps1 -Target externals-uwp

To do all the bits (the managed bits as well as the native bits), you can run the libs task:
> .\bootstrapper.ps1 -Target libs

This is what we run on CI. Let me know if this is what you are looking for, or if you are looking for something more specific.

First, thank you so much for your responce.
I'm trying to get SKIA source (Latest source) and build it to UWP.
I found you guys already support this through C#, but need to build the latest from source, so I thought there might be a steps to do it here.

you can check out SkiaSharp (make sure the submodules come too) and then run the commands above.
The actual C/C++ source lives here: https://github.com/mono/skia/tree/xamarin-mobile-bindings
And the actual commands that are run in the externals-uwp target are here: https://github.com/mono/SkiaSharp/blob/master/cake/BuildExternals.cake#L165-L189
As for some real docs, I do need to get around to that.

To get the latest source, I have to merge from upstream into our skia fork. I want to do that very soon. It is mostly a painless operation, but Google often changes a few types :) changes values of enums :) and deprecates/removes members :) It typically takes a day or so.
The version number that I release as "stable" is the version that Chrome has as "stable". Right now it is 59. It typically works as "master" => alpha; "master-1 (m60)" => beta; "master-2 (m59)" => stable (after a few days)


fix: board overflow

fix #15

@eternaleclipse can you check it on your mobile please?

Your first commit changed also Board.tsx
Was it on purpose?
If not, you can add new commit to revert the changes? (See "Files Changed"  section)

It was intended. Only removing overflow-hidden caused other issues in other screen sizes due to css in board.

I fear, then, that you introduced other old bugs:

Testing on iPhone 12 SE running on Brave Version 1.49.1 (latest, on iOS):
https://user-images.githubusercontent.com/12075301/234227888-c337adda-75b7-4d16-8865-7af3a244e25e.mp4
There are several behaviors that can be observed here.

When the app starts, on Puzzle 1, the board is squeezed.
When moving to the next puzzle, the board resets to a good layout that covers the entire width - this is great! This is the same for puzzles 2-6.
However, in these puzzles, the user cannot scroll down (this may be because of the other container having overflow-hidden. This is the same for puzzles 2-6.
When the user goes back to to puzzle 1, the board shifts right and overflows out of the screen.

I'm working on getting us a free subscription to BrowserStack for easier testing.
They have a life-time sponsorship program for open-source projects.
https://www.browserstack.com/open-source

fixed in #92


[SPARK-30703][SQL][DOCS][FollowUp] Declare the ANSI SQL compliance options as experimental

What changes were proposed in this pull request?

This is a follow-up of https://github.com/apache/spark/pull/27489.
It declares the ANSI SQL compliance options as experimental in the documentation.
Why are the changes needed?

The options are experimental. There can be new features/behaviors in future releases.
Does this PR introduce any user-facing change?

No
How was this patch tested?

Generating doc

Test build #118455 has started for PR 27590 at commit e8837f9.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/23212/
Test PASSed.

Test build #118455 has finished for PR 27590 at commit e8837f9.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/118455/
Test PASSed.

Do you think the new features/behaviors will revert the existing provided behavior?

@dongjoon-hyun I think there can be new features for the spark.sql.ansi.enabled
For spark.sql.storeAssignmentPolicy,  if spark.sql.ansi.enabled is enabled by default, then it is possible that the storeAssignmentPolicy option is replaced. Also, there can be new behaviors/policy.

@gengliangwang @dongjoon-hyun
Hi, I have a question.
In Spark 3.2.1, are spark.sql.ansi.enabled and spark.sql.storeAssignmentPolicy still considered as experimental options ?
I understand that there is an epic named ANSI enhancements in Spark 3.3 https://issues.apache.org/jira/browse/SPARK-38860 which means there will be new features for the  spark.sql.ansi.enabled.
But as in https://spark.apache.org/releases/spark-release-3-2-0.html, ANSI SQL mode GA (SPARK-35030) is mentioned in the Highlights section, so I think it is not experimental anymore. Could you please give me your opinion?

I think we can remove the experimental mark now. What do you think? @gengliangwang

@tanvn nice catch!
@cloud-fan Yes I will update the docs on 3.2 and above


Typo in project description :)

integrats -> integrates
Github project description that is!

Also, thanks for the shout out in the readme! Totally not needed but I appreciate the project and your hard work man!

This is the least to be done for your effort and contribution :)


Remove dupicate doc

Issue found by build for #3064.  Unrelated to that PR.

Although, not 1.0.2, since #3050 didn't go there

Merged.
master: a01dbac232166563cdeafcbe31f321c05d164a10
1.1.0: 1d1255fe992efe2c65db7e0a6722b55ede03034a


add admonitions to refer to section on how to execute nbs

deployed website: https://nicrie.github.io/sketchbook-earth/01_greenhouse_gases/01a_greenhouse_gases.html


Actual program which describes the structure of neural u-net?

There is no code in this repository that deals with creation of creating a neural net in tensorflow. Could you please upload it? Your results seem interesting.

The keras models can be visualized.
base_generator:

style2paints

u can use tensorboard as well.

Thanks!

@abbychau  So it looks like that this sketchKeras model is just like U net, and treat the sketch extract as a edge pixel classificate job?


Fix tests

Coverage decreased (-0.3%) to 84.596% when pulling e7ce5a51a0c9fc6cada701bf6d6c768b0644b926 on feature/test into d3353ac6f5027d79d443433a7a00c6964d9516b3 on master.


Add missing bodies in AppGw's examples

Fixes https://github.com/Azure/azure-rest-api-specs/issues/6749
Contribution checklist:

[x] I have reviewed the documentation for the workflow.
[x] Validation tools were run on swagger spec(s) and have all been fixed in this PR.
[x] The OpenAPI Hub was used for checking validation status and next steps.

ARM API Review Checklist

[x] Service team MUST add the "WaitForARMFeedback" label if the management plane API changes fall into one of the below categories.
adding/removing APIs.
adding/removing properties.
adding/removing API-version.
adding a new service in Azure.

Failure to comply may result in delays for manifest application. Note this does not apply to data plane APIs.

[x] If you are blocked on ARM review and want to get the PR merged urgently, please get the ARM oncall for reviews (RP Manifest Approvers team under Azure Resource Manager service) from IcM and reach out to them.
Please follow the link to find more details on API review process.

Automation for azure-sdk-for-go

Automation for azure-sdk-for-python

Can one of the admins verify this patch?


hosted nuget.server tips 502 (not found),what's that mean?

#Custom Nuget.Server by hostself.
hostname:https://nuget.jingshonline.com/nuget
I'm using chinese language with vs 2015 up3.
error:
严重性	代码	说明	项目	文件	行	禁止显示状态
错误		响应状态代码不指示成功: 502 (Not Found)。			0

NOTE: on other solution it's works fine

Moved to client repository: https://github.com/NuGet/Home/issues/3879


New pallet_oracle

Introducing a pallet_oracle that fetches the current price (of FRAG/USD when it will be available) from Chainlink's Price Feed smart contract on Ethereum and prepare an unsigned transaction (with signed payload) to feed the result back on chain.
The on-chain logic will simply aggregate the results and store last n values to compute the average price.

Ping me when it's not draft and green before review please 🙏

@sinkingsugar ping! 😄
The biggest changes compared to your last review:

the price is stored as single value (no more in a vector and no average is calculated anymore, as discussed)
the address of the oracle smart contract is set from the command line (same as geth_url). In case it is not set from there, the offchain worker does not start its logic (same as pallet-account if geth_url is not set)
I introduced a deadline (wait: Option<Timestamp>) in the primitive function http_json_post in order to handle also the case when fetching from oracle takes more than 3 seconds.

missing (need suggestions)

I did not implement a way to stop the offchain worker. I am thinking about an extrinsic that overrides the address of the oracle smart set from command line with a defined stop value so that, in the next block, the offchain worker stops.
But I'd like your opinion. Also @aang114 any idea on this?

@sinkingsugar I moved the oracle address back into the runtime and added oracle data validations.

The stop yes has to be an extrinsic from sudo 👍

Done. 👍

Approved but @aang114 should give it a review

@sinkingsugar @aang114 any more comments for this PR?


Adds support for Doc field as in default report

The report.html created by Robot has these columns by default, which I am planning to use to customize the report. Any custom HTML must be honored (as in the Robot report), hence the extra call to html_format.

Great idea, actually. Done!
I committed the changes, please check it out.
Thanks,
Sent from my iPad

On Feb 15, 2022, at 6:44 PM, Shiva Prasad Adirala @.***> wrote:

Thank you @pianofab for pull request. I like the idea but most of the time i'm less worried about documentation.
Let us enable documentation based on user choice (by default false). We have did same thing for tags - https://github.com/adiralashiva8/robotframework-metrics/blob/71c52f2dffb7f082c0c6fdb1c0fe2ec1be876e50/robotframework_metrics/runner.py#L71
Could you please modify PR similar way.
Thank you
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you were mentioned.


Accessing data in another schema using Data APIs

The following query syntax for is not documented:
{
    "type": "select",
    "args": {
        "table": {
            "schema":"hauthy",
            "name": "hasura_auth_user"
        },
        "limit":10,
        "columns": [
            "*"
        ]
    }
}

@dsandip @coco98  whats the use case for this?
I find putting this in docs slightly weird. This seems to be a feature beyond the "Data microservice". Why should user be able to use "data" apis to mess with "auth" data?

Need this for pre-existing postgres with data across schemas


Custom wrapper, required label not removed until focus control

Description
I am using custom wrapper. In some scenarios some controls are marked as required depending on use case (manually adding Validations.required).
Minimal Reproduction
https://stackblitz.com/edit/angular-hnhdlf?file=src%2Fapp%2Frepeat-section.type.ts,src%2Fapp%2Fapp.component.ts,src%2Fapp%2Fapp.module.ts,src%2Fapp%2Fform.extension.ts,src%2Fapp%2Fcustom-wrapper%2Fcustom-wrapper.component.ts,src%2Fapp%2Fcustom-wrapper%2Fcustom-wrapper.component.html
To reproduce:
just check Email radio button (i know it it hidden but Email , Phone and Mail are radio buttons.
Required label will be shown on right side.. enter some value in email input.. and then select Phone... Email required label is not gone until  i focus email input...
Your Environment

Angular version: 16.2.1
Formly version: 6.1.1

Additional context

better rely on props.required instead which will detect changes and trigger the view rendering or you may need to call ChangeDetectorRef.detectChanges() manually.


Controller assets from kenney.nl

Relating to controller art, Kenney is currently working on controller assets  which will be published under CC0 (public domain).
As far as I understand these will only be input prompts, but it covers "all common controllers, plus keyboard and mouse".
No publication date scheduled yet, but I expect it'll be a couple of months before they are ready.

I've been watching Kenney's work on Twitter!
When he's done, we'll likely pull it into this project as its own theme, so developers can choose it as their primary art set if they want.

The assets have been published here: https://kenney.nl/assets/input-prompts !

These are in now!


add a card preparer for dataset xlsum

this script can run all the way through only after pull request 288 is merged

open  PR #301 instead, and recommitted  with signature


fix panic on GAT

Signed-off-by: Alex Chi<EMAIL_ADDRESS>This is still a workaround on GAT panic, and didn't solve the full problem. But at least we won't panic now. False positive is better than panicking and letting VSCode constantly pop out the warning 🤣
This PR is simple -- only apply the https://github.com/rust-analyzer/rust-analyzer/pull/11878 fix on const generics. For normal GATs, just follow the previous approach.
This PR fixes https://github.com/rust-analyzer/rust-analyzer/issues/11939, I've added it as a test case.
This PR didn't fully fix / https://github.com/rust-analyzer/rust-analyzer/issues/11923. But at least it won't panic now -- will only give a type mismatch error.
Not sure if it fixes / https://github.com/rust-analyzer/rust-analyzer/issues/11921, I'll test it later.
cc @flodiebold for review, thanks!

bors r+

changelog fix (first contribution) fix GAT panics


ci: merge opae-libs

Automated changes by create-pull-request GitHub action.
Must be use a normal merge (not squash-merge and not rebase-merge)

Coverage remained the same at 63.915% when pulling ad5f662942fa3a1baabdecce51a2ffd4ffc885c0 on auto/update-libs into d8746e9927381e99b5f828fbc90c733de518ca04 on master.


Rename camus operations so that it's uniquely named

@confluentinc It looks like @joel-hamill just signed our Contributor License Agreement. :+1:
Always at your service,
clabot


Update guidance on anonymous user to highlight more what they do/don't have access to

Right now the language around anonymous user says they don't have access to the meeting window - we should be more descriptive about the fact that they can access Task Modules/AC if allowed by the organization.

@islubin Hi Isabella for this issue in this document
https://docs.microsoft.com/en-us/microsoftteams/platform/apps-in-teams-meetings/teams-apps-in-meetings
Anonymous user description is provided as you have mentioned. Could you please provide more details on what needs to be added further.

Linked to https://github.com/MicrosoftDocs/msteams-docs/pull/3065


Documentation changes

Class proxies usage

Possibly remove proxies from experiments

Also add custom events when they're added


Not compatible with Stylelint 14 ?

Hi,
I'm under the impression that the plugin doesn't work with Stylelint ^14 ?
When I'm using the version 14.5.3 of Stylelint, SublimeLinter is showing me the prompt with "No lint results. Running stylelint." (even when I'm leaving errors on purpose).
It is as if the .stylelintrc.json file was not found or not understood.
There are no error in my .stylelintrc.json file because if I run Stylelint in CLI, the errors are showing as intended.
In the Sublime console, I got this message, but I don't know if it is related:
WARNING:SublimeLinter.plugin.stylelint:stylelint output:
(node:26109) ExperimentalWarning: The fs.promises API is experimental
(node:26109) ExperimentalWarning: Readable[Symbol.asyncIterator] is an experimental feature. This feature could change at any time
TypeError: [configExtends].flat is not a function
    at extendConfig (/Users/[redacted]/node_modules/stylelint/lib/augmentConfig.js:196:44)
    at augmentConfigBasic (/Users/[redacted]/node_modules/stylelint/lib/augmentConfig.js:52:26)
    at augmentConfigFull (/Users/[redacted]/node_modules/stylelint/lib/augmentConfig.js:106:30)
    at Object.transform (/Users/[redacted]/node_modules/stylelint/lib/getConfigForFile.js:51:37)
    at run (/Users/[redacted]/node_modules/stylelint/node_modules/cosmiconfig/dist/Explorer.js:42:49)

SublimeLinter: #17 linter.py:810      Note: above warning will become an error in the future. Implement `on_stderr` if you think this is wrong.
INFO:SublimeLinter.plugin.stylelint:Note: above warning will become an error in the future. Implement `on_stderr` if you think this is wrong.
SublimeLinter: #17 linter.py:1220     stylelint: no output
INFO:SublimeLinter.plugin.stylelint:stylelint: no output
SublimeLinter: sublime_linter.py:593  Linting '_elements.page.scss' took 0.33s
INFO:SublimeLinter.sublime_linter:Linting '_elements.page.scss' took 0.33s

In the same project configuration, if I downgrade to Stylelint 13, SublimeLinter is prompting me the errors as expected.
As far as I know, with the 14 version Stylelint no longer includes the syntaxes for SCSS. Could it be the cause of the problem in SublimeLinter ?

Well, old issue.  TypeError: [configExtends].flat is not a function and the stacktrace that follows indicates that stylelint crashes completely.  flat not being available ("a function") indicates that you're running an older node version here.  So it is not SublimeLinter that is incompatible with version 14 but your nodejs is incompatible with your styleint version.  That's what I would read into this.
Of course it is half a lie to say No lint results if the program crashes.  :shrug:  The comment  Note: above warning will become an error in the future obviously did not happen probably fear of breaking changes.  So the crashing just generates a warning not an error.

That was indeed a problem with the nodeJS version used by Sublime Text.
Thanks !


Update AUTHORS.rst

Why not? :-)

Coverage remained the same at 54.09% when pulling 862f19f490717a2bab0d23a3c5083a8ff76a99da on bashu:patch-1 into f961e717e76416d83d8da506c7533d2268fb3c3f on jp74:master.

Coverage remained the same at 54.09% when pulling 862f19f490717a2bab0d23a3c5083a8ff76a99da on bashu:patch-1 into f961e717e76416d83d8da506c7533d2268fb3c3f on jp74:master.

Why not :).. Thanks for contributing to the project.


Lock icon styling

The right panel shows lock icon. Is it possible to change color of icon to say green, when an api key is added?

duplicate of #645
An API can have complex API-key requirements , it may

need just one key
or multiple keys
mix of keys evaluated using AND / OR

Therefore we suggest you to check at the bottom of the request which exactly states how many keys are applied. A green color wont be able to convey this properly


Update the metadata rules to use "deprecated" vs "unimplemented"

Unimplemented doesn't convey the reason you should remove these from
your code. If you're on 11, 12, or 13 you want these gone
Signed-off-by: Tim Smith<EMAIL_ADDRESS>

Ping @coderanger


Proposal for GRANDPA spec

Project Abstract
Proposal for https://grants.web3.foundation/docs/RFPs/formal_guarantees_for_grandpa
I am open to discuss, receive feedback and make changes to the proposal.
Grant level

[ ] Level 1:  Up to $10,000, 2 approvals
[x] Level 2:  Up to $30,000, 3 approvals
[ ] Level 3:  Unlimited, 5 approvals (for >$100k: Web3 Foundation Council approval)

Application Checklist

[x] The application template has been copied and aptly renamed (project_name.md).
[x] I have read the application guidelines.
[ ] Payment details have been provided (Polkadot AssetHub (USDC & DOT) address in the application and bank details via email, if applicable).
[ ] I understand that an agreed upon percentage of each milestone will be paid in vested DOT, to the Polkadot address listed in the application.
[x] I am aware that, in order to receive a grant, I (and the entity I represent) have to successfully complete a KYC/KYB check.
[x] The software delivered for this grant will be released under an open-source license specified in the application.
[ ] The initial PR contains only one commit (squash and force-push if needed).
[ ] The grant will only be announced once the first milestone has been accepted (see the announcement guidelines).
[ ] I prefer the discussion of this application to take place in a private Element/Matrix channel. My username is: @_______:matrix.org (change the homeserver if you use a different one)

I have read and hereby sign the Contributor License Agreement.

thanks a lot for submitting the application. We have recently been working with a team for formally specifying and verifying GRANDPA. We realised that the project is quite involved and plan to restructure it as a research project with publication as one of the objectives. The RFP should have already been closed, which was an oversight on our part.


Hub on huge load produce: Unable to determine type from: <. Last 1 characters read: <

Selenium hub under load return too often empty response and WebDriverException:
Unable to determine type from: <. Last 1 characters read: <
Carina on the low level of finding element did only 2 attempts to find element and if both failed we had an exception in regular web/mobile tests.
ExtendedWebElement refindMethod should implement fluent waiter with RETRY_INTERVAL in ms as polling interval, EXPLICIT_TIMEOUT as an exception.

fixed: https://github.com/qaprosoft/carina/pull/1090
6.4.40-SNAPSHOT+

Done. Closing based on customer feedback.


Word wrapping in decompile window

Word wrapping
I'd like to have the option of wrapping long lines in the decompile window, to make it easier to see them without lots of scrolling.
eg.

Will be added in 2.11.0


Error when running ./spdm_responder_emu --cap CERT,MEAS_NO_SIG,CHAL on SPDM_NEGOTIATE_ALGORITHMS

I'm running spdm_responder_emu and ./spdm_responder_emu --cap CERT,MEAS_NO_SIG,CHAL
and getting this error:  (logs are attached)
SpdmReceiveRequest[0] msg SPDM_NEGOTIATE_ALGORITHMS(0xe3), size (0x30):
0000: 13 e3 04 00 30 00 01 02 90 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01
0020: 02 20 1b 00 03 20 06 00 04 20 0f 00 05 20 01 00
SpdmSendResponse[0] ...
SpdmSendResponse[0]: msg SPDM_ERROR(0x7f), size (0x4):
0000: 13 7f 01 00
req_meas_chal_cert.log
res_meas_chal_cert.log

Issue 1: https://github.com/DMTF/libspdm/issues/2474


Not getting hashes in meta tag

Description
I am not seeing hashes in the meta tag when I expected I would.  I do seem to get nonces, but they don't appear to work.
What type of issue is this? (place an x in one of the [ ])

[ ] bug
[ ] enhancement (feature request)
[X] question
[ ] documentation related
[ ] testing related
[ ] discussion

Requirements (place an x in each of the [ ])

[X] I've read and understood the Contributing guidelines and have done my best effort to follow them.
[X] I've read and agree to the Code of Conduct.
[X] I've searched for any related issues and avoided creating a duplicate issue.

Bug Report
If I use this as my webpack configuration:
new HtmlWebpackPlugin( {
                filename: "../app/html/webpack_index.html",
                template: "app/html/index_template.html",
                chunks: [ "app" ],
                cspPlugin: {
                    enabled: true,
                    policy: {
                        "base-uri": "'self'",
                        "object-src": "'none'",
                        "script-src": [ "https://<IP_ADDRESS>:8080", "'self'" ],
                        "style-src": [ "https://<IP_ADDRESS>:8080", "'self'"],
                        "font-src": [ "'unsafe-inline'", "'unsafe-eval'", "https://<IP_ADDRESS>:8080", "'self'" ],
                    },
                    hashEnabled: {
                        "script-src": true,
                        "style-src": true,
                    },
                    nonceEnabled: {
                        "script-src": true,
                        "style-src": true,
                    },
                },
            } ),
            new HtmlWebpackPlugin( {
                filename: "../app/html/webpack_popup.html",
                template: "app/html/popup_template.html",
                chunks: [ "form" ],
            } ),
            new HtmlWebpackPlugin( {
                filename: "../app/html/webpack_codemirror.html",
                template: "app/html/codemirror_template.html",
                chunks: [ "editor" ],
            } ),
            new HtmlWebpackPlugin( {
                filename: "../app/html/webpack_error_wrapper.html",
                template: "app/html/error_wrapper_template.html",
                chunks: [ "error" ],
            } ),
            new HtmlWebpackPlugin( {
                filename: "../app/html/webpack_documentation.html",
                template: "app/html/documentation_template.html",
                chunks: [ "docs_entry" ],
            } ),
            new CspHtmlWebpackPlugin( {
                "base-uri": "'self'",
                "object-src": "'none'",
                "script-src": [ "'unsafe-inline'", "'unsafe-eval'", "https://<IP_ADDRESS>:8080", "'self'" ],
                "style-src": [ "'unsafe-inline'", "'unsafe-eval'", "https://<IP_ADDRESS>:8080", "'self'"],
                "font-src": [ "'unsafe-inline'", "'unsafe-eval'", "https://<IP_ADDRESS>:8080", "'self'" ],
            }, {
                enabled: true,
                hashingMethod: "sha256",
                hashEnabled: {
                    "script-src": true,
                    "style-src": true,
                },
                nonceEnabled: {
                    "script-src": false,
                    "style-src": false,
                },
            } ),

then it produces this output (for the app chunk):
<meta http-equiv="Content-Security-Policy" content="base-uri 'self'; object-src 'none'; script-src https://<IP_ADDRESS>:8080 'self' 'nonce-iy87WccFQS7zHW0XbzFJCw=='; style-src https://<IP_ADDRESS>:8080 'self' 'nonce-eqk3Sox+amk9wfdSl3g5GQ=='; font-src 'unsafe-inline' 'unsafe-eval' https://<IP_ADDRESS>:8080 'self'>
and I see this error:
<meta http-equiv="Content-Security-Policy" content="base-uri 'self'; object-src 'none'; script-src https://<IP_ADDRESS>:8080 'self' 'nonce-iy87WccFQS7zHW0XbzFJCw=='; style-src https://<IP_ADDRESS>:8080 'self' 'nonce-eqk3Sox+amk9wfdSl3g5GQ=='; font-src 'unsafe-inline' 'unsafe-eval' https://<IP_ADDRESS>:8080 'self'; connect-src 'unsafe-inline' 'unsafe-eval' https://<IP_ADDRESS>:8080 'self' https://ipv4.icanhazip.com wss://<IP_ADDRESS>:8080 https://api.keygen.sh">
which is coming from addStyles.js, part of the style-loader package.
If I now set the nonce enabled to be false, as below:
new HtmlWebpackPlugin( {
                filename: "../app/html/webpack_index.html",
                template: "app/html/index_template.html",
                chunks: [ "app" ],
                cspPlugin: {
                    enabled: true,
                    policy: {
                        "base-uri": "'self'",
                        "object-src": "'none'",
                        "script-src": [ "https://<IP_ADDRESS>:8080", "'self'" ],
                        "style-src": [ "https://<IP_ADDRESS>:8080", "'self'"],
                        "font-src": [ "'unsafe-inline'", "'unsafe-eval'", "https://<IP_ADDRESS>:8080", "'self'" ],
                    },
                    hashEnabled: {
                        "script-src": true,
                        "style-src": true,
                    },
                    nonceEnabled: {
                        "script-src": false,
                        "style-src": false,
                    },
                },
            } ),
            new HtmlWebpackPlugin( {
                filename: "../app/html/webpack_popup.html",
                template: "app/html/popup_template.html",
                chunks: [ "form" ],
            } ),
            new HtmlWebpackPlugin( {
                filename: "../app/html/webpack_codemirror.html",
                template: "app/html/codemirror_template.html",
                chunks: [ "editor" ],
            } ),
            new HtmlWebpackPlugin( {
                filename: "../app/html/webpack_error_wrapper.html",
                template: "app/html/error_wrapper_template.html",
                chunks: [ "error" ],
            } ),
            new HtmlWebpackPlugin( {
                filename: "../app/html/webpack_documentation.html",
                template: "app/html/documentation_template.html",
                chunks: [ "docs_entry" ],
            } ),
            new CspHtmlWebpackPlugin( {
                "base-uri": "'self'",
                "object-src": "'none'",
                "script-src": [ "'unsafe-inline'", "'unsafe-eval'", "https://<IP_ADDRESS>:8080", "'self'" ],
                "style-src": [ "'unsafe-inline'", "'unsafe-eval'", "https://<IP_ADDRESS>:8080", "'self'"],
                "font-src": [ "'unsafe-inline'", "'unsafe-eval'", "https://<IP_ADDRESS>:8080", "'self'" ],
            }, {
                enabled: true,
                hashingMethod: "sha256",
                hashEnabled: {
                    "script-src": true,
                    "style-src": true,
                },
                nonceEnabled: {
                    "script-src": false,
                    "style-src": false,
                },
            } ),

then it produces this output (for the app chunk):
<meta http-equiv="Content-Security-Policy" content="base-uri 'self'; object-src 'none'; script-src https://<IP_ADDRESS>:8080 'self'; style-src https://<IP_ADDRESS>:8080 'self'; font-src 'unsafe-inline' 'unsafe-eval' https://<IP_ADDRESS>:8080 'self'>
and I see this error:
Refused to apply inline style because it violates the following Content Security Policy directive: "style-src https://<IP_ADDRESS>:8080 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU='), or a nonce ('nonce-...') is required to enable inline execution.
If I delete the nonceEnabled section in the app chunk settings then I get the same result as setting them to false.
So my questions are why am I not getting hashed generated and what do I need to do so that thye are generated and secondly, why is the nonce that is generated not working - how can I tell what the nonce relates to ?
Thanks for your help.
Reproducible in:
slackhq/csp-html-webpack-plugin version: 3.0.1
node version: 10.13
OS version(s): Windows 10
Steps to reproduce:
As its a question I have not tried to reproduce the issue in a cut down setup.
Expected result:
Expected to see hashes inserted into the meta tag
Actual result:
Nonces were inserted, but seemed to have no effect.
Attachments:
None

+1

Hi @Graar and @duntonr - thanks for the reports, and sorry for the delay!
Would you be able to share your template html file with me as well? Or even better, setup a minimal repo which shows the error? It would greatly help me debug this!
Thanks

@AnujRNair
Here is the template html file at least:
`

    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

`
You can see I have commented out a CSP meta tag.  Under some circumstances, that I was unable to reproduce when I came to report the issue, the plugin did nothing and I just got the template CSP (hence those capitals, just to be clear where the CSP was coming from).
A demo repo may take a little lnger, but I'll try and get you one.

The CSP plugin will only add sha-256 for JS which is inlined on your page (i.e. executed in a  block, not a  external link.
In your template above, there are no inline script blocks.
However, it's possible you could inject script blocks into your template during webpack compile time - we do so by using html-webpack-inline-source-plugin to turn some external links into script blocks (like the webpack manifest). If this is done during webpack compile time, these blocks should also be correctly hashed.
If you're adding script blocks after webpack has output it's assets, these won't be included in the CSP policy, and will be blocked during runtime.
It's recommended that you disable this plugin when developing locally, especially if using webpack-dev-server / hot module replacement, as you'll be changing assets in memory, and their contents won't be rehashed each time.
If you're seeing something else from this, a minimal repo would be incredibly useful for me to debug this!
@duntonr hopefully this answers your question too, otherwise a minimal repo would be appreciate too :)
Thanks

Hi @Graar and @duntonr! Any thoughts on the message above? Does this align with what you're seeing?

@AnujRNair  - ahh, sorry, I thought I had replied.
Yes, that fits exactly and I need to go and check out the other plugin. Currently, I've been tied up with other things.  I'll try and look at this over the weekend and let you know.
Many thanks for your help.

I'm going to close this for now, since I believe this to be answered, but if you need any more clarification, please let me know and I will reopen this issue
Thanks!

@AnujRNair, yes, thanks very much that's fair.  I'll report back on the progress I make with the other plugin.

Im having this issue as well. Unfortunately, I dont have a minimal repo but addStyles is getting borked as original poster stated. Also, only using this plugin in production does not alleviate the issues in production.

My guess here is that the add style calls are being eval'ed, or your policy is too strict - without a repo it's hard to tell exactly whats happening here :(

@AnujRNair just a quick follow-up.  I have now tested this plugin with the script added inline as you stated and it worked exactly as expected, so nothing for you to do there.
For the benefit of those that follow along after me:
With regard to the other plugin that you mentioned, html-webpack-inline-source-plugin, I gave it a try, but ran into this issue.  I did spend some time looking into that, but had to move on.
I also looked into using a variant of this approach which uses embedded javascript.
I am still trying to figure out how to handle this in the longer term, for the moment I am just using the hash provided in the console error message.

@AnujRNair is there any plan to include hashes for linked scripts? We can't get __webpack_nonce__ working, and the plugin doesn't generate hashes, so that only leaves us with hardcoded nonce values determined at build time, which is almost no security unfortunately.
The docs also don't seem to indicate that this is the case:

Although we're configuring script-src and style-src to be blank, the CSP plugin will scan your HTML generated in html-webpack-plugin for external/inline script and style tags, and will add the appropriate hashes and nonces to your CSP policy.


Backup restore operator fails to install when persistence storage is enabled with storage class set to "local-path"

What kind of request is this (question/bug/enhancement/feature request): Bug
Steps to reproduce (least amount of steps as possible):

Install local-path-provisioner
https://github.com/rancher/local-path-provisioner
Install backup restore operator chart in rancher with persistence enable=true and storage class = "local-path"

affinity: {}
image:
  repository: rancher/backup-restore-operator
  tag: v0.0.1-rc10
nodeSelector: {}
persistence:
  enabled: true
  size: 2Gi
  storageClass: 'local-path'
  volumeName: ''
s3:
  bucketName: rancherbackups
  credentialSecretName: creds
  credentialSecretNamespace: ''
  enabled: false
  endpoint: s3.us-west-2.amazonaws.com
  endpointCA: base64 encoded CA cert
  folder: base folder
  region: us-west-2
tolerations: []

Result:
Backup restore operator fails to install with an exit code; 123

Only backup-restore-operator-crd is installed
Environment information

Rancher version (rancher/rancher/rancher/server image tag or shown bottom left in the UI): master-head(master-198ec5bdf52d3)
Installation option (single install/HA): HA

Validated with master-head(master-ab6598e5add2414d9f58244300c3fa28072cca8e-head)
Steps:

Install local-path-provisioner
https://github.com/rancher/local-path-provisioner
Install backup restore operator chart in rancher with persistence enable=true and storage class = "local-path"

affinity: {}
image:
  repository: rancher/backup-restore-operator
  tag: v0.0.1-rc11
nodeSelector: {}
persistence:
  enabled: true
  size: 2Gi
  storageClass: 'local-path'
  volumeName: ''
s3:
  bucketName: rancherbackups
  credentialSecretName: creds
  credentialSecretNamespace: ''
  enabled: false
  endpoint: s3.us-west-2.amazonaws.com
  endpointCA: base64 encoded CA cert
  folder: base folder
  region: us-west-2
tolerations: []

Backup-restore-operator chart gets installed successfully.


leaderboard

Create evaluate.py https://github.com/Recode-Hive/machine-learning-repos/pull/303
Create train.py https://github.com/Recode-Hive/machine-learning-repos/pull/295
Create plant-disease-detection https://github.com/Recode-Hive/machine-learning-repos/pull/278
Update README.md https://github.com/Recode-Hive/machine-learning-repos/pull/279
Create data_preprocessing.py https://github.com/Recode-Hive/machine-learning-repos/pull/280
Plant Disease Detection using CNN https://github.com/Recode-Hive/machine-learning-repos/issues/134
these are my PR links which are merged and these are not getting updated to leaderboard

few of them is under review, once finished it will be updated, remaining I can see it on the leaderboard.


Enable workspace creation/update/test by specifying name only

From our automated CI/CD process, we would need to be able to identify a particular remote workspace by its name only (~ATM "workspace_name" attribute in [conversation] section of build.cfg).  "workspace_id" will be unspecified/unused in this scenario (~depending on chosen implementation - as a switch of the script perhaps)

[x] update script workspace_deploy.sh
[x] update script workspace_test.sh
[x] add documentation
[x] add tests

Done and merged in April.


Documentation - Fixing 'if' spelling

Fixing 'if' spelling

Can one of the admins verify this patch?

I signed it!

@googlebot please recheck!

@googlebot Please check CLA

"Iff" is a shortcut for "if and only if", meaning the original spelling is likely intended.
https://en.wikipedia.org/wiki/If_and_only_if


Multi Output

Error with angel's crusher. I'm guessing multi output issue with solids. Looks like if there are multiple outputs it thinks there are liquids and wants pipe to a port that does not exist.

Bonus this one just fails to create BP. Does not kill the mod.


Remove unused file output in test_paginator_config.py

Minor cleanup: This output to a temporary file in a functional test seems vestigial.

Codecov Report
Base: 93.45% // Head: 93.45% // No change to project coverage :thumbsup:

Coverage data is based on head (6135222) compared to base (03a900b).
Patch has no changes to coverable lines.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #2807   +/-   ##
========================================
  Coverage    93.45%   93.45%
========================================
  Files           63       63
  Lines        13298    13298
========================================
  Hits         12427    12427
  Misses         871      871

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


OSSM-4464 - remove image build

Removing operator image build... because building the image does not belong within the scope of the test suite, but instead should be a dependency action that is done prior to running the tests.

why?

Matt explained to me there is an existing operator build make target so he is trying to remove this duplicate operator build step.

I am going to close this PR, because after talking through with @yxun the integration of these tests into the PROW job, there are efficiency improvements that are needed the way the operator is deployed and validated running.


bug-fix-3.11/FE-257: allow additional properties in inverted index creation

backport for https://github.com/arangodb/arangodb/pull/18937

[ ] https://jenkins01.arangodb.biz/job/arangodb-ANY-jslint/29022/