[webview_flutter] Add file chooser on Android

Description
Currently on Android nothing happens for <input type="file">. This PR solves that, allowing the user to choose a file and optionally use the camera.

Related Issues
flutter/flutter#27924
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

[x] I read the Contributor Guide and followed the process outlined there for submitting PRs.
[ ] My PR includes unit or integration tests for all changed/updated/fixed behaviors (See Contributor Guide).
[x] All existing and new tests are passing.
[x] I updated/added relevant documentation (doc comments with ///).
[x] The analyzer (flutter analyze) does not report any problems on my PR.
[x] I read and followed the Flutter Style Guide.
[x] The title of the PR starts with the name of the plugin surrounded by square brackets, e.g. [shared_preferences]
[ ] I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy.
[x] I updated CHANGELOG.md to add a description of the change.
[x] I signed the CLA.
[x] I am willing to follow-up on review comments in a timely manner.

Breaking Change
Does your PR require plugin users to manually update their apps to accommodate your change?

[ ] Yes, this is a breaking change (please indicate a breaking change in CHANGELOG.md and increment major revision).
[x] No, this is not a breaking change.

@googlebot I fixed it

Something weird happened with the rebase of this branch, I can see things that are already merged (like the move of camera to camera/camera). Do you mind rebasing this a little better, so we can see only the changes you worked on? Thanks!

Also: there's a file_selector plugin incoming; would it make more sense to add an Android version there? See this PR: https://github.com/flutter/plugins/pull/3140

Something weird happened with the rebase of this branch, I can see things that are already merged (like the move of camera to camera/camera). Do you mind rebasing this a little better, so we can see only the changes you worked on? Thanks!

Don't know what happened there, but thanks for pointing that out!

@ditman Not sure about the 'file_selector' plugin. Would that also cover taking a picture with the camera?

@ditman Not sure about the 'file_selector' plugin. Would that also cover taking a picture with the camera?

@fesp no, the one that lets you select a picture from the gallery, or take a new one is image_picker.
file_picker is just a generic open file (no "capture" attribute in web).

@ditman Can we use the image_picker plugin in the webview_flutter (regarding dependencies)? The point of this PR is to mimic the behaviour that is standard on iOS. I mean, would it make sense to depend on another plugin just for Android?

@fesp I misunderstood the intent of this PR. This is to enable the input type file when rendering a webview. The other plugins let you select a file in a normal flutter app (not within a webview). Thanks for the contrib!!

@ditman No problem, and thank you for taking the time to to look at this!

@brnyza I could not reproduce the issue you encountered. However, I've update the code a bit since the conversion from context to an activity isn't really necessary. Can you please give it another try?

@brnyza I could not reproduce the issue you encountered. However, I've update the code a bit since the conversion from context to an activity isn't really necessary. Can you please give it another try?

@fesp Thank you for the code, it's working perfectly after replacing [activity] to [context]. (https://github.com/flutter/flutter/issues/27924#issuecomment-735003622)

There is another problem with this code.
It's not working on Android 9+.
It throws this exception
android.util.AndroidRuntimeException: Calling startActivity() from outside of an Activity  context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want?

I fixed it with this code change https://github.com/michaltrmac/plugins/commit/4cefa38a10826c0a71fed0cc5ad6535aff2ca2fe

@michaltrmac Thanks for your feedback. I've updated the code.

On IOS you can open the camera directly by specifying capture=camera, right now this code will ignore this option.
Also, when performing a click with javascript, I.e evaluateJavascript("document.getElementById('fileInput').click()") you get the following console error: File chooser dialog can only be shown with a user activation.. This works fine in IOS.

Hi @fesp  Thanks for the solution. I applied it succesfully to my project. When i applied it, i realized that it doesn't provide multiple file selections. I tampered your code and did some changes but i am not sure how can i deliver them to you. I recommend that your solution should provide multiple file selection. Could you please let me know if you come up with a solution? Thanks again for your helps 💯  :)

Would you mind rebasing?

any good news?

Hi @fesp Thanks for the solution. I applied it succesfully to my project. When i applied it, i realized that it doesn't provide multiple file selections. I tampered your code and did some changes but i am not sure how can i deliver them to you. I recommend that your solution should provide multiple file selection. Could you please let me know if you come up with a solution? Thanks again for your helps 💯 :)

Just tested it on a Xiaomi Mi 9T Pro Android 10, working well for single files but not for <input type="file" multiple>. An easy way to test it is this URL: https://www.w3schools.com/tags/tryit.asp?filename=tryhtml5_input_type_file
It would be great if you could share your fix, for example in a Gist @mehmetalikaradeniz

I've made the necessary changes to support uploading multiple files now. You can find all changed files here: https://gist.github.com/Aulig/792bbeffa50d3a3a88ee5123f80b9bb3
It'd be awesome if you could incorporate this into your PR @fesp
Missing:

Take multiple pictures with the camera.
Ignores limitations (e.g. only offer camera) as @AlphonseSantoro mentioned

I think those are minor issues though and, judging by the popularity of https://github.com/flutter/flutter/issues/27924#issue-410173925 it'd be very valuable to have ANY fileupload asap.

I've done some more work on this. It was previously hardcoded to an image/* mime-type. Now it respects the website's choice of allowed mime types. I also added support for taking videos with the camera.
Find the updated changes here: https://gist.github.com/Aulig/792bbeffa50d3a3a88ee5123f80b9bb3

Hi, just want to highlight that this file-chooser will crash with another plugin called "flutter_downloader". It keeps throws java.lang.IllegalArgumentException whenever we press the file-input field. The exception is came from line 95 of FileChooserActivity.java, which is when running FileProvider.getUriForFile().
After removed flutter_downloader from pubspec.yaml, the file-chooser is working flawlessly.

I've done some more work on this. It was previously hardcoded to an image/* mime-type. Now it respects the website's choice of allowed mime types. I also added support for taking videos with the camera.
Find the updated changes here: https://gist.github.com/Aulig/792bbeffa50d3a3a88ee5123f80b9bb3
I can also create a new PR if the CLA allows that or @fesp agrees. Or should I create a PR to fesp's fork?

Sorry for the late response, even with the lockdown and all we weren't able to keep covid out of the house. But things are getting better now! @Aulig thanks for your work. I'm more than happy to merge it in here. I've reviewed your changes and have just one question. I've noticed you removed the 'hybrid composition' part. I don't know much about this, but can you explain why?

I've done some more work on this. It was previously hardcoded to an image/* mime-type. Now it respects the website's choice of allowed mime types. I also added support for taking videos with the camera.
Find the updated changes here: https://gist.github.com/Aulig/792bbeffa50d3a3a88ee5123f80b9bb3
I can also create a new PR if the CLA allows that or @fesp agrees. Or should I create a PR to fesp's fork?

Sorry for the late response, even with the lockdown and all we weren't able to keep covid out of the house. But things are getting better now! @Aulig thanks for your work. I'm more than happy to merge it in here. I've reviewed your changes and have just one question. I've noticed you removed the 'hybrid composition' part. I don't know much about this, but can you explain why?

Oh no, I wish you and the rest of your household a quick recovery!
Do you mean this?
    Boolean usesHybridComposition = (Boolean) params.get("usesHybridComposition");
    webView =
        (usesHybridComposition)
            ? new WebView(context)
            : new InputAwareWebView(context, containerView);

I used the current state of the plugin when I made my changes 10 days ago, it looks like this was just added 10 days ago too (probably very shortly after I cloned) in this commit: https://github.com/flutter/plugins/commit/fc1b17ea3728768c590272a28f1d23691562505e
In that case - no, I didn't intentionally remove this. I've now updated my gist to include the changes from that commit.
Thanks for updating your PR!
Or are you referring to something else?

@Aulig No, that was exactly what I meant. I've updated the PR. Thanks again.

@Aulig No, that was exactly what I meant. I've updated the PR. Thanks again.

Awesome, thanks!

Would you mind rebasing?

Can you check this new code out @blasten? I think it can be merged without problems now.
Hope it's alright that I tagged you, I just saw that you've been active here and in the related issue before, so you might know how to get this merged asap.

@fesp @Aulig @tylerteh
Can you help me?
i use webview_flutter 2.0.2 version but file choose not works...
my setting is
Gradle Version
gradle-wrapper.properties

distributionUrl : 5.6.2

Android Gradle Plugin
build.gradle

dependencies : classpath 3.3.0

flutter 2.0
dart 2.12.0
i really need any help !!!

@fesp @Aulig @tylerteh
Can you help me?
i use webview_flutter 2.0.2 version but file choose not works...
my setting is
Gradle Version
gradle-wrapper.properties
* distributionUrl : 5.6.2

Android Gradle Plugin
build.gradle
* dependencies : classpath 3.3.0

flutter 2.0
dart 2.12.0
i really need any help !!!

You can use fesp's PR for now by using this github link as source for webview_flutter in your pubspec.yaml: https://github.com/fesp/plugins/tree/add-file-chooser-on-android

@planetdoy You could do something like:
dependency_overrides:
  webview_flutter:
    git:
      url: https://github.com/fesp/plugins.git
      path: packages/webview_flutter
      ref: add-file-chooser-on-android

But let's hope this PR will be merged soon...

Removing some of the other folks from this PR and keeping @blasten and @cyanglaz for webview review.

@fesp @Aulig
Thanks you!!!
it works on device environment but still not works on emulator.
i should figure out why it doesn't work.
thank you again guys~!!
i really hope this PR merge soon~!!~~!

@fesp @Aulig
Thanks you!!!
it works on device environment but still not works on emulator.
i should figure out why it doesn't work.
thank you again guys~!!
i really hope this PR merge soon~!!~~!

You're welcome, what part isn't working in the emulator for you? And which emulator version are you using? Both the camera & file picker work for me on API 29. I thought I also tested other versions, but I'm not sure anymore.

@fesp @Aulig
Thanks you!!!
it works on device environment but still not works on emulator.
i should figure out why it doesn't work.
thank you again guys~!!
i really hope this PR merge soon~!!~~!

You're welcome, what part isn't working in the emulator for you? And which emulator version are you using? Both the camera & file picker work for me on API 29. I thought I also tested other versions, but I'm not sure anymore.

API 30 NOT Works.. but 28,29 works!!

@fesp @Aulig
Thanks you!!!
it works on device environment but still not works on emulator.
i should figure out why it doesn't work.
thank you again guys~!!
i really hope this PR merge soon~!!~~!

You're welcome, what part isn't working in the emulator for you? And which emulator version are you using? Both the camera & file picker work for me on API 29. I thought I also tested other versions, but I'm not sure anymore.

API 30 NOT Works.. but 28,29 works!!

Onemore thing when i use webview_flutter plugin ^2.0.2 not works even build!!
it just only happend on me??
WHAT EVER
now i use
dependency_overrides:
webview_flutter:
git:
url: https://github.com/fesp/plugins.git
path: packages/webview_flutter
ref: add-file-chooser-on-android

Hey @blasten & @cyanglaz, it'd be awesome if you could review this whenever you have time.
The issue it fixes has been reported over 2 years ago and is in the top 30 most liked issues (and at least top 5 for webview_flutter I think), so quite relevant.
Thank you!

@fesp apologies for the wait time. We would really like to fix this issue. Do you think you could split this PR into two parts, and have the first one focus only on showing the file dialog? We would also need some form of test.

https://github.com/flutter/plugins/pull/3225/files this solution worked for me.
extension defined at this file "packages/webview_flutter/android/src/main/res/values/strings.xml"
I didn't change "packages/webview_flutter/pubspec.yaml" file.
i using "webview_flutter: ^1.0.7"
thank you @libo1223

After I tried the solution here, I'm getting this error
I/Timeline(26709): Timeline: Activity_launch_request time:162255045 intent:Intent { flg=0x10000000 cmp=com.forwoodsafety.safetyapps/io.flutter.plugins.webviewflutter.FileChooserActivity (has extras) }
D/OneSignal(26709): curActivity is NOW: null
W/ActivityThread(26709): handleWindowVisibility: no activity for token android.os.BinderProxy@1811995
D/AndroidRuntime(26709): Shutting down VM
E/AndroidRuntime(26709): FATAL EXCEPTION: main
E/AndroidRuntime(26709): Process: com.forwoodsafety.safetyapps, PID: 26709
E/AndroidRuntime(26709): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.forwoodsafety.safetyapps/io.flutter.plugins.webviewflutter.FileChooserActivity}: java.lang.IllegalArgumentException: Failed to find configured root that contains /data/data/com.forwoodsafety.safetyapps/cache/storage/CAPTURE-20210426_203521.jpg
E/AndroidRuntime(26709): 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2946)
E/AndroidRuntime(26709): 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3081)
E/AndroidRuntime(26709): 	at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
E/AndroidRuntime(26709): 	at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
E/AndroidRuntime(26709): 	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
E/AndroidRuntime(26709): 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1831)
E/AndroidRuntime(26709): 	at android.os.Handler.dispatchMessage(Handler.java:106)
E/AndroidRuntime(26709): 	at android.os.Looper.loop(Looper.java:201)
E/AndroidRuntime(26709): 	at android.app.ActivityThread.main(ActivityThread.java:6810)
E/AndroidRuntime(26709): 	at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(26709): 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547)
E/AndroidRuntime(26709): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:873)
E/AndroidRuntime(26709): Caused by: java.lang.IllegalArgumentException: Failed to find configured root that contains /data/data/com.forwoodsafety.safetyapps/cache/storage/CAPTURE-20210426_203521.jpg
E/AndroidRuntime(26709): 	at androidx.core.content.FileProvider$SimplePathStrategy.getUriForFile(FileProvider.java:744)
E/AndroidRuntime(26709): 	at androidx.core.content.FileProvider.getUriForFile(FileProvider.java:418)
E/AndroidRuntime(26709): 	at io.flutter.plugins.webviewflutter.FileChooserActivity.getTempUri(FileChooserActivity.java:138)
E/AndroidRuntime(26709): 	at io.flutter.plugins.webviewflutter.FileChooserActivity.createCaptureIntent(FileChooserActivity.java:119)
E/AndroidRuntime(26709): 	at io.flutter.plugins.webviewflutter.FileChooserActivity.showFileChooser(FileChooserActivity.java:54)
E/AndroidRuntime(26709): 	at io.flutter.plugins.webviewflutter.FileChooserActivity.onCreate(FileChooserActivity.java:46)
E/AndroidRuntime(26709): 	at android.app.Activity.performCreate(Activity.java:7224)
E/AndroidRuntime(26709): 	at android.app.Activity.performCreate(Activity.java:7213)
E/AndroidRuntime(26709): 	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1272)
E/AndroidRuntime(26709): 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2926)
E/AndroidRuntime(26709): 	... 11 more
D/libcrashlytics(26709): Initializing libcrashlytics version 3.0.0
D/libcrashlytics(26709): Initializing native crash handling successful.

Also, I don't have flutter_downloader plugin.
@fesp

somebody please help me with this issue:
https://stackoverflow.com/questions/67279734/java-lang-illegalargumentexception-failed-to-find-configured-root-that-contains

@Shubhankt1 I've looked at your SO question and I noticed that your provider_paths.xml differs from what we have here.

I'd be happy to help out here too. Can you explain the splitting in more detail? What would the filechooser do if it doesn't get used anywhere before the second PR? It would be even more difficult to test then, right? Also, how would you go about testing this? Because a UI test would need to click a file upload button in the webview and then check if the dialog opened, but is that even possible? From what I saw the webview tests can't use javascript.

@blasten, I agree with @Aulig, how can we split this? Please let us know what we can do to get this merged.

@Shubhankt1 I've looked at your SO question and I noticed that your provider_paths.xml differs from what we have here.

@fesp Ohh. I think I made a mistake in my question. I did exactly what is told here. Still I got that IllegalArgumentException
<?xml version="1.0" encoding="utf-8"?>
<paths>
    <cache-path name="storage" path="storage"/>
</paths>

But I did fix it by using <external-files-path/>. I still don't understand why cache-path would give any problem?
And thanks for replying.

API 30 NOT Works.. but 28,29 works!!

Adding the following lines to AndroidManifest.xml also worked with API 30!
<queries>
    <package android:name="com.google.android.apps.photos" />
    <package android:name="com.google.android.apps.docs" />
    <package android:name="com.google.android.documentsui" />
</queries>

Hi @fesp
There is one peculiar thing happening in only Samsung devices (M21 in this case) that sometimes while selecting image after clicking from the camera, the app restarts without giving a crash (no crash report in Crashlytics as well)

Files
FileChooserActivity.java:
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

package io.flutter.plugins.webviewflutter;

import static io.flutter.plugins.webviewflutter.Constants.ACTION_FILE_CHOOSER_FINISHED;
import static io.flutter.plugins.webviewflutter.Constants.EXTRA_ACCEPT_TYPES;
import static io.flutter.plugins.webviewflutter.Constants.EXTRA_ALLOW_MULTIPLE_FILES;
import static io.flutter.plugins.webviewflutter.Constants.EXTRA_FILE_URIS;
import static io.flutter.plugins.webviewflutter.Constants.EXTRA_SHOW_IMAGE_OPTION;
import static io.flutter.plugins.webviewflutter.Constants.EXTRA_SHOW_VIDEO_OPTION;
import static io.flutter.plugins.webviewflutter.Constants.EXTRA_TITLE;
import static io.flutter.plugins.webviewflutter.Constants.WEBVIEW_STORAGE_DIRECTORY;

import android.app.Activity;
import android.content.Intent;
import android.database.Cursor;
import android.net.Uri;
import android.os.Bundle;
import android.provider.MediaStore;
import android.provider.OpenableColumns;
import android.util.Log;
import androidx.annotation.Nullable;
import androidx.core.content.FileProvider;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;

public class FileChooserActivity extends Activity {

  private static final int FILE_CHOOSER_REQUEST_CODE = 12322;
  private static final SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMdd_HHmmss");

  // List of Uris that point to files where there MIGHT be the output of the capture. At most one of these can be valid
  private final ArrayList<Uri> potentialCaptureOutputUris = new ArrayList<>();

  @Override
  protected void onCreate(@Nullable Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    showFileChooser(
        getIntent().getBooleanExtra(EXTRA_SHOW_IMAGE_OPTION, false),
        getIntent().getBooleanExtra(EXTRA_SHOW_VIDEO_OPTION, false));
  }

  private void showFileChooser(boolean showImageIntent, boolean showVideoIntent) {
    Intent getContentIntent = createGetContentIntent();
    Intent captureImageIntent =
        showImageIntent ? createCaptureIntent(MediaStore.ACTION_IMAGE_CAPTURE, "jpg") : null;
    Intent captureVideoIntent =
        showVideoIntent ? createCaptureIntent(MediaStore.ACTION_VIDEO_CAPTURE, "mp4") : null;

    if (getContentIntent == null && captureImageIntent == null && captureVideoIntent == null) {
      // cannot open anything: cancel file chooser
      sendBroadcast(new Intent(ACTION_FILE_CHOOSER_FINISHED));
      finish();
    } else {
      ArrayList<Intent> intentList = new ArrayList<>();

      if (getContentIntent != null) {
        intentList.add(getContentIntent);
      }

      if (captureImageIntent != null) {
        intentList.add(captureImageIntent);
      }
      if (captureVideoIntent != null) {
        intentList.add(captureVideoIntent);
      }

      Intent chooserIntent = new Intent(Intent.ACTION_CHOOSER);
      chooserIntent.putExtra(Intent.EXTRA_TITLE, getIntent().getStringExtra(EXTRA_TITLE));

      chooserIntent.putExtra(Intent.EXTRA_INTENT, intentList.get(0));
      intentList.remove(0);
      if (intentList.size() > 0) {
        chooserIntent.putExtra(Intent.EXTRA_INITIAL_INTENTS, intentList.toArray(new Intent[0]));
      }

      startActivityForResult(chooserIntent, FILE_CHOOSER_REQUEST_CODE);
    }
  }

  private Intent createGetContentIntent() {
    Intent filesIntent = new Intent(Intent.ACTION_GET_CONTENT);

    if (getIntent().getBooleanExtra(EXTRA_ALLOW_MULTIPLE_FILES, false)) {
      filesIntent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, true);
    }

    String[] acceptTypes = getIntent().getStringArrayExtra(EXTRA_ACCEPT_TYPES);

    if (acceptTypes.length == 0 || (acceptTypes.length == 1 && acceptTypes[0].length() == 0)) {
      // empty array or only 1 empty string? -> accept all types
      filesIntent.setType("*/*");
    } else if (acceptTypes.length == 1) {
      filesIntent.setType(acceptTypes[0]);
    } else {
      // acceptTypes.length > 1
      filesIntent.setType("*/*");
      filesIntent.putExtra(Intent.EXTRA_MIME_TYPES, acceptTypes);
    }

    return (filesIntent.resolveActivity(getPackageManager()) != null) ? filesIntent : null;
  }

  private Intent createCaptureIntent(String type, String fileFormat) {
    Intent captureIntent = new Intent(type);
    if (captureIntent.resolveActivity(getPackageManager()) == null) {
      return null;
    }

    // Create the File where the output should go
    Uri captureOutputUri = getTempUri(fileFormat);
    potentialCaptureOutputUris.add(captureOutputUri);

    captureIntent.putExtra(MediaStore.EXTRA_OUTPUT, captureOutputUri);

    return captureIntent;
  }

  private File getStorageDirectory() {
    File imageDirectory = new File(this.getExternalFilesDir(null), WEBVIEW_STORAGE_DIRECTORY);
    if(!imageDirectory.isDirectory()){
            imageDirectory.mkdir();
        }
    if (!imageDirectory.exists() && !imageDirectory.mkdir()) {
      Log.e("WEBVIEW", "Unable to create storage directory");
    }
    return imageDirectory;
  }

  private Uri getTempUri(String format) {
    String fileName = "CAPTURE-" + simpleDateFormat.format(new Date()) + "." + format;
    File file = new File(getStorageDirectory(), fileName);
    return FileProvider.getUriForFile(
        this, getApplicationContext().getPackageName() + ".generic.provider", file);
  }

  private String getFileNameFromUri(Uri uri) {
    Cursor returnCursor = getContentResolver().query(uri, null, null, null, null);
    assert returnCursor != null;
    int nameIndex = returnCursor.getColumnIndex(OpenableColumns.DISPLAY_NAME);
    returnCursor.moveToFirst();
    String name = returnCursor.getString(nameIndex);
    returnCursor.close();
    return name;
  }

  private Uri copyToLocalUri(Uri uri) {
    File destination = new File(getStorageDirectory(), getFileNameFromUri(uri));

    try (InputStream in = getContentResolver().openInputStream(uri);
        OutputStream out = new FileOutputStream(destination)) {
      byte[] buffer = new byte[1024];
      int len;
      while ((len = in.read(buffer)) != -1) {
        out.write(buffer, 0, len);
      }
      return FileProvider.getUriForFile(
          this, getApplicationContext().getPackageName() + ".generic.provider", destination);
    } catch (IOException e) {
      Log.e("WEBVIEW", "Unable to copy selected image", e);
      e.printStackTrace();
      return null;
    }
  }

  @Override
  protected void onActivityResult(int requestCode, int resultCode, Intent data) {

    if (requestCode == FILE_CHOOSER_REQUEST_CODE) {
      Intent fileChooserFinishedIntent = new Intent(ACTION_FILE_CHOOSER_FINISHED);
      if (resultCode == Activity.RESULT_OK) {
        if (data != null && (data.getDataString() != null || data.getClipData() != null)) {
          if (data.getDataString() != null) {
            // single result from file browser OR video from camera
            Uri localUri = copyToLocalUri(data.getData());
            if (localUri != null) {
              fileChooserFinishedIntent.putExtra(
                  EXTRA_FILE_URIS, new String[] {localUri.toString()});
            }
          } else if (data.getClipData() != null) {
            // multiple results from file browser
            int uriCount = data.getClipData().getItemCount();
            String[] uriStrings = new String[uriCount];

            for (int i = 0; i < uriCount; i++) {
              Uri localUri = copyToLocalUri(data.getClipData().getItemAt(i).getUri());
              if (localUri != null) {
                uriStrings[i] = localUri.toString();
              }
            }
            fileChooserFinishedIntent.putExtra(EXTRA_FILE_URIS, uriStrings);
          }
        } else {
          // image result from camera (videos from the camera are handled above, but this if-branch could handle them too if this varies from device to device)
          for (Uri captureOutputUri : potentialCaptureOutputUris) {
            try {
              // just opening an input stream (and closing immediately) to test if the Uri points to a valid file
              // if it's not a real file, the below catch-clause gets executed and we continue with the next Uri in the loop.
              getContentResolver().openInputStream(captureOutputUri).close();
              fileChooserFinishedIntent.putExtra(
                  EXTRA_FILE_URIS, new String[] {captureOutputUri.toString()});
              // leave the loop, as only one of the potentialCaptureOutputUris is valid and we just found it
              break;
            } catch (IOException ignored) {

              ignored.printStackTrace();
            }
          }
        }
      }
      sendBroadcast(fileChooserFinishedIntent);
      finish();
    } else {
      super.onActivityResult(requestCode, resultCode, data);
    }
  }
}

provider_paths.xml:
<?xml version="1.0" encoding="utf-8"?>
<paths xmlns:android="http://schemas.android.com/apk/res/android">
    <!-- <cache-path name="storage" path="storage"/> -->
    <!-- <files-path name="my_images" path="images"/> -->
    <external-files-path name="safetyapp_images" path="images" />
</paths>

Constants.java:
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

package io.flutter.plugins.webviewflutter;

public class Constants {
  static final String ACTION_REQUEST_CAMERA_PERMISSION_FINISHED =
      "action_request_camera_permission_denied";
  static final String ACTION_FILE_CHOOSER_FINISHED = "action_file_chooser_completed";

  static final String EXTRA_TITLE = "extra_title";
  static final String EXTRA_ACCEPT_TYPES = "extra_types";
  static final String EXTRA_SHOW_VIDEO_OPTION = "extra_show_video_option";
  static final String EXTRA_SHOW_IMAGE_OPTION = "extra_show_image_option";
  static final String EXTRA_FILE_URIS = "extra_file_uris";
  static final String EXTRA_ALLOW_MULTIPLE_FILES = "extra_allow_multiple_files";

  static final String WEBVIEW_STORAGE_DIRECTORY = "images";
}

@Shubhankt1, please tell me, do you have this problem with the latest changes by the @fesp?
  webview_flutter:
    git:
      url: https://github.com/fesp/plugins.git
      path: packages/webview_flutter
      ref: f373937890a349e85acdadf931f00e56db9a818f

@Shubhankt1, please tell me, do you have this problem with @fesp's latest changes?
  webview_flutter:
    git:
      url: https://github.com/fesp/plugins.git
      path: packages/webview_flutter
      ref: f373937890a349e85acdadf931f00e56db9a818f

I haven't tried the new changes. give me sometime, I'll use that and let you know.

API 30 NOT Works.. but 28,29 works!!

Adding the following lines to AndroidManifest.xml also worked with API 30!
<queries>
    <package android:name="com.google.android.apps.photos" />
    <package android:name="com.google.android.apps.docs" />
    <package android:name="com.google.android.documentsui" />
</queries>

In my project's AndroidManifest or the plugin's manifest?

@googlebot I fixed it.

Ok, I need some help here. As you can see I'm having issues with the CLA. I guess this is why:
The previous commits are made with an email address I no longer own. Now, when trying to rebase, those commits are done again using that same email address. Since that email address is not part of my GitHub profile anymore, the google-cla bot starts to complain.
Is there anyone who knows of an easy way to fix this?

Ok, I need some help here. As you can see I'm having issues with the CLA. I guess this is why:
The previous commits are made with an email address I no longer own. Now, when trying to rebase, those commits are done again using that same email address. Since that email address is not part of my GitHub profile anymore, the google-cla bot starts to complain.
Is there anyone who knows of an easy way to fix this?

@fesp If the correct email address is set on your git local repository, I think you could try to reset your branch to a commit previous to the very first commit you've made on this branch. Then you could commit the changes again, and I suppose the correct email address should be attached to the new commit. It sounds simple I think and I feel like it won't be enough to make the cla stop complaining, but.. I hope this works cuz I really need this fix haha. Thanks!

Ok, I need some help here. As you can see I'm having issues with the CLA. I guess this is why:
The previous commits are made with an email address I no longer own. Now, when trying to rebase, those commits are done again using that same email address. Since that email address is not part of my GitHub profile anymore, the google-cla bot starts to complain.
Is there anyone who knows of an easy way to fix this?

@fesp If the correct email address is set on your git local repository, I think you could try to reset your branch to a commit previous to the very first commit you've made on this branch. Then you could commit the changes again, and I suppose the correct email address should be attached to the new commit. It sounds simple I think and I feel like it won't be enough to make the cla stop complaining, but.. I hope this works cuz I really need this fix haha. Thanks!

Thanks for your reply. I think I got it sorted now.

@fesp A very important change, thank you

Cool! Waiting for merge..

Great PR! Anxious for this to get merged!

This is an important feature we have been looking for.
Waiting for the merge! 🚀

Bravo!!
Hope to merge at your earliest convenience.

@blasten @cyanglaz
Help this PR please.
Thank you very much.

any progress on this? this feature is really important.

@fesp apologies for the wait time. We would really like to fix this issue. Do you think you could split this PR into two parts, and have the first one focus only on showing the file dialog? We would also need some form of test.

I'd be happy to help out here too. Can you explain the splitting in more detail?

I think the suggestion is that you split the part about using the camera, which adds more complexity, into a secondary PR.

Also, how would you go about testing this? Because a UI test would need to click a file upload button in the webview and then check if the dialog opened, but is that even possible? From what I saw the webview tests can't use javascript.

An integration test for this should be possible using Espresso (@bparrishMines is there a rough ETA on adding that harness to webview?).
In addition, it looks like you should be able to unit test FileChooserLauncher.java by injecting a mock Context.

Also: please do not just check all of the checkboxes indiscriminately; it defeats the point of the checklist, which is to help make sure PRs include all the necessary changes. I've updated the state to match the actual state of this PR. The unchecked boxes should all be addressed.

@fesp @stuartmorgan https://github.com/flutter/plugins/pull/4147 has landed.

any news update?

Any update about this PR. This is the only this delaying me from using this plugin

@bparrishMines I'm having troubles running
./gradlew app:connectedAndroidTest
It fails with:
cannot find symbol
 public ActivityTestRule<EmbeddingV1Activity> rule =
                         ^
 symbol:   class EmbeddingV1Activity
 location: class EmbeddingV1ActivityTest

Can you help me to fix this?

It doesn't look like you've merged in master recently, which is probably why the test is not working for you; there were recent fixes to the structure of those tests on Android.

@firatcetiner Please do not approve PRs, as it serves no purpose and creates confusion. As our docs say, this is reserved for people with commit access.

API 30 NOT Works.. but 28,29 works!!

Adding the following lines to AndroidManifest.xml also worked with API 30!
<queries>
    <package android:name="com.google.android.apps.photos" />
    <package android:name="com.google.android.apps.docs" />
    <package android:name="com.google.android.documentsui" />
</queries>

I'm using:
<queries>
    <!-- Needed so file upload can ask the user to take a photo/video to upload -->
    <intent>
        <action android:name="android.media.action.IMAGE_CAPTURE" />
    </intent>
</queries>

With that I get the option of using my camera to take a picture/video or pick a file (from where I could go to my gallery app).
Adding <package android:name="com.google.android.apps.photos" /> didn't offer me the Google Photos app either.
In general I think instead of depending on fixed package names it's better to use general intents, as not everyone uses the Google Photos/Docs/... app.
I tried
<intent>
    <action android:name="android.intent.action.GET_CONTENT" />
    <data android:mimeType="*/*" />
</intent>

but that didn't prompt me to use the gallery directly either. Maybe it'd work on other devices?

@fesp Are you planning on adding tests to this PR to move it forward? Are you still having issues running tests locally?

It's very helpful 👍 , thank you

We are also using this patch successfully. After https://github.com/flutter/plugins/pull/3325 got merged this ist the only missing piece for us! A big thumbs up for working on it! 😄 👍

Why hasn't it been fixed？

After some conversations on the sidelines I want to create a different solution that is easier to test and maintain.
Some of the considerations can be found in this document: https://docs.google.com/document/d/1pcS1fxGw_Arug_V7PA4a-N9X1wS4jAHm9UUau77_ZYM

Based on discussion in the document linked above, the way we plan to move forward with file selection is by exposing the callback, so that clients of the plugin can register whatever handler they like. That will avoid the problem of needing to permanently maintain what is essentially a second copy of plugins that we already need to maintain separately, and will give people more flexibility if they want to use different implementations. It also makes the permissions opt-in rather than required, which is also good for flexibility.
Once that's implemented, we can evaluate whether it's helpful to provide a default implementation of that public handler (e.g., using image_picker and an Android implementation of file_selector).
Given that direction, I'm going to close this. Thanks again for the contribution though!

Is there an issue/a PR where the progress on implementing the above document can be followed?

The issue linked from the PR description is still the relevant issue.

Based on discussion in the document linked above, the way we plan to move forward with file selection is by exposing the callback, so that clients of the plugin can register whatever handler they like. That will avoid the problem of needing to permanently maintain what is essentially a second copy of plugins that we already need to maintain separately, and will give people more flexibility if they want to use different implementations. It also makes the permissions opt-in rather than required, which is also good for flexibility.
Once that's implemented, we can evaluate whether it's helpful to provide a default implementation of that public handler (e.g., using image_picker and an Android implementation of file_selector).
Given that direction, I'm going to close this. Thanks again for the contribution though!

@stuartmorgan I need to bring your attention that the referenced document is overwritten and its contents have changed. Have a look for yourself.

I don't own that document, so can't change it. The core conclusion from the discussion in the document is summarized above though.

@fesp
Guys could anyone help me with which patch I can use to get it working?

@stuartmorgan what is the current status of exposing the callbacks for handling the file uploads? If it is already done can you please link the relevant documentation?


Explore how we could show app version and build related information

Explore and identify practices followed to gather and displaying app version, and build date time time related information

Referred to following link to show app version
https://medium.com/hceverything/how-to-show-your-app-version-from-package-json-in-your-vue-application-11e882b97d8c
How we do it:

First we define a global variable in vue.config.js using webpack's definePlugin method.
We will define this variable in environment file.
We can name it anything following environment variable convention
Now it's in our app. To use to across the app store it in a state or somewhere
Create it's getter method to access this state.
Now retrieve the value with getter & use it anywhere in the app.

Found this method of showing version helpful as we are not dependent on any other library.

@shashwatbangar
Check for any existing libraries, like
https://www.npmjs.com/package/@credenceanalytics/inject-vue-app-version
Also, share any other references that you explored along with this one

This library works perfectly but exploring its code found out it does the same this, taking out the version from package.json and storing in an environment variable so I think we should not install one more package to create one more dependency. What are your views on this sir?

@shashwatbangar
Check for any existing libraries, like
https://www.npmjs.com/package/@credenceanalytics/inject-vue-app-version
Also, share any other references that you explored along with this one

This library works perfectly but exploring its code found out it does the same this, taking out the version from package.json and storing in an environment variable so I think we should not install one more package to create one more dependency. What are your views on this sir?

@shashwatbangar
Checked the library, it seems it is displaying
ionic-sdk compiled at Fri Dec 16 2022 16:00:28 GMT+0530 (India Standard Time); Patch Branch = shashwatbangar-#2wn626w
It does miss the package version, though I like the idea of displaying the compile date time, and branch head (helpful when not a release, but the development branch is deployed)

Currently I am trying & testing to slightly modify the code of this package to make it according to our need. If everything works fine, we can think of creating our own npm package to display app version, build DateTime, Branch name & anything else we need.

This is done. Closing


Cargo Build - FUSE Error

Hi,
I'm trying to use an app and run the cargo build, it will give me error on the FUSE, do you mind help me with this.
I already asked the DEV, but we couldn't find the problem from his side, so I was wondering if you can give us some insight and we fix this issue.
I tried both RUST 1.19 and 1.21 nightly and same result.
I have macOS 10.12.6 also
Danials-iMac:plexdrive-rust danial$ RUST_BACKTRACE=1 cargo build
   Compiling fuse v0.3.0
   Compiling chrono v0.4.0
   Compiling chrono v0.2.25
   Compiling hyper v0.10.12
   Compiling openssl v0.9.16
   Compiling ring v0.11.0
error: failed to run custom build command for `fuse v0.3.0`
process didn't exit successfully: `/Users/danial/Downloads/plexdrive-rust/target/debug/build/fuse-9b6f07c4aca6099a/build-script-build` (exit code: 101)
--- stderr
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Command { command: "\"pkg-config\" \"--libs\" \"--cflags\" \"fuse\"", cause: Error { repr: Os { code: 2, message: "No such file or directory" } } }', src/libcore/result.rs:860
stack backtrace:
   0: std::sys::imp::backtrace::tracing::imp::unwind_backtrace
   1: std::panicking::default_hook::{{closure}}
   2: std::panicking::default_hook
   3: std::panicking::rust_panic_with_hook
   4: std::panicking::begin_panic
   5: std::panicking::begin_panic_fmt
   6: rust_begin_unwind
   7: core::panicking::panic_fmt
   8: core::result::unwrap_failed
   9: <core::result::Result<T, E>>::unwrap
  10: build_script_build::main
  11: __rust_maybe_catch_panic
  12: std::rt::lang_start
  13: main

Build failed, waiting for other jobs to finish...
error: build failed

Never mind, I find fix for the problem.
I had to do this brew install pkg-config and then it was working after that.

Hi @zargony @dany20mh I'm getting the same error
 jsonfus git:(master) ✗ cargo check
   Compiling pkg-config v0.3.12
    Checking cfg-if v0.1.4
    Checking libc v0.2.42
    Checking thread-scoped v1.0.2
    Checking log v0.4.3
    Checking log v0.3.9
    Checking time v0.1.40
   Compiling fuse v0.3.1
error: failed to run custom build command for `fuse v0.3.1`
process didn't exit successfully: `/home/yo/IdeaProjects/jsonfus/target/debug/build/fuse-e9499539a9b06b6d/build-script-build` (exit code: 101)
--- stderr
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Failure { command: "\"pkg-config\" \"--libs\" \"--cflags\" \"fuse >= 2.6.0\"", output: Output { status: ExitStatus(ExitStatus(256)), stdout: "", stderr: "Package fuse was not found in the pkg-config search path.\nPerhaps you should add the directory containing `fuse.pc\'\nto the PKG_CONFIG_PATH environment variable\nNo package \'fuse\' found\n" } }', libcore/result.rs:945:5
note: Run with `RUST_BACKTRACE=1` for a backtrace.

I'm still a bit newbie with rust so I'm not sure if I'm missing something, I've installed pkg-config and fuse2 fuse3 on my system...I'm using manjaro linux
do you know what could be the problem here??? thank you so much


GH8: Add support for canonical config

fixes #8

Cool - the idea here is you can specify an alternate canonical URL via front matter (or even via a global expression setting and/or code if you wanted), right?

Cool - the idea here is you can specify an alternate canonical URL via front matter (or even via a global expression setting and/or code if you wanted), right?

@daveaglick yes, I've got that on my site for old medium posts, so it a bit "less" messes with SEO.

@daveaglick yes, I've got that on my site for old medium posts, so it a bit "less" messes with SEO.


First Pass Model Notebook

initial model
Description
Random Forest classiifer model to distinguish between instances of police use of force and other reddit posts
Number of Files changed
1
Questions for Reviewer
Type of Change

[x] New Feature
[ ] Feature Update
[ ] Fix Error

Status

[x] Tested

Description
Move notebook to correct folder
Number of Files changed
1
Questions for Reviewer
Type of Change

[ ] New Feature
[ ] Feature Update
[ ] Fix Error

Status

[ ] Tested


Maintained?

Hello, I just stumbled onto this repo after finding out about base16-manager, since there's no activity for the past 10 months from what I've seen and the description having a WIP tag, I've wanted to ask: Is this still maintained/planned to be worked on?

I do plan on working it. There are still some features that I plan on implementing. Its just neither me nor @DakshG07 have had any time recently to divert here.

At the time being, I’d say the project is on hold. There’s not really a definitive answer here—it really is just that we both don’t have the time to work on it anymore.
The project itself is nearly feature complete—the issue was mainly with adoption. As it would turn out, it’s quite difficult to create .catppuccin.yamls for over 100 (now 200) repositories.
Of course, this doesn’t mean that I won’t accept the occasional PR, not that I won’t ever come back to the project. However, the Catppuccin CLI, for the time being, isn’t being actively maintained.
(Of course, if you wish to work on/maintain this project, feel free to reach out to us on Discord.)

Unfortunately, go isn't in my stack, rust developer :P. Thanks for the quick response time and the insight! I'll close the issue for now since the question is answered, feel free to open it again if something comes up.


Orphan Private DNS Zones

Great Work On this.
What you think add Private DNS Zones without Vnet Links? Does this makes sense?
This is a resource with cost.

Hi @fdmsantos,
Thanks for you suggestion - It is absolutely make sense.
I'll make sure to include it as part of the workbook.

Hi @fdmsantos,
Happy to update that orphaned Private DNS zones are now part of the workbook.
You are welcome to update the version of the workbook and thanks again for your suggestion.


Does mxnet support Stale Synchronous Parallel (aka. SSP)

Does mxnet support Stale Synchronous Parallel (aka. SSP) ? Just like Petuum do.
If it doesn't, is there any plan to support SSP?

I think ps-lite handle async sgd in a different. @mli
You can read Mu Li's paper for the exact algorithm

The only difference lies on implementation of kvstore while the interface remains the same, so the question becomes if ps-lite currently supported bounded staleness @mli  should be appropriate to answer this.

The implementation is quite easy, but we find it is not so useful since in
practice the actual delay observed is quite small, probably because the gpu
performance is uniform. Having an additional max delay constraint may bring
confusion to users.
On Sun, Dec 6, 2015 at 4:58 PM Tianqi Chen<EMAIL_ADDRESS>wrote:

Assigned #841 https://github.com/dmlc/mxnet/issues/841 to @mli
https://github.com/mli.
—
Reply to this email directly or view it on GitHub
https://github.com/dmlc/mxnet/issues/841#event-483823068.

I test SSP a lot, and I find caffe on petuum is not work well as expect.  so I suggest that use async.
if you have a good result, please let me know, I will try it again, using your configure.

The way of update parameter in SSP model is different with ASGD model.

Does mxnet use ps-lite as its kvstore for parameter ? @mli  @tqchen

@butterluo Yes, ps-lite is used as distributed backend, but the interface is quite flexible to change to others when needed. The new ps-lite is quite helpful, and allows you to define custom updates through native language such as python

@qiaohaijun i follow the notations from the paper the slow learners are faster, which is also compatible with the notations of  bertsekas at mit (i'm a big fan of him). while i guess the petuum guys use the notations from database, one of the original paper
i changed opinions to several guys at nips, i think ssp (or bounded delay) is not necessary at this moment for two reasons:

neither significant improvement on speed nor on convergence, due to the gpu dense operation performance is quite uniform.
what really matters is a special kind of straggler, namely one worker is blocked for several minutes, and then comes alive again. we probably want to reject its results based on very ancient weights

closing for now, I would say contribution to ps-lite is encouraged if anyone is interested in SSP


Contxt project infos

Is your feature request related to a problem? Please describe.
some projects depends on some sup-projects they are hosted in different repositories. so  anyone can have different locations locally.
if some task depends on other projects it is required to know the locations.
contxt iteself have this information already, but this is not well used in the contxt tasks definition
Describe the solution you'd like
any .contxt.yml should have a seperate block thats descripes the "contxt".
context:
  workspace: name-of-workspace
  aliases:
    - website
    - php

this can be used for

scanning new checkouts and create workspaceses and assigned paths
as alias for workingdir so just the workspace and the target path can be used

in detail:
a new command scan (for example) scan from a given path and reads any .contxt.yml file they found. if the workspace section exists, they will used to check if the workspace exists, create them if not and add the path....or if they exists, check if the path is already stored, and if not, store them as well.
in the task definition a new entry called context they have the following structure
 - id: task
   context:
      workspace: lima     # optional
      find: website    # required

this would work like the workingdir option and change the directory for this task depending the workspace and the path they can be find.
important: if no path matches, the whole process have to fail to make sure no execution is done on a wrong path.
Describe alternatives you've considered
Additional context

the solution is a little bit over the top.
we need a much simpler solution


Fix fix that select...from tablets() are invalidated when there exists predicates

Proposed changes
Issue Number: close #xxx
Probrem: select...from tablets() are invalidated when there exists predicates, such as:
// The all data is:
mysql> select * from student3;
+------+------+------+
| id   | name | age  |
+------+------+------+
|    1 | ftw  |   18 |
|    3 | yy   |   19 |
|    4 | xx   |   21 |
|    2 | cyx  |   20 |
+------+------+------+

// when we specified tablet to read:
mysql> select * from student3 tablet(131131);
+------+------+------+
| id   | name | age  |
+------+------+------+
|    1 | ftw  |   18 |
|    3 | yy   |   19 |
+------+------+------+

// Howerver, when there exists predicates, the `tablet(131131)` is invalidated
mysql> select * from student3 tablet(131131) where id > 1;
+------+------+------+
| id   | name | age  |
+------+------+------+
|    4 | xx   |   21 |
|    3 | yy   |   19 |
|    2 | cyx  |   20 |
+------+------+------+

After the fix, we get promising data
mysql> select * from student3 tablet(131131) where id > 1;
+------+------+------+
| id   | name | age  |
+------+------+------+
|    3 | yy   |   19 |
+------+------+------+

Further comments
If this is a relatively large or complex change, kick off the discussion at<EMAIL_ADDRESS>by explaining why you chose the solution you did and what alternatives you considered, etc...

run p0


Database Management

We need to decide on the appropriate database tech, libs and form of interaction such as ORM / plain SQL.

Currently gone with raw SQL as needed, will likely continue on this path.


Add flake8 for static analysis

@rultor merge

@rultor merge

@abdealijk OK, I'll try to merge now. You can check the progress of the merge here

@rultor merge

@abdealijk Done! FYI, the full log is here (took me 1min)


[feature request] Override for "AppDomainFriendlyName"

We are using this in an IIS Web App and a Windows Service. The AppDomainFriendlyName for the Windows Service looks great, but the one for the Web App looks like:
/LM/W3SVC/1039/ROOT-1-131631189689932306
It would be nice if the AppDomainFriendlyName was the name of the web app, or if I could override it with my own custom (useful) text.

refer to index aliases and field mappings


Deadlines mismatch on second plot file

First plot:
engraver -i <id> -s 0 -n 1048576 -p <path> -m 4GiB -c 2
Using scavenger miner against this single file I do not see any deadline mismatches.
Second plot:
engraver -i <id> -s 1048576 -n 40960 -p <path> -m 4GiB -c 2
Using scavenger miner with two plot files I start to see deadlines mismatch.
Any ideas what this is caused by?

Hi, thanks for reporting. This is indeed a bug and I'm very sorry for it, I messed something up. I've tracked the bug down and it's fixed now (v.2.0.4). Sorry for any inconvenience caused.


Avoid accidentally using the "check" macro on OSX

Fix for #341, #273, and #104.  Replace usages of "check(" with
"(check)(", which will prevent us from colliding with the macro defined
in OSX's Assert macros.

@astrodroid , if you coudl validate this on OSX, it woudl be greatly appreciated.

Will merge as soon as someone on OSX can test.

@erichkeane, I will be away for most of today, I can test this pull request this evening or tomorrow.

Hi although it works fine for me, I haven't been able to run any unit tests as I haven't found a way to run all of them automatically. Is there a script that I missed or do I have to call each test case?

There is a CMake file in the root directory, and the unit tests all build (and I think run?) when doing 'make' after that.
Do something like this from the root of Cereal (assuming you have cmake installed):
mkdir Build
cd Build
cmake ../
make

Thanks @erichkeane, I have cmake installed.
I did run cmake with the cmake_file.txt modified as here so that boost will be found:
set(Boost_USE_STATIC_LIBS TRUE)
set (BOOST_ROOT /Users/andreas/Documents/Development/build/)
set(Boost_INCLUDE_DIR /Users/andreas/Documents/Development/boost)
set(Boost_LIBRARY_DIR /Users/andreas/Documents/Development/boost/build/lib)

but I get link time error, appearing something has gone wrong in the setting up of the environmental variables.
Linking CXX executable test_array
Undefined symbols for architecture x86_64:
  "boost::unit_test::unit_test_main(bool (*)(), int, char**)", referenced from:
      _main in array.cpp.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [unittests/test_array] Error 1
make[1]: *** [unittests/CMakeFiles/test_array.dir/all] Error 2
make: *** [all] Error 2

If some of you has

OK I managed to run the tests.
It passes all of them except the portability_test 32 and 64 bit which returns segmentation fault: 11.
But that was present even before and I haven't tried to look up what's causing it.

Merged into develop.
The portability tests are probably because you don't have a 32bit compiler installed, you can safely compile with those tests turned off (SKIP_PORTABILITY_TEST=ON) for CMAKE.


Cant read Storage on onInit()

so i have this simple controller, and in onInit box.read('citys') is null, i dont know why, is it a bug, how do i get the value in onInit and assign it to something?
with the getter of my controller, i am able to get the value from storage.
(First time this runs, it should be null, but secondtime it should return the stored value, its there i get it from the getter)
controller.dart
import 'package:get/get.dart';
import 'package:get_storage/get_storage.dart';

class TestController extends GetxController {
  final box = GetStorage();
  String get stringtext => box.read('citys') ?? "nux";

  @override
  void onInit() {
    print(box.read('citys')); // returns null ?????
    print('write');
    box.write('citys', 'Hallo!!');
    super.onInit();
  }
}

main.dart
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'controller.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  final TestController testController = Get.put(TestController());

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: Scaffold(
        body: Center(
          child: SimpleBuilder(
            builder: (_) {
              return Text(testController.stringtext);
            },
          ),
        ),
      ),
    );
  }
}

Initialize GetStorage (read the docs!)

Initialize GetStorage (read the docs!)

Ok forgot Initialize GetStorage and also getMaterialApp in this Demo .. sry for that... that was the Problem in the Demo, but i didn't forget it in my acutal App, and there it doesnt work with it initialized, so there is probably an error somewhere, im lookin into it, perharps i can find the error or reproduce it somehow.
Sorry for that in the demo, and thank you for the repsonse

Ok forgot Initialize GetStorage and also getMaterialApp in this Demo .. sry for that... that was the Problem in the Demo, but i didn't forget it in my acutal App, and there it doesnt work with it initialized, so there is probably an error somewhere, im lookin into it, perharps i can find the error or reproduce it somehow.
Sorry for that in the demo, and thank you for the repsonse

@ingomc
i have same problem, but i fixed use await GetStorage.init();
"await" is key point


fix: remove time indicator when is null

There are a problem with time .rbc-current-time-indicator when timeIndicatorPosition is null and that happens when current hour is bigger or smaller that grid rage.
  positionTimeIndicator() {
    const { min, max, getNow } = this.props
    const current = getNow()

    if (current >= min && current <= max) {
      const { top } = this.slotMetrics.getRange(current, current)
      this.setState({ timeIndicatorPosition: top })
    } else {
      this.clearTimeIndicatorInterval()
    }
  }

Then the .rbc-current-time-indicator stay on top of daycolumn grid.

thanks @lksilva. @jquense any chance we could get this merged?

Was this resolved elsewhere? I'm still seeing this issue.


[WIP] HTCondor Support Implementation

HTCondor is a framework that enables job submission onto the Open Science Grid. Extending the Airavata Helix implementation to incorporate HTCondor as a job submission framework will allow Airavata to also submit jobs to the Open Science Grid. This pull request includes the development of this extension. The tasks to implement this are as follows:
[ ] Integration of an HTCondor Groovy template
[ ] Integration of an HTCondor output parser class
[ ] Integration of an HTCondor configuration class
[ ] Integration of an HTCondor command map
[ ] Integration of an HTCondor job monitor
[ ] Unit test implementation where necessary

This is great progress. Have you manage to register HTCondor resource type from the pga? And please send the PR to airavata:htcondor branch.

We have a working version of the system running testable on our local systems. All components seems to be working for us.

This branch will be used as a reference implementation for Condor submissions but there are lots of un-related file changes that need to be rectified. I will extract out important code portions and create a different branch


ServerRawVersion attribute added

ServerRaw (timestamp) columns are supported now with a new class
attribute [ServerRawVersion("PropertyName")].

After a poco insert or update a select is made to update the poco raw
version column.
it's done into an sql transaction.(reel world concurrency management)
concurency exception on update.
no breaking change.

I have an issue on my code not sure if it's related.  With FluentMapping we use:
x.Column(y => y.RecordVersion).Version(VersionColumnType.RowVersion)
Is it suppose to be:
x.Column(y => y.RecordVersion).Version(VersionColumnType.ServerRawVersion)
TIA
André

Serverrawversion is if you are using the row version generated by the
database. Other wise the other one is just for a int value.


Migrate command is trying to migrate a non-existent personal_access_tokens migration file

Laravel Version: 9.3.1
PHP Version: 8.0.9
Database Driver & Version: MySql 14.14 Distrib 5.7.24, for Win64 (x86_64)

Description:
php artisan migrate command is still trying to migrate a non-existent personal_access_tokens migration file in the database/migrate directory.
I've also tried to run the composer dumpautoload command after renaming the file but it still fails.
Note: the reason I rename the migration files into 00_00_00_00 before deploying to any server is because we're a small team and we don't want to keep adding more files in the migration directory.
we always want to keep our migration directory as straightforward as possible before any deployments to a server.

composer file
"require": {
  "php": "^8.0.2",
  "guzzlehttp/guzzle": "^7.2",
  "laravel/framework": "^9.2",
  "laravel/sanctum": "^2.14.1",
  "laravel/tinker": "^2.7",
  "maatwebsite/excel": "^3.1",
  "phpoffice/phpspreadsheet": "^1.22",
  "psr/simple-cache": "^1.0"
},
"require-dev": {
  "fakerphp/faker": "^1.9.1",
  "laravel/sail": "^1.0.1",
  "mockery/mockery": "^1.4.4",
  "nunomaduro/collision": "^6.1",
  "phpunit/phpunit": "^9.5.10",
  "spatie/laravel-ignition": "^1.0"
}

Steps To Reproduce:

create a new fresh laravel instance
rename the existing personal_access_tokens file (see image above)
run the migration

Hi there,
Thanks for reporting but it looks like this is a question which can be asked on a support channel. Please only use this issue tracker for reporting bugs with the library itself. If you have a question on how to use functionality provided by this repo you can try one of the following channels:

Laracasts Forums
Laravel.io Forums
StackOverflow
Discord
Larachat
IRC

However, this issue will not be locked and everyone is still free to discuss solutions to your problem!
Thanks.

Yes I am facing same issue here. I deleted all migration files but that personal_access_tokens table is still created even I dumped everything.
"require": {         "php": "^8.0",         "fruitcake/laravel-cors": "^2.0",         "guzzlehttp/guzzle": "^7.0.1",         "laravel/framework": "^8.54",         "laravel/sanctum": "^2.11",         "laravel/tinker": "^2.5",         "laravel/ui": "^3.3"     },     "require-dev": {         "facade/ignition": "^2.5",         "fakerphp/faker": "^1.9.1",         "laravel/sail": "^1.0.1",         "mockery/mockery": "^1.4.2",         "nunomaduro/collision": "^5.0",         "phpunit/phpunit": "^9.3.3"     },


faster, compatible encoding scheme for []crypto.Hash

couldn't help myself. This should be a lot smaller (base64 instead of base16, no separators), compatible (loads the old method if the new load attempt fails), and faster (only encoding 1 object instead of N).
Benchmarking on a production Sia client.

result: it's smaller but also more CPU intensive, so a net negative.
I want to look into optimizing it a bit more.

I added some benchmarks and... I was wrong. It is faster, by more than a factor of two. I'm not sure what the server was doing that made me think it was slower, but I can confirm that the server is actually running faster now. Before the update it was going at maybe 17mbps and now it's doing about 27mbps... for now at least.
Not a significant boost by any means though. I'm looking forward to the PR that avoids encoding 100% of the metadata every update. :)

:< I am seeing the repeated situation where all tests pass in the API but then for some reason the suite gets a fail? Not sure what could be going on here, but maybe we should ask upstream.

Won't this be negated by the move to log-based persist, since we only add one hash at a time? If we switch a single root's encoding to base64, it's not as compact, but it would be applicable to single-hash updates as well.

we'd also lose most of the speed boost I think, most of the speed increase I believe is the fact that we're just working with one slice.
But also, I don't think we'll be moving away from storing them as 1 giant base64 all that soon. First we need a WAL, then we need confidence that it's the biggest bottleneck, then we need some scheme for storing them on disk in a way that is easy to random-access and also not super intrusive.
I'm guessing we will merge host+wallet pr's before we get that far

This PR is not too much code and provides basically an immediate 35% speedup to anyone storing more than 100GB of data, I think that's a good reason to merge it.


Add drag and drop support

Selenium provides a mechanism for allowing actions to be performed such as drag and drop with certain key presses. This allows for the automation of actions such as shift drag and drop or ctrl drag and drop.
It would be nice to be able to drag an element to another element and drop it. Perhaps also allow for a way to say whereabouts on the second object you would like to drop the item?
I always find drag and drop a very annoying feature to implement using Selenium and having 'Atata' do it nicely would be a huge benefit!

I see your issue. For now, you can take a look at issue #25, in which is described how it can be implemented using WebDriver actions. I also think how to provide similar Atata API for easy use.

Drag and drop functionality added to recently released Atata v0.13.0.


Square wave latency summand

Hi,
I can see that the square wave latency summand is planned in the roadmap:

Additional latency summands (i.e. triangle wave and square wave)

I would like to implement it.

Sure, go ahead!
There is one caveat regarding square wave implementation. Please make sure that latency value that it generates cycles between +amplitude and -amplitude (not +amplitude/2 and -amplitude/2) to keep it consistent with other latency summands, as I've seen some publications in which the square wave amplitude was defined as the latter.


Missing 5th SSL info in README

All info is in the title - README.md is missing the latest SSL fuck-up, which has already been mentioned on the website.

duplicate of #16

Closing this since it's a duplicate issue which has already been discussed.


Run tests for Django main for Python >= 3.10

Django main branch is going to be prepared for version 5.0. And Django 5.0 requires Python >= 3.10

Thanks, LGTM!


Migrate up to ACL if there are no warning and show messages only once

@arielshaqed,
according to your comments:

Always run migrateToACL with printMessages=true, then re-run it with printMessages=false if we need to (because there are no warnings, or because force was applied).
If we do that force will not print warnings, which was implemented that way, I didn't want to change that behavior

Use warnings to report users with directly-attached policies, rather than giving them special treatment.
Considered that, but it doesn't exactly fit for warnings, it has no ACL and different behavior than warnings

Also noting that we will not need to maintain this code, the migration code should be removed in the following lakeFS version.


Hover run dosent work in windows with golang version 1.15

Hover doctor

$ hover doctor
2020/10/22 07:10:42 hover: Error setting console mode: The parameter is incorrect.
←[1;36mhover: ←[0m←[31mCannot obtain version information from hover build. To resolve this, please g
o-get hover using Go 1.13 or newer.←[0m

Error output

Using hover run to build my application, I get the following
error:
2020/10/22 07:12:09 hover: Error setting console mode: The parameter is incorrect.
←[1;36mhover: ←[0mUsing engine from cache
←[1;36mhover: ←[0mCleaning the build directory
←[1;36mhover: ←[0m←[33m⚠ The go-flutter project tries to stay compatible with the beta channel of Fl
utter.←[0m
←[1;36mhover: ←[0m←[33m⚠     It's advised to use the beta channel: `←[35mflutter channel beta←[0m`←[
0m
←[1;36mhover: ←[0m←[32mBundling flutter app←[0m
Font subsetting is not supported in debug mode. The --tree-shake-icons flag will be ignored.
←[1;36mhover: ←[0m←[31mCannot obtain version information from hover build. To resolve this, please g
o-get hover using Go 1.13 or newer.←[0m

I'm using golang version 1.15
PS C:\code\flutter\hellogoflutter> go version
go version go1.15.2 windows/amd64

PS C:\code\flutter\hellogoflutter> go env GO111MODULE
auto

gcc is installed and works as expected.
PS C:\code\flutter\hellogoflutter> gcc --version
gcc.exe (MinGW-W64 x86_64-posix-seh, built by Brecht Sanders) 10.2.1 20200912
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

I had the same issue on Widnows10

F:\desktop\examples\stocks>hover doctor hover: Cannot obtain version information from hover build. To resolve this, please go-get hover using Go 1.13 or newer.

You need to install hover with: GO111MODULE=on go get -u -a github.com/go-flutter-desktop/hover.

To use this on windows use set GO111MODULE=on before. I guess that is what you are missing.

works now, thanks for your help!

To use this on windows use set GO111MODULE=on before. I guess that is what you are missing.

This worked for me. thanks

For Powershell, it seems to be
$env:GO111MODULE="on"; go get -u -a github.com/go-flutter-desktop/hover

For Powershell, it seems to be
$env:GO111MODULE="on"; go get -u -a github.com/go-flutter-desktop/hover


Abort trap: 6 Issue with ComposedProcedure

Running in Xcode 10 with Swift 4.2 against the OPR-853_cloud_kit_xcode_10 that was created over the weekend. Experienced this issue with Xcode 9.4.1 with Swift 4.1 as well.
Instructions:
Create a new workspace with the ProcedureKit frameworks
Create a new single-view project
Add the attached file and attempt to compile it.
You'll see an Abort trap: 6 with a lengthy trace. The last lines are:
'
CloudFetchUserRecordOperation.swift.zip

While serializing 'CloudFetchUserRecordOperation' in module 'Simplified'
While loading conformances for 'CloudFetchUserRecordOperation' in module 'Simplified'
While reading inherited conformance for type 'CloudFetchUserRecordOperation'
While reading specialized conformance for type 'ComposedProcedure<CloudKitProcedure>'
While reading inherited conformance for type 'CloudKitProcedure'
While reading specialized conformance for type 'RepeatProcedure<CKProcedure>'
While reading inherited conformance for type 'CKProcedure'
While reading specialized conformance for type 'ComposedProcedure'
'

Hi @StephenDaedalus,
This works fine for me:
import Foundation
import CloudKit

import ProcedureKit

final class FetchUserRecord: GroupProcedure, OutputProcedure {

    var output: Pending<ProcedureResult<CKRecord>> = .pending

    init(container: CKContainer = .default()) {

        let cloud = CloudKitProcedure { CKFetchRecordsOperation.fetchCurrentUserRecordOperation() }
        cloud.container = container
        cloud.database = container.publicCloudDatabase

        super.init(operations: [cloud])

        cloud.setFetchRecordsCompletionBlock { [weak self] (recordsByID) in
            guard let userRecord = recordsByID?.first else { return }
            self?.output = .ready(.success(userRecord.value))
        }

        add(condition: MutuallyExclusive<FetchUserRecord>())
        add(condition: AuthorizedFor(Capability.CloudKit()))
    }
}

Make sure you're using branch xcode/10.0/development and that you're compiling everything in Swift 4.2 mode.

I’ll retry right away. Thanks again.

On Jun 18, 2018, at 03:36, Daniel Thorpe<EMAIL_ADDRESS>wrote:
Hi @StephenDaedalus,
This works fine for me:
import Foundation
import CloudKit
import ProcedureKit
final class FetchUserRecord: GroupProcedure, OutputProcedure {
var output: Pending<ProcedureResult<CKRecord>> = .pending

init(container: CKContainer = .default()) {

    let cloud = CloudKitProcedure { CKFetchRecordsOperation.fetchCurrentUserRecordOperation() }
    cloud.container = container
    cloud.database = container.publicCloudDatabase

    super.init(operations: [cloud])

    cloud.setFetchRecordsCompletionBlock { [weak self] (recordsByID) in
        guard let userRecord = recordsByID?.first else { return }
        self?.output = .ready(.success(userRecord.value))
    }

    add(condition: MutuallyExclusive<FetchUserRecord>())
    add(condition: AuthorizedFor(Capability.CloudKit()))
}

}
Make sure you're using branch xcode/10.0/development and that you're compiling everything in Swift 4.2 mode.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

I can confirm your FetchUserRecord procedure does work fine. I don't understand the complexities of the ComposedProcedure I had been using - since your example is simpler and accomplishes the same thing. Closing this for now.

@StephenDaedalus yeah, your ComposedProcedure sample, probably should have worked, but, overall it isn't really needed.
ComposedProcedure is sort of a niche GroupProcedure subclass, which is good for cases where you don't want to wrap an NSOperation class which you don't own. i.e.
queue.add(operation: ComposedProcedure(operation: SomeOtherOperation()))

I should probably make ComposedProcedure final, as in general it should not be subclassed.
In this case, because we are using CloudKitProcedure it is already wrapping the CKOperation in a Procedure so there is really no need to wrap it again. Instead we just want to compose it.

Hey @StephenDaedalus, responding to your comments on Slack... you could augment this procedure like this:
final class FetchUserRecord: GroupProcedure, OutputProcedure {

    typealias FetchCloudRecordProcedure = CloudKitProcedure<CKFetchRecordsOperation>
    typealias ConfigureBlock = CloudKitRecovery<CKFetchRecordsOperation>.ConfigureBlock
    typealias Recovery = CloudKitRecovery<CKFetchRecordsOperation>.Recovery

    let cloud: FetchCloudRecordProcedure

    var output: Pending<ProcedureResult<CKRecord>> = .pending

    init(container: CKContainer = .default()) {

        cloud = CloudKitProcedure { CKFetchRecordsOperation.fetchCurrentUserRecordOperation() }
        cloud.container = container
        cloud.database = container.publicCloudDatabase

        super.init(operations: [cloud])

        cloud.setFetchRecordsCompletionBlock { [weak self] (recordsByID) in
            guard let userRecord = recordsByID?.first else { return }
            self?.output = .ready(.success(userRecord.value))
        }

        cloud.set(errorHandlerForCode: .badDatabase) { (fetchRecordsOperation, fetchRecordsError, logger, recovery) -> Recovery? in
            // Handle "bad database error here"..

            // The provided recovery is the suggested `Delay` parameter, and the current configure block.
            let (suggestedDelay, currentConfigureBlock) = recovery

            // Return a tuple of the same type, adding any specific additional configuration.
            let updatedConfigureBlock: ConfigureBlock = { wrappedCloudKitOperation in

                // First call the current configure block - this will reset existing configurations
                // such as the container etc.
                currentConfigureBlock(wrappedCloudKitOperation)

                // Do any new configuration here, depending on how you want to adjust the operation
                // in light of the error. Read CloudKit docs for tips on how to handle specific errors

                // For example, maybe change the database?
                wrappedCloudKitOperation.database = container.privateCloudDatabase
            }

            // Now return this tuple. CloudKitProcedure will take this, and apply
            // the updated configuration to a new CKFetchRecordsOperation instance, and
            // execute it.
            return (suggestedDelay, updatedConfigureBlock)
        }

        add(condition: MutuallyExclusive<FetchUserRecord>())
        add(condition: AuthorizedFor(Capability.CloudKit()))
    }

    // If the CloudKitProcedure encounters an error, and there is no error handler set for
    // it, then it will finish with an error. Override the GroupProcedure method here to
    // catch this, and set it on the output.
    override func child(_ child: Procedure, willFinishWithErrors errors: [Error]) {
        defer { super.child(child, willFinishWithErrors: errors) }
        guard child == cloud, let error = errors.first else { return }
        output = .ready(.failure(error))
    }
}

Bu default, CloudKitProcedure will automatically retry another instance of the CKOperation as is for all of the network errors - you do not need to do anything.

This is great! I'll have to study it a bit more closely but if there's anything that's missing from the ProcedureKit framework is more current sample code with reference implementation examples. I mentioned before that I'd be happy to throw in a few of my classes just to see how they stack up.
One thing I discovered is that if you add the AuthorizedFor(Capability.CloudKit()) condition on the lower-level 'cloud' operation instead of on the FetchUserRecord GroupProceudre, you'll be able to pick up the error in the child willFinishWIthErrors method. It helps to localize failures. Not sure if you'd agree with that approach.


Bittrex 1.1 Api past end of life.

HI I am having an issue creating orders on Bittrex and I noticed you are still using version 1.1 of Bittrex API. Bittrex say this needs to be upgraded to version 3 so I wondered if you had any plans to do this?
Issue seems to be with TradeApi CreateLimitOrder
Thanks!

I will upgrade asap.

I will upgrade asap.

Fixed an error in which there was a problem with the operation due to the need for time to upgrade.

Fixed an error in which there was a problem with the operation due to the need for time to upgrade.


remove write-stream

LGTM

I'm sure that @rvagg is gonna be hurt that boganipsum is gone, but otherwise it looks fine. What are we going to do for documentation? (probably better to address with another commit)

Oh, I guess I missed the message that was added which says it's been removed.

I can put back boganipsum for sentimental reasons, if needed ;)

@ralphtheninja LGTM. Good work :+1:

@jcrugzz All the work was already made. Just placing the ball on the penalty point so hopefully @rvagg can kick in the ball next week ;)

+1! great work @ralphtheninja!


Endpoint actor now doesn't crashloop

Merged #369, no conflicts now.

@cupen this commit has been reverted, so how to fix it now?

@qjpcpu Hi, it's not a critical bug. The recommended workaround is to use fixed port.
btw: I have tried to fix it several weeks ago, but no progress.  Maybe I will try again next month if I have spare time .

@qjpcpu Hi, it's not a critical bug. The recommended workaround is to use fixed port.
btw: I have tried to fix it several weeks ago, but no progress. Maybe I will try again next month if I have spare time .

@cupen Our ip and port are dynamic, so it will change after pod restart. After serveral deployments, the cluster would generate many  error logs, so we would be grateful for your fix.

@cupen hope you fix it soon 😁

I'd recommend deploying proto clusters as stateful sets and use hostnames instead of ips.


refactor(sbb-title): refactor sbb-title according to new specification

Preflight Checklist

[X] I have read the Contributing Guidelines for this project.
[X] I agree to follow the Code of Conduct that this project adheres to.
[X] I have searched the pull request tracker for a Pull Request (PR) that matches the one I want to submit, without success.

Issue
This PR Closes #1223
Pull request checklist
Please check if your PR fulfills the following requirements:

[X] Tests for the changes have been added (for bug fixes / features)
[X] Docs have been reviewed and added / updated if needed (for bug fixes / features)
[X] Build (npm run build) was run locally and any changes were pushed
[X] Lint (npm run lint) has passed locally and any fixes were made for failures

Changes
Changes in this pull request:

text of the title is now in a "slot name=content"
negative-variant is now a boolean property negative=true
if no title-id is given, it will generate one automatically
code: prefer <TAGNAME class={...} id={...} instead of <TAGNAME {...attrs}

BREAKING CHANGE: the text/content of the title is not an attribute anymore, but a slot!
Browsers
I tested the build on the following browsers:

[X] Firefox Desktop
[X] Chrome Desktop
[X] Safari Desktop
[ ] Firefox Mobile
[ ] Chrome Mobile
[ ] Safari Mobile
[ ] Opera
[ ] Brave

Pull request type

Please check the type of change your PR introduces:

[ ] Bugfix
[ ] Feature
[ ] Code style update (formatting, renaming)
[X] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] Documentation content changes
[ ] Other (please describe):

Does this introduce a breaking change?

[X] Yes
[ ] No

The sbb-title displays the content-text in a slot, and not in an attribute anymore. The others components which are using the sbb-title has been updated accordingly.
Other information

Codecov Report

Merging #1289 (4140e58) into master (ab917b0) will increase coverage by 1.48%.
The diff coverage is 91.02%.

@@            Coverage Diff             @@
##           master    #1289      +/-   ##
==========================================
+ Coverage   54.85%   56.34%   +1.48%
==========================================
  Files          49       50       +1
  Lines        1659     1727      +68
  Branches      406      428      +22
==========================================
+ Hits          910      973      +63
- Misses        671      676       +5
  Partials       78       78

Impacted Files
Coverage Δ

src/components/sbb-footer/sbb-footer.tsx
87.50% <ø> (ø)

src/components/sbb-link-list/sbb-link-list.tsx
88.23% <ø> (ø)

src/components/sbb-title/sbb-title.tsx
88.88% <84.61%> (+2.22%)
:arrow_up:

src/components/sbb-icon/sbb-icon.tsx
92.30% <92.30%> (ø)

:mega: Codecov can now indicate which changes are the most critical in Pull Requests. Learn more


getObject and putObject in S3

Added the wrappers for the AWS S3 API functions for getObject and putObject.  This should fix #23

:+1: thanks!


Fix axis inversion, fix bad GUID for description match mode

#500

gonna rework this by pulling description-based guids from the DB instead of hardcoding


Feature Enhancement: --stdout option added to Output result to STDOUT

@mohebifar ..Can you please tell me why the tests are failing ?


Enable receive custom popup dialog in ColumnMenuDelegate

Description
This PR aims to allow the ColumnMenuDelegate, the delegate that controls the popup when the 3 points are pressed, to receive a custom dialog. Before this PR was only possible to override the default class to pass a list of PopupMenuEntry, an abstract class that contains a child widget and a value to be returned, passed to showMenu dialog. It wasn't possible to create any other type of dialog.
Now, it's possible to override the method resposible to call the popup, passing a custom dialog.
Main points
Before
Example created looking the PlutoColumnMenuDelegateDefault.
The method _getDefaultColumnMenuItems create a list of PopupMenuEntry widget.
It's obligatory to pass PopupMenuEntry, because the method showColumnMenu, call the showMenu dialog, and it's called in the PlutoColumnTitle, which it's not possible to edit or override in any way.
@override
List<PopupMenuEntry<PlutoGridColumnMenuItem>> buildMenuItems({
  required PlutoGridStateManager stateManager,
  required PlutoColumn column,
}) {
  return _getDefaultColumnMenuItems(
    stateManager: stateManager,
    column: column,
  );
}

final selected = await showColumnMenu(
  context: context,
  position: position,
  backgroundColor: stateManager.style.menuBackgroundColor,
  items: stateManager.columnMenuDelegate.buildMenuItems(
    stateManager: stateManager,
    column: widget.column,
  ),
);

Now
Now, the showColumnMenu method it's declared in PlutoColumnMenuDelegate abstract class. So it's possible to implement to a new class, and create a new dialog. And this method must receive all the options passing in buildMenuItems, but can return any type.
How to smoke

If you want to continue in the default, it will be necessary to override the showColumnMenu like:

@override
Future<PlutoGridColumnMenuItem?>? showColumnMenu({
 required BuildContext context,
 required Offset position,
 required List<Widget> items,
 Color backgroundColor = Colors.white,
}) {
 final RenderBox overlay =
     Overlay.of(context).context.findRenderObject() as RenderBox;

 final List<PopupMenuEntry<PlutoGridColumnMenuItem>> finalItems =
     items.cast<PopupMenuEntry<PlutoGridColumnMenuItem>>();

 return showMenu<PlutoGridColumnMenuItem>(
   context: context,
   color: backgroundColor,
   position: RelativeRect.fromLTRB(
     position.dx,
     position.dy,
     position.dx + overlay.size.width,
     position.dy + overlay.size.height,
   ),
   items: finalItems,
   useRootNavigator: true,
 );
}

You can create a custom dialog.

It will pass a list of PopupMenuItems, that have a String return value.
  @override
  List<PopupMenuEntry<String>> buildMenuItems({
    required PlutoGridStateManager stateManager,
    required PlutoColumn column,
  }) {
    return [
      PopupMenuItem<String>(value: 'Contains', child: Text('Contains')),
      PopupMenuItem<String>(value: 'Equals', child: Text('Equals')),
      PopupMenuItem<String>(value: 'Start with', child: Text('Start with')),
    ];
  }

@override
Future<String?>? showColumnMenu({
  required BuildContext context,
  required Offset position,
  required List<Widget> items,
  Color backgroundColor = Colors.white,
}) {
  return showDialog(
    context: context,
    builder: (_) {
      return Center(
        child: Container(
          height: 350,
          width: 300,
          child: SingleChildScrollView(
            physics: ScrollPhysics(),
            child: Column(
              children: [
                ListView.builder(
                  physics: NeverScrollableScrollPhysics(),
                  shrinkWrap: true,
                  itemCount: items.length,
                  itemBuilder: (_s, index) {
                    return GestureDetector(
                      onTap: () {
                        return items[index].value;
                      },
                      child: items[index].child,
                    );
                  },
                ),
              ],
            ),
          ),
        ),
      );
    },
  );

@gustoliveira I'm not able to reproduce the feature using the codes you're showing as an example (How to smoke section).
The first code, default behavior, is not overring the showColumnMenu function. What changes more needs to be done on the GridColumnMenu widget file?


Enhance coverage

We are about 55% coverage.
Let's enhance that.

Let's set a clear coverage goal and split this down into per package tasks (which would end up being white-belt tasks, themselves). For a Go project, 75% to 80% is good but I'd like to hear people's opinions.

How about make a task list here or open a new issue, such as

[ ] manifest/sign.go
[x] manifest/manifest.go

Then people can pick some to enhance

@HuKeping Please open specific issues for areas where coverage is both low and the lack of coverage opens up ambiguity in functionality.
@dmp42 Above, I proposed 75 to 80 percent. At 55%, we have had a good balance between maintainability and coverage. Are there specific sections of the code that require better coverage? I want to avoid the "code coverage crusade", and make sure we are taking actionable decisions. Right now, our defect rate is not bad, considering the level of code coverage. What could an extra 20% get us? What are the costs?
I am going to close this, unless there is disagreement around my points above.

The only twos areas where I would love to see strong coverage are storage drivers, and http input handling (admittedly, the latter is not "unit" testing per-se).
Either way, the current coverage is ok IMO, and I certainly wouldn't want people to churn around just to cover silly/trivial paths.

@dmp42 Agreed. Do we have ways to check those requirements per package?

@stevvooe I guess so - requires more tooling work though.


Adds a nitrogen tank to engineering lockers

now that slime people need nitrogen, this adds a nitrogen tank to Chief engineer, regular engineer, and atmos equipment lockers

I recommend also changing the regular air tank dispenser from air to nitrogen (since nothing uses air anyway).
Can’t remember if I put it in the dispenser or vending machine section but it’s a fill non the less.

dedicated tank spawner when? as a slime main I approve these changes

this should be given to salvage as well, and nukies if you can figure out a way

I think nukies oxygen tanks spawn on a rack so that should probably be a map change. The nitrogen tanks also already available in the EVA storage tank dispensers, which nukies should also probably have


[1.18.2] 0.5.0g Create Tank + MI Pipe = Crash

Describe the Bug
since I've updated to Create 0.5.0g I can't load my world.
tried on server and client.
Reproduction Steps

place a Create Tank
place a filled fluid tank e.g. from MI
place and configure a MI pipe to transfer the fluid to the Create Tank
crash

Expected Result
it should load up like bevore
Screenshots and Videos
No response
Crash Report or Log
https://gist.github.com/MSandro/234d148b8300ebe1dc8d7d4828374450
Operating System
Linux
Mod Version
0.5.0g
Minecraft Version
1.18.2
Other Mods
https://www.curseforge.com/minecraft/modpacks/sky-fabrication-3/files/4215918
Additional Context
No response

I've tried to reproduce the issue in a new world.
It is caused by combining Create Tanks with Pipes from Modern Industrialization.

place a Create Tank
place a filled fluid tank e.g. from MI
place and configure a MI pipe to transfer the fluid to the Create Tank
crash

when will this fix be released on CurseForge?

I'm aiming for about another week.

Thanks, I hope it's stable again soon, I'm getting more and more crash reports from my community.
https://github.com/MSandro/sky_fabrication3/issues/59


Remove this repo, and migrate to chain:address format

Context: https://forum.polkadot.network/t/ux-proposal-consensus-based-address-formats/6072
Accepted Solutions:

https://ethereum-magicians.org/t/chain-specific-addresses/6449

cc @joepetrowski

Maybe should be a RFC?

We still need a registry somewhere that gives the prefix for each consensus system, but then we would really just have three: Polkadot, Kusama, and testnets. So perhaps a repo/registry is overkill and we just go to using chain specs? In which case, I think @bkchr is right, we should have an RFC telling UI/app devs to use the prefix of the consensus system to which it belongs.

I mean I'm not against removing/moving this repo to somewhere else. :)

Couldn't that live on-chain on the consensus system? Just query Kusama if you want to know the prefix.

Yes, it does, but that doesn't mean people look for it there or use it. I would say archive this repo, but we should also not just make it disappear but rather provide instructions about what to do instead of using it.


Feature/storage call reduction

API changes:
previously:
api.query.pools(assetID1, assetID2) = > assetID1Reserve
api.query.pools(assetID2, assetID1) = > assetID2Reserve
Now:
api.query.pools(assetID1, assetID2) = > (assetID1Reserve,assetID2Reserve)
api.query.pools(assetID2, assetID1) = > none / no such key in map

Included in other merged pr, no need for the merge


Add heuristic paths to ignore header files

@Shaikh-Ubaid Try this PR.
Relevant comments - https://github.com/lcompilers/lc/pull/18#issuecomment-1856168378 and https://github.com/lcompilers/lc/pull/18#issuecomment-1856180697

That's fine for now. Ultimately we need to fix https://github.com/lcompilers/lc/issues/60.

Ondrej and I fixed the issue on my system in the last meet. https://github.com/lcompilers/lc/pull/61 is the related PR that helped.


[Event Request] CU90 "Purch.-Post" - procedure CopyAndCheckItemChargeTempPurchLine()

local procedure CopyAndCheckItemChargeTempPurchLine()
var
begin
----------------------- ADD EVENT ----------------------
IsHandled := false;
OnBeforeTestFieldJobNoOnCopyAndCheckItemChargeTempPurchLine(IsHandled)
if not IsHandled then
   TempPurchLine.TestField("Job No.", '');
----------------------------------------------------------

....................
[IntegrationEvent(false, false)]
local procedure OnBeforeTestFieldJobNoOnCopyAndCheckItemChargeTempPurchLine(var IsHandled: Boolean)
begin
end;

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. Please do not reply to this, as we do not monitor closed issues. If you have follow-up questions or requests, please create a new issue where you reference this one.


How to bytes.pbTo[CaseClassWithMoreThan22Columns]?

When I do have to serialize and deserialize case class with more than 22 columns, it just complains that there is no implicit defined.  Is there a way around this?  Thanks for your help.

I doubt that the number of field is the problem here. I think that you have one (or several) fields that are not serialisable (from pbdirect's perspective at least).

All of the fields in my case class are of String, Long, Int and Double.  Let me try removing again a few of them at a time to see if the 22 columns limit is it.  Thanks.

@btlines is there any chance you have looked at this error?  Thanks for your help.

Sorry for the late reply but I'm struggling to keep up with all these projects.
This error occurs at compile time when the compiler performs the implicit resolution.
I don't think there is a way to get around this stackoverflow issue because it's just how the compiler works.
That being said there's probably a way to improve things a bit. At the moment the implicit resolution is done field by field (hence the stackoverflow error). If we do it X fields by X fields it should be possible to reduce the number of calls which should give us more room before we hit the stackoverflow.
Hopefully that should be enough to serialize your case class.

Thank you for your help.  Can you elaborate on what you think could be done?  Let’s say the case class is what I have at the moment.  Thanks again.

What I mean is that your case class is like a long list of fields and the implicit resolution is resolving these fields one by one:
Something like:

Find parser for field 1 and parser for rest of the fields which expands into
Find parser for field 2 and parser for rest of the fields which expands into
Find parser for field 3 and parser for rest of the fields which expands into ...
Every time it moves to the next field a new set of calls is added into the callstack.

The idea is that we can resolve several fields into a single phase:

Find parser for field 1, 2, 3, 4, 5 and parser for rest of the fields which expands into
Find parser for field 6, 7, 8, 9, 10 and parser for rest of the fields which expands into ...
Now we have 5 times less calls to make which gives us some space before we overflow the stack.

I'll try to create a PR later tonight to see if it works ...


I'm using fetch and i'm unable to fetch only confirmed

So I tried to use the latest cases of india and fetched that link, from that text, I wanted only the confirmed, recovered and deaths. I can't figure out how to get it. Can someone help me?
Used node-fetch.
.then(result => console.log(result["2020-04-11"].confirmed)))
This is the code I tried, but it just shows TypeError.
I used this because there were no , after result, 2020-04-11 and confirmed.
Thank you!

Hi, @Sattishh
Here's how you could implement it using node-fetch
const fetch = require('node-fetch');

fetch('https://covidapi.info/api/v1/country/IND/latest')
  .then(response => response.json())
  .then(data => {
    date = Object.keys(data.result)[0]
    result = data.result[date]
    console.log(result)
  })
  .catch(err => {
      console.log('error')
  })

Let me know if you have any queries

That's awesome. Thanks a lot!
Great API!


Please provide a way to disable a vite or internal plugin

Description
As a developer of a vite plugin, would be nice to have a supported way to disable a vite or internal plugin so that it doesn't conflict, the goal is to replace it.
Suggested solution
Currently hacking with:
    configResolved(conf) {
      // @ts-ignore
      // eslint-disable-next-line
      conf.plugins.splice(conf.plugins.findIndex((p) => p.name === 'vite:css-post'), 1);
    },

Alternative
A more supported way
Additional context
No response
Validations

[X] Follow our Code of Conduct
[X] Read the Contributing Guidelines.
[X] Read the docs.
[X] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.

Vite provides an opinionated set of plugins by default. We don't want to introduce a new option to disable it that could potentially break the app. If a plugin needs to disable a specific Vite plugin, I think that speaks a bigger picture that maybe something can be fixed in Vite? Closing as not planned.

@bluwy While I understand your point of view, just wanting to understand why certain plugins like esbuild can be disabled?
config.esbuild !== false ? esbuildPlugin(config.esbuild) : null,

That option was added when esbuild was new, hence the ecosystem may want to keep using Babel to transform JSX. There's not much reason now I believe, plugin-react and plugin-react-swc both leverages esbuild now.
But also, JSX can be interpreted differently depending on the tooling, so the flexibility is still needed now. CSS tooling in contrary has only one way to be interpreted, so it's a bit "closed" and opinionated that you can't change it drastically, other than the css config options.


Remove default keystore.alias value

The keystore.alias value should only be set if the user explicitly configures it. If no alias is set, then the first certificate in the keystore is used by the server.

Closing. The config-generator has been deprecated since 13.x. Users should provide their required server configuration directly to the image: https://github.com/infinispan/infinispan-images#server-configuration