Add snippet arrayLcm

Description

Add a snippet arrayLcm to calculate lcm of an array.

What does your PR belong to?

[ ] Website
[x] Snippets
[ ] General / Things regarding the repository (like CI Integration)

Types of changes

[ ] Bug fix (non-breaking change which fixes an issue)
[ ] Enhancement (non-breaking improvement of a snippet)
[x]  New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

[x] My code follows the code style of this project.
[x]  My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.
[x] I have checked that the changes are working properly
[x] I have checked that there isn't any PR doing the same
[x] I have read the CONTRIBUTING document.

@kingdavidmartins based on the fact that we have arrayGcd, arrayMin and arrayMax, I would say this is fine. They serve different use-cases.

@Chalarangelo I was actualy about to open an issue, Yea I noticed. I then thought why have arrayMax() which only takes an array & breaks when arrayMax(2, 5, 454, 23, 231, 2343)? Are we going to make a new function/snippet to handle the other use case? or can't we just add a line & have this current snippet and the like handle both arr's, x amounts of values & etc

@kingdavidmartins we should open an issue and deal with that as a general situation, the retroactively make the changes to existing snippets! 😉

@Chalarangelo Considered it done!! ⚡ 😄

I'm merging this, as the only issue is what I discussed with @kingdavidmartins and that should be dealt with separately!


Psalm Level 1 Testing: Tried to unpack non-iterable string $urlGenerator->generate(...$action)

What steps will reproduce the problem? Running psalm on the command prompt on a form file  e.g.
c:\wamp64\www\invoice>php ./vendor/bin/psalm resources/views/invoice/product/_form.php
... using the following controller/edit function:
'action' => ['paymentpeppol/edit', ['id' => $paymentPeppol->getId()]],
What is the expected result? A clean run
What do you get instead? The below error

Additional info

Q
A

Version
1.0.?

PHP version
8.1

Operating system
11

The following works for me:
In the controller:
edit function
$parameters = [
     'actionName' => 'paymentpeppol/edit',
     'actionArguments' =>  ['id' => $paymentPeppol->getId()]]
]

add function
$parameters = [
     'actionName' => 'paymentpeppol/edit',
     'actionArguments' =>  []
]

In _form.php:
$urlGenerator->generate($actionName, $actionArguments)


Setup eslint?

#804
I can pr it, just don't want to work on it and get rejected

Already done from monorepo #866


Swagger-node seems more strict than petstore.swagger.io would imply

In the petstore.swagger.io example application, certain APIs like DELETE /pet/{petId} do not define default response codes or handle response code 200, but they still work.
In my swagger-node application, the server blows up with TypeError: Cannot read property 'type' of undefined at Object.isModelParameter in helpers.js around line 55.
The code is trying to find a schema for the response code, but since one wasn't added to the spec and neither was a default, it blows chunks.
Should the swagger-node implementation handle this more gracefully like the petstore.swagger.io sample application?

After talking with some of the folks that know the back end of the pet store application, I learned that it uses java as the back end. The java implementation of swagger only generates the API it does not validate against it. So the petstore.swagger.io json is not valid, but I have no issue with swagger-node's validation.

To be clear, the pet store's Swagger definition is valid.


How to rebuild indexes when not using mutlisearchable?

I'm trying to use pg_search in my addresses table. I already have several million records in the table. I'm trying to figure out how to rebuild the indexes. I tried rake pg_search:multisearch:rebuild\[Address\] but I get this error
PgSearch::Multisearch::ModelNotMultisearchable: Address is not multisearchable.

I tried adding a job that does uses update_pg_search_document but I get this error
NoMethodError: undefined method `update_pg_search_document' for #<Address:0x00007f94c250fc18> Did you mean? updated_at_previous_change

Is there a way to update my indexes. I tried touching every record like in the commented code in my job but that doesn't seam to work. Searching still takes over 30 seconds.
reindex_addresses_worker.rb
class ReindexAddressesWorker < ApplicationWorker
  sidekiq_options queue: 'imports'

  def perform
    # Address.in_batches.each do |batch|
    #   Parallel.map(batch) do |address|
    #     address.address_line_1 = address.address_line_1.squish
    #     address.address_line_2 = address.address_line_2.squish if address.address_line_2.present?
    #     address.save
    #   end
    # end
    PgSearch::Document.delete_all(searchable_type: 'Address')
      Address.in_batches.each do |batch|
        batch.each(&:update_pg_search_document)
      end
  end
end

trigram index migration
class IndexAddressesOnAddressLine1 < ActiveRecord::Migration[6.1]
  # An index can be created concurrently only outside of a transaction.
  disable_ddl_transaction!

  def up
    execute <<~SQL
CREATE INDEX pg_search_addresses_on_fields ON addresses USING gin(coalesce(address_line_1, address_line_2, ''::text) gin_trgm_ops)
SQL
  end

  def down
    execute <<~SQL
DELETE INDEX pg_search_addresses_on_fields
    SQL
  end
end

address.rb
class Address < ApplicationRecord
  include PgSearch::Model
  pg_search_scope :search_for,
                  against: %i[address_line_1 address_line_2],
                  using: {
                    tsearch: { dictionary: 'english' },
                    trigram: { threshold: 0.5 }
                  }

@antarr there's no index to rebuild when not using multisearchable, it uses FTS directly on the addresses table


[Event Request] Report 99001043 Exchange Production BOM Item - Trigger OnPreReport - OnAfterCheckParameters

Describe the request
Please add an Event OnAfterCheckParameters in trigger OnPreReport, at the end of CheckParameters() procedure.
It is in Report 99001043 "Exchange Production BOM Item"
local procedure CheckParameters()
   var
       IsHandled: Boolean;
   begin
       IsHandled := false;
       OnBeforeCheckParameters(StartingDate, FromBOMType, FromBOMNo, ToBOMType, ToBOMNo, IsHandled);
       if IsHandled then
           exit;

       if StartingDate = 0D then
           Error(Text000);

       if FromBOMType = FromBOMType::" " then
           Error(Text001);

       if FromBOMNo = '' then
           Error(Text002);

       if (FromBOMType = ToBOMType) and (FromBOMNo = ToBOMNo) then
           Error(ItemBOMExchangeErr, FromBOMType, FromBOMNo, ToBOMType, ToBOMNo);
   end;
    OnAfterCheckParameters(FromBOMType, ToBOMType, FromBOMNo, ToBOMNo); // <------ NEW EVENT

[IntegrationEvent(false, false)]
local procedure OnAfterCheckParameters(var FromBOMType: Enum "BOM Type"; var ToBOMType: Enum "BOM Type"; var FromBOMNo: Code[20]; var ToBOMNo: Code[20])
begin
end;

Additional context
I want this event so that i can add my customization AFTER the checkparameter procedure is called.
Internal work item: AB#559831

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.
Build ID: 27959.


Crawl beyond the home page

Currently, we only visit the home page of each domain in the scan. Many sites might have different kinds of trackers on different pages. We could modify the crawler to randomly "click" around on the different first-party links on each site it visits.

@bcyphers Random clicking would make the results non-reproducible.

That's true, but results are already non-reproducible due to the nature of online advertising. Check out the history of results.json: every day a different set of trackers are discovered on the same set of sites.
The goal isn't to have a perfectly reproducible measurement, it's to get a representative sample of the trackers that a normal user would encounter, and I think clicking around would contribute to that goal.

@bcyphers Instead of random clicking, look for the most visited areas of the website.

Rather than random clicking on the same top X sites I would pick a random set of sites each run.  Say, if you're looking at the Majestic Million, the top entries will always be the same and they usually don't have many 3rd parties anyways (Netflix, Facebook, Google.com, etc.)  And the first 10,000 or 100,000 thousand may not give much coverage outside of USA, Europe, China, and a few other major markets.


Bluemix CLI Documentation

Let's update the README one more time to remove the references to CF CLI. You don't need to install it anymore; instead, installing the BMX CLI is enough since it comes pre-bundles with its own CF CLI.

I have removed the CF CLI references.


Added npm scripts

In the old version a contributor had to have http-server and grunt globally installed. I added scripts to the package.json in order to simplilfy contributing (from the package.json scope, you can reference packages even though they are not installed globally).
Added scripts:

npm start: starts local webserver
npm build: runs the default grunt task

Thanks, really helpful.


Prevent certain fields from being changed

This would throw if a patch method (maybe even an update?!?) contained any of a set of field names (dot notation).
This could be useful when combined with iff and a role-checking hook to prevent field updates.

ae [6:39 PM]
@eddyystop The hooks are straightforward to write, but knowing which  hooks to write is more difficult. If someone was to take https://github.com/eddyystop/feathers-starter-react-redux-login-roles/blob/master/server/services/user/hooks/index.js, for example, they’d have a system where anyone authenticated could write the data for any other user via the patch method.
It would be very useful to see the hooks setup of an actual production app.
eddyystop [6:40 PM]
You would need ...

The iff/when/unless hook
A hook that checked if the user belonged to one of a list of roles.
The discard or remove hook used with the above 2.
A hook that checked if hook.data contained any of a set of fields. Dot notation can be done using the getByDot hook utility.

I think that's it. Of course you could spec an api containing an object which is passed to a higher level hook which uses the above mentioned functions.

We should totally do this

The preventChanges before patch hook is in https://github.com/feathersjs/feathers-hooks-common/pull/175 and will be published in v3.3.0.
The more comprehensive hook detailed above will have to wait until permissions lands.

What about preventChanges in update?

preventChanges added for Buzzard.
https://feathers-plus.github.io/v1/feathers-hooks-common/index.html#preventchanges


Fixed Visual Studio 2022 support for Nvidia GPU support (NVCC Compilation Error Fix) #2890

As mentioned in https://github.com/dsgibbons/shap/issues/2 ; I am raising this PR
NVCC compilation in Windows with Visual Studio 2022 is not working with current setup.py file and compilation fails with below error. Therefore, GPU bases models like shap.explainers.GPUTree can't be used without CUDA support.
Error during compilation:
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.5\include\crt/host_config.h(160): fatal error C1189: #error:  -- unsupported Microsoft Visual Studio version! Only the versions between 2017 and 2019 (inclusive) are supported! The nvcc flag '-allow-unsupported-compiler' can be used to override this version check; however, using an unsupported host compiler may cause compilation failure or incorrect run time execution. Use at your own risk.
This pull request has modified NVCC command by adding -allow-unsupported-compiler to override limitation up to Visual Studio 2019.
nvcc_command = "-allow-unsupported-compiler shap/cext/_cext_gpu.cu -lib -o {} -Xcompiler {} -I{} " \

Hi @prabathbr , thanks for the PR. Two things:

I dont' have a machine with a GPU to test this, can you confirm after the changes in this PR, it doesn't introduce any other issues with the compilation of the gpu cext, and you're able to use gpu cext normally after this change?
Can you rebase your changes on our latest master branch, please?

I approved the workflow and rebased on top of master.

If anybody can verify this change works on their machine, I'm happy to merge this in. (I'm just worried that this change introduces other bugs, because we're not currently testing the gpu-code in our CI, as far as I can tell).

If anybody can verify this change works on their machine, I'm happy to merge this in. (I'm just worried that this change introduces other bugs, because we're not currently testing the gpu-code in our CI, as far as I can tell).

Hi, I was able to compile the library successfully after this modification and it generated "_cext_gpu.lib" under the build folder. I tested it using "explainer = shap.explainers.GPUTree(model, X)" with "shap.datasets.adult()" dataset.


18 add devtoolset 11 to dockerfile

This will update the build environment to support gen2 build dependencies for aws-sdk.

I have built this Dockerfile and staged it on AWS. When this PR is merged I will update the tags so that this new image is used for future builds.

Looks good


Mesosphere: DC/OS Integration

We need this. More details TBD.

For reference: https://github.com/cockroachdb/cockroach/issues/6859

@a-robinson, in the docs meeting today, we learned that docs for running cockroachdb on mesosphere have become a priority. Do you have experience with mesos? Think you could help me get started?

I'm familiar with its architecture and high-level features, but not particularly familiar with the details of actually using it.
What sort of help would you like? Generally figuring out the best way to fit Cockroach onto it or something more specific?

@a-robinson, just generally figuring out best way to fit Cockroach into it. We'll want a tutorial just like we have for kubernetes and docker swarm, where we run a multi-node cluster across containers, with stable identity and storage for nodes. Perhaps I should do some preliminary research and the pull you in when I see (or don't see) a way forward?

Either way works for me. I don't at all mind digging into this stuff. I should have time to start looking into it on Monday.

You'll be a lot quicker than me with this, so if you have time, that's great. Thanks, Alex!

@a-robinson I got cockroachdb running in mesosphere here: https://github.com/cockroachdb/cockroach/issues/6859#issuecomment-221145692

Putting this on hold until Q1 in favor of docs on k8 and swarm secure deployment.

@a-robinson, once this is ready for docs, please apply the ready label and add links to relevant PRs. Thanks!

Has been anything done for this other than #6859?
Are there any plans for developing a Mesos / DC/OS framework for CockroachDB?

Hi @bergerx, development of a DC/OS framework is mostly complete. It just needs to be published, which should happen soon, likely within the next week or two.

@a-robinson, please let me know what I or someone from docs can do to help here. I'll mark this as ready.

I'll send you all the resources in the meantime while I work on getting them published.

Any update on this?

@a-robinson, if we want mesos orchestration docs for 1.1, any chance you can help with the first draft?

Highly interested in this, if there is anything that I can do from outside (including reviewing/writing docs or beta testing the framework) I am more then willing to help out, just let me know.

We just announced a DC/OS package yesterday at Mesoscon. There is some documentation in the DC/OS examples repo.

As @bdarnell alluded to, the DC/OS package has been up on Universe for a while now, and the source is now up at https://github.com/cockroachdb/dcos-cockroachdb-service. Please try it out, file issues, and submit any improvements you put together!


Adding Panorama for AWS.

Hey @jamesholland-uk ,
I've added the following:

Panorama AMI's for each region.
Purge subfolder version.md files before recreation of them. This is due to orphaned version.md files existing.
Added a sorting based on Major version number simply for formating reasons.

Thanks Lachlan.

Looks great, thanks again for another brilliant contribution 🚀


fix: 29378 Distance - Search is open in background on distance image preview

Details

Fixed Issues

$ https://github.com/Expensify/App/issues/29378
PROPOSAL: https://github.com/Expensify/App/issues/29378#issuecomment-1758779541
Tests

Open the app (web/mweb/desktop)
Open any distance request money report or raise one and open
Click on map image
Click on 3 dots to open replace popup
Click CTRL+K / CMD+K and observe that app changes URL to search but still displays map preview (search is open in background)
App closes map preview and open search on using search shortcut

[x] Verify that no errors appear in the JS console

Offline tests

Same as above
QA Steps

Open the app (web/mweb/desktop)
Open any distance request money report or raise one and open
Click on map image
Click on 3 dots to open replace popup
Click CTRL+K / CMD+K and observe that app changes URL to search but still displays map preview (search is open in background)
App closes map preview and open search on using search shortcut

[x] Verify that no errors appear in the JS console

PR Author Checklist

[x] I linked the correct issue in the ### Fixed Issues section above
[x] I wrote clear testing steps that cover the changes made in this PR

[x] I added steps for local testing in the Tests section
[x] I added steps for the expected offline behavior in the Offline steps section
[x] I added steps for Staging and/or Production testing in the QA steps section
[x] I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
[x] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
[x] I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).

[x] I included screenshots or videos for tests on all platforms
[x] I ran the tests on all platforms & verified they passed on:

[x] Android: Native
[x] Android: mWeb Chrome
[x] iOS: Native
[x] iOS: mWeb Safari
[x] MacOS: Chrome / Safari
[x] MacOS: Desktop

[x] I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
[x] I followed proper code patterns (see Reviewing the code)

[x] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
[x] I verified that the left part of a conditional rendering a React component is a boolean and NOT a string, e.g. myBool && <MyComponent />.
[x] I verified that comments were added to code that is not self explanatory
[x] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
[x] I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method

[x] If any non-english text was added/modified, I verified the translation was requested/reviewed in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:

[x] I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
[x] I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is approved by marketing by adding the Waiting for Copy label for a copy review on the original GH to get the correct copy.
[x] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
[x] I verified the JSDocs style guidelines (in STYLE.md) were followed

[x] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
[x] I followed the guidelines as stated in the Review Guidelines
[x] I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
[x] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
[x] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
[x] I verified that if a function's arguments changed that all usages have also been updated correctly
[x] If a new component is created I verified that:

[x] A similar component doesn't exist in the codebase
[x] All props are defined accurately and each prop has a /** comment above it */
[x] The file is named correctly
[x] The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
[x] The only data being stored in the state is data necessary for rendering and nothing else
[x] If we are not using the full Onyx data that we loaded, I've added the proper selector in order to ensure the component only re-renders when the data it is using changes

[x] Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)

[x] All JSX used for rendering exists in the render method
[x] The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions

[x] If any new file was added I verified that:

[x] The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory

[x] If a new CSS style is added I verified that:

[x] A similar style doesn't already exist
[x] The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG))

[x] If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
[x] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[x] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
[x] If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
[x] If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
[x] If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
[x] I have checked off every checkbox in the PR author checklist, including those that don't apply to this PR.

Screenshots/Videos

Android: Native

Android: mWeb Chrome

https://github.com/Expensify/App/assets/113963320/f57e6a78-c49f-4b45-8e2d-a984991397d9

iOS: Native

iOS: mWeb Safari

https://github.com/Expensify/App/assets/113963320/6dabf6ea-ab6b-499d-9f7f-1ab020750fc7

MacOS: Chrome / Safari

https://github.com/Expensify/App/assets/113963320/a24b352c-35d2-4963-9672-086d85cf0ea4

MacOS: Desktop

https://github.com/Expensify/App/assets/113963320/ed55c037-aa93-409c-a4b2-1982ae2fb18d

@tienifr I think the onClose function is still there after we close the modal. We can make setOnCloseModal give back a function that clears the onClose. Then we can find this onClose by its reference and remove it.

@tienifr I've noticed a regression issue with shortcuts: CMD+K or CMD+J don't open the chat or shortcuts menu as they should and only work after switching chats. On the main branch it works as expected.

Reviewer Checklist

[ ] I have verified the author checklist is complete (all boxes are checked off).
[ ] I verified the correct issue is linked in the ### Fixed Issues section above
[ ] I verified testing steps are clear and they cover the changes made in this PR

[ ] I verified the steps for local testing are in the Tests section
[ ] I verified the steps for Staging and/or Production testing are in the QA steps section
[ ] I verified the steps cover any possible failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
[ ] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)

[ ] I checked that screenshots or videos are included for tests on all platforms
[ ] I included screenshots or videos for tests on all platforms
[ ] I verified tests pass on all platforms & I tested again on:

[ ] Android: Native
[ ] Android: mWeb Chrome
[ ] iOS: Native
[ ] iOS: mWeb Safari
[ ] MacOS: Chrome / Safari
[ ] MacOS: Desktop

[ ] If there are any errors in the console that are unrelated to this PR, I either fixed them (preferred) or linked to where I reported them in Slack
[ ] I verified proper code patterns were followed (see Reviewing the code)

[ ] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick).
[ ] I verified that the left part of a conditional rendering a React component is a boolean and NOT a string, e.g. myBool && <MyComponent />.
[ ] I verified that comments were added to code that is not self explanatory
[ ] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
[ ] I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
[ ] I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
[ ] I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is approved by marketing by adding the Waiting for Copy label for a copy review on the original GH to get the correct copy.
[ ] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
[ ] I verified the JSDocs style guidelines (in STYLE.md) were followed

[ ] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
[ ] I verified that this PR follows the guidelines as stated in the Review Guidelines
[ ] I verified other components that can be impacted by these changes have been tested, and I retested again (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar have been tested & I retested again)
[ ] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
[ ] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
[ ] If a new component is created I verified that:

[ ] A similar component doesn't exist in the codebase
[ ] All props are defined accurately and each prop has a /** comment above it */
[ ] The file is named correctly
[ ] The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
[ ] The only data being stored in the state is data necessary for rendering and nothing else
[ ] For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
[ ] Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
[ ] All JSX used for rendering exists in the render method
[ ] The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions

[ ] If any new file was added I verified that:

[ ] The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory

[ ] If a new CSS style is added I verified that:

[ ] A similar style doesn't already exist
[ ] The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)

[ ] If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
[ ] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[ ] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
[ ] If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
[ ] If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
[ ] If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
[ ] I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

Screenshots/Videos

Android: Native

Android: mWeb Chrome

iOS: Native

iOS: mWeb Safari

MacOS: Chrome / Safari

MacOS: Desktop

@pecanoro Uploaded videos for all mobile platforms. Let me know if we can test more modal use cases to ensure everything works properly.

:hand: This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

🚀 Deployed to staging by https://github.com/pecanoro in version: 1.4.2-0 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅

🚀 Deployed to production by https://github.com/luacmartins in version: 1.4.2-3 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅


Add Server.blockUntilShutdown()

Hello, I tried to solve this easy issue, any comments are  welcome.

@Charliocat Gentle ping. :wink:

Thanks, @Charliocat !


Powershell Support

Feature Suggestion
Feature description: I have been succesfully using ScottPlot a plotting library in Powershell (both 5 and 7) for quite some time, I don't know if you want to support this feature, anyway I have written a Powershell Quickstart sample.
Code example:
[1]
Add-Type -Path .\ScottPlot.dll

[double[]] $dataX = @( 1, 2, 3, 4, 5 )
[double[]] $dataY = @( 1, 4, 9, 16, 25 )
$plt = [ScottPlot.Plot]::new(400, 300)
[Void] $plt.AddScatter($dataX, $dataY)
[Void] $plt.SaveFig("$pwd\quickstart.png")

[2]
Add-Type -AssemblyName System.Windows.Forms
Add-Type -Path .\ScottPlot.dll
Add-Type -Path .\ScottPlot.WinForms.dll

#https://github.com/ScottPlot/ScottPlot/blob/main/src/ScottPlot4/ScottPlot.Sandbox/WinFormsApp/Form1.Designer.cs

#formsPlot1
$formsPlot1 = [ScottPlot.FormsPlot]::new()
$formsPlot1.Anchor = [System.Windows.Forms.AnchorStyles]::Bottom -bor [System.Windows.Forms.AnchorStyles]::Right -bor [System.Windows.Forms.AnchorStyles]::Top -bor [System.Windows.Forms.AnchorStyles]::Left
$formsPlot1.BackColor = [System.Drawing.Color]::Transparent
$formsPlot1.Location = [System.Drawing.Point]::new(0, 12)
$formsPlot1.Margin = [System.Windows.Forms.Padding]::new(4, 3, 4, 3)
$formsPlot1.Name = "formsPlot1"
$formsPlot1.Size = [System.Drawing.Size]::new(808, 405)
$formsPlot1.TabIndex = 0

#Form1
$Form1 = [System.Windows.Forms.Form]::new()
$Form1.AutoScaleDimensions = [System.Drawing.SizeF]::new(7, 15)
$Form1.AutoScaleMode = [System.Windows.Forms.AutoScaleMode]::Font
$Form1.ClientSize = [System.Drawing.Size]::new(808, 417)
$Form1.Controls.Add($formsPlot1)
$Form1.Name = "Form1"
$Form1.StartPosition = [System.Windows.Forms.FormStartPosition]::CenterScreen
$Form1.Text = "FormsPlot Sandbox"

#https://github.com/ScottPlot/ScottPlot/blob/main/src/ScottPlot4/ScottPlot.Sandbox/WinFormsApp/Form1.cs

[Void] $formsPlot1.Plot.AddScatter([ScottPlot.DataGen]::Consecutive(51), [ScottPlot.DataGen]::Sin(51))
[Void] $formsPlot1.Plot.AddSignal([ScottPlot.DataGen]::Cos(51))
[Void] $formsPlot1.Plot.AddVerticalLine(25)
[Void] $formsPlot1.Plot.AddText("test 123", 20, .5)
[Void] $formsPlot1.Plot.AddMarker(15, -.5, [ScottPlot.MarkerShape]::openCircle, 20)

[Void] $Form1.ShowDialog()

I'm rather impressed, I actually didn't know that powershell supported .NET interop.
@swharden I wonder if this issue should be moved to https://github.com/ScottPlot/ScottPlot.NET, as that's where the quickstarts live?
Also, as an aside @CarloToso, if you do ```ps1 in your markdown, you'll get powershell syntax highlighting. For example:
```ps1
[Void] $formsPlot1.Plot.AddScatter([ScottPlot.DataGen]::Consecutive(51), [ScottPlot.DataGen]::Sin(51))
[Void] $formsPlot1.Plot.AddSignal([ScottPlot.DataGen]::Cos(51))
[Void] $formsPlot1.Plot.AddVerticalLine(25)
[Void] $formsPlot1.Plot.AddText("test 123", 20, .5)
[Void] $formsPlot1.Plot.AddMarker(15, -.5, [ScottPlot.MarkerShape]::openCircle, 20)
[Void] $Form1.ShowDialog()
```
Yields:
[Void] $formsPlot1.Plot.AddScatter([ScottPlot.DataGen]::Consecutive(51), [ScottPlot.DataGen]::Sin(51))
[Void] $formsPlot1.Plot.AddSignal([ScottPlot.DataGen]::Cos(51))
[Void] $formsPlot1.Plot.AddVerticalLine(25)
[Void] $formsPlot1.Plot.AddText("test 123", 20, .5)
[Void] $formsPlot1.Plot.AddMarker(15, -.5, [ScottPlot.MarkerShape]::openCircle, 20)

[Void] $Form1.ShowDialog()

Thank you @bclehmann , I'll edit my markdown.

Hi @CarloToso,
I would love to add a quickstart for PowerShell users, but I'm struggling to get this working myself. I'm not a strong PowerShell user myself. Can you provide insight into what I'm doing wrong?
Step 1: Download latest ScottPlot NuGet package as scottplot.4.1.45.nupkg
Step 2: Rename scottplot.4.1.45.nupkg to scottplot.4.1.45.nupkg.zip and unzip
Step 3: Copy the .NET Standard 2.0 ScottPlot.dll into a new folder
Step 4: Open powershell in that folder
Step 5: Allow execution of unsigned code in this session only (Set-ExecutionPolicy)
Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope CurrentUser

Get-ExecutionPolicy -List

        Scope ExecutionPolicy
        ----- ---------------
MachinePolicy       Undefined
   UserPolicy       Undefined
      Process       Undefined
  CurrentUser    Unrestricted
 LocalMachine       AllSigned

Step 6: Unblock the ScottPlot DLL (Unblock-File)
Unblock-File -Path .\ScottPlot.dll

Step 7: Interact with ScottPlot
Add-Type -Path .\ScottPlot.dll

I get this error:
Add-Type : Could not load file or assembly 'file:///C:\Users\scott\Documents\temp\ps\ScottPlot.dll' or one of its
dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
At line:1 char:1
+ Add-Type -Path .\ScottPlot.dll
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Add-Type], FileLoadException
    + FullyQualifiedErrorId : System.IO.FileLoadException,Microsoft.PowerShell.Commands.AddTypeCommand

Am I going about this the wrong way?

Update: I think my issue related to not having the correct dependencies available (e.g., System.Drawing.Common) and also targeting .NET 6 where it seems PowerShell only supports lower versions of .NET Core at this time. I got this working by targeting .NET Framework using this sequence of events:
Step 1: Create a .NET 6 console app and add ScottPlot package
dotnet new console
dotnet add package scottplot

Step2: Modify csproj for multi-targeting. This requires disabling implicit usings and setting language verison to latest.
<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFrameworks>net6.0;net5.0;net48</TargetFrameworks>
    <ImplicitUsings>false</ImplicitUsings>
    <Nullable>enable</Nullable>
    <LangVersion>latest</LangVersion>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="scottplot" Version="4.1.45" />
  </ItemGroup>

</Project>

Step 3: Build the project to get the latest DLLs of everything we need
dotnet build

Step 4: Inside the .NET Framework 4.8 folder (next to ScottPlot.dll) make a powershell script myScript.ps1 containing:
Add-Type -Path .\ScottPlot.dll
[double[]] $dataX = @( 1, 2, 3, 4, 5 )
[double[]] $dataY = @( 1, 4, 9, 16, 25 )
$plt = [ScottPlot.Plot]::new(400, 300)
[Void] $plt.AddScatter($dataX, $dataY)
[Void] $plt.SaveFig("$pwd\quickstart.png")

Step 5: Run the script:
.\myScript.ps1

This seems pretty clunky 😅 Is there a better way to set this up?
I could add this to the list of quickstarts, but it had so many rough edges to get up and running I probably don't want to advertise it as a recommended way to use this library. If nothing else, people searching for the topic will find the code here.
If someone knows a simpler way to do all this, let me know and I can update the text (or add a real quickstart page) as needed 👍

FWIW I tried this using PowerShell Core (7.2.4) and I had no issues. I tried again on classic powershell (5.1.22000.653) and I ran into the same thing you did.
If we do add it to the quickstart it's probably worth noting that Powershell Core is the recommended way.

Powershell Core is the recommended way

Wow, this was so much easier! I guess Windows PowerShell really lags behind PowerShellCore when it comes to support for modern .NET code. Thanks for pointing this out!
PowerShell Quickstart
Step 1: Get PowerShell Core

Do not use Windows PowerShell
PowerShell Core can run on Windows, Linux, and MacOS
Download from https://github.com/PowerShell/PowerShell

Step 2: Build an empty .NET app using ScottPlot

dotnet new console
dotnet add package scottplot
dotnet build

Step 3: Create a PowerShell script

Enter the builder folder containing ScottPlot.dll
Create myScript.ps1 and copy the following contents into it
Run the script using PowerShell Core (not Windows PowerShell)

Add-Type -Path .\ScottPlot.dll
[double[]] $dataX = @( 1, 2, 3, 4, 5 )
[double[]] $dataY = @( 1, 4, 9, 16, 25 )
$plt = [ScottPlot.Plot]::new(400, 300)
[Void] $plt.AddScatter($dataX, $dataY)
[Void] $plt.SaveFig("$pwd\quickstart.png")

From what I understand each Powershell version is built from a different .NET version (Windows Powershell [5.x] targets the Net Framework 4.8; Powershell Core [7.x] targets Net Core 6.0). When I use Powershell 5 (legacy and quite bad) I use the net461 version of ScottPlot and it loads just fine, when use Powershell 7 (newer and updated) i use the netstandard2.0 version of ScottPlot. On Linux and MacOS System.Drawing.Common has been deprecated in net6.0 so you have to add this line of code to your script [System.AppContext]::SetSwitch("System.Drawing.EnableUnixSupport", $True)

It seems that the System.Drawing.EnableUnixSupport switch will be removed in net7
https://docs.microsoft.com/en-us/dotnet/core/compatibility/core-libraries/6.0/system-drawing-common-windows-only

Oof ☠
I've got to resume work to cut the System.Drawing.Common dependency out of this library! #1036, #1647
Hopefully I can set aside some time to get ScottPlot 5 up and running sooner than later.
Thanks again CarloToso for all the PowerShell info here!


Documentation missed the openDrawer() and closeDrawer() functions of DrawerLayoutAndroid

These two functions are working and useful for pulling out and closing the drawer as the name suggests. However, I was not able to find formal documentation of these two in the RN website. I suggest an update to the doc about these two functions.

@ACCTFORGH Can you send a pull request?

@satya164  sure will do.

@satya164  sure will do.


Multiple tracks playing on rekordbox

If multiple tracks are playing at the same time in Rekordbox it seems only one shows in Now playing, is there an obvious way to resolve this?

I looked at the code and it seems straight forward enough for me to read but I can't seem to open the sqlite dB to look at the behaviour to see if I can do something with it to add the multiple tracks.
I'm using sqlite dB browser how are you getting the master dB to open?

I looked at the code and it seems straight forward enough for me to read but I can't seem to open the sqlite dB to look at the behaviour to see if I can do something with it to add the multiple tracks.
I'm using sqlite dB browser how are you getting the master dB to open?

There's not really an obvious way since rekordbox only logs the start time of the track, and you'd need an end time logged to reliably log two tracks to the now playing overlay. Both could come up in the play history overlay though if each track was logged to the now playing overlay.
So you need to decrypt the database, you can find the key to do so if you dig around a bit. I don't really want to post that here as I don't think Pioneer would like that.

There's not really an obvious way since rekordbox only logs the start time of the track, and you'd need an end time logged to reliably log two tracks to the now playing overlay. Both could come up in the play history overlay though if each track was logged to the now playing overlay.
So you need to decrypt the database, you can find the key to do so if you dig around a bit. I don't really want to post that here as I don't think Pioneer would like that.

Ok so the logic is when a next track is logged the previous one goes into history?
I've found the dp but I don't seem to be able to use that in sqlite db browser cypher. Appreciate your statement :)

Ok so the logic is when a next track is logged the previous one goes into history?
I've found the dp but I don't seem to be able to use that in sqlite db browser cypher. Appreciate your statement :)

Yeah exactly, once a new track is seen, the current "Now Playing" tracks moves to the top of the "Previous" section.

Yeah exactly, once a new track is seen, the current "Now Playing" tracks moves to the top of the "Previous" section.

Tested it in anger tonight on a live stream, was pretty good, only issue was when I played 2 mixes of the same song at the same time (ish). It showed just the one track. I'm guessing this is a beatport link data issue.
Really want to get into the code but need that db access.

Tested it in anger tonight on a live stream, was pretty good, only issue was when I played 2 mixes of the same song at the same time (ish). It showed just the one track. I'm guessing this is a beatport link data issue.
Really want to get into the code but need that db access.

I don't think Beatport link data isn't the issue here. This happens because rekordbox writes to the history every minute, and we poll the db every 10 seconds. So if the tracks were played within 10 seconds of each other, we only catch the most recently logged track.
What overlay are you using? By pulling down the two most recently played tracks, we could still write tracks played within the db polling period to the play history overlay.

I don't think Beatport link data isn't the issue here. This happens because rekordbox writes to the history every minute, and we poll the db every 10 seconds. So if the tracks were played within 10 seconds of each other, we only catch the most recently logged track.
What overlay are you using? By pulling down the two most recently played tracks, we could still write tracks played within the db polling period to the play history overlay.

Ah interesting. I might have 3 tracks playing at the same time for 3 minutes.
Streaming through OBS / Stream Elements.

Ah interesting. I might have 3 tracks playing at the same time for 3 minutes.
Streaming through OBS / Stream Elements.

Ah in that case I can grab the three most recently played tracks and they'd get logged to the play history overlay. Ideally I could see that the tracks are playing before the minute mark, but tbd if I can find a way to do this.

Ah in that case I can grab the three most recently played tracks and they'd get logged to the play history overlay. Ideally I could see that the tracks are playing before the minute mark, but tbd if I can find a way to do this.

hey erik, good job on the app. I've been using lepopal's version and yours has the upper hagnd because of the ability to bring the previous track as well.
Question for you
1- is it possible to get the output as a .txt rather than an html premade format?
2- for the comment about the 10s fetch, you can check popal's code, he allows the user to select the frequency at which the data is fetched. I set mine to 60-120s depending on how fast i mix.
Once again, great job.
frank

Thanks!

For sure, so you just want the history as a txt file?
Yeah I'm planning to add this feature, particularly for Serato users not using the live playlist feature because Serato writes to the history immediately. I assume you're on rb6? since rb6 doesn't write to history until 60s after a track has played out, you should be at ~70s before a track is logged to the history, is this what you're looking for?

1- yes, just so that I can have an alternative option to post the last X songs. I'm not sure how many you could fetch in a .txt from the history bank
2- Yes i'm RB6. It's roughly 45-60s (and kuvo about 30 it's faster) but that also means if you cue a loop early on, it'll change the current track right away! I usually use 120s because i know on average i start to cue 2 minutes before so it's just so that people with different mixing workflows can adapt it to their needs.
Cheers!

Is there any way to get the exact tracks that are actually playing rb?

@thegamecat Yeah I'm planning to incorporate this work so you'd get real-time updates out of rekordbox on Windows 64-bit.  I was told it wasn't possible in rekordbox if you manage.... omg!!!!!!!!!!

@thegamecat Yeah I'm planning to incorporate this work so you'd get real-time updates out of rekordbox on Windows 64-bit. Are you on Windows 64-bit?

I checked it out, i'm just a bit nervous trying it out. the whole project is only 23kb, doesn't it seem small? Don't want to risk it before someone can vet the code, I'm not a dev.

@frank01wong It's small because it hooks directly into rekordbox and injects some code that will output the track data in real-time. I've been working with the author directly and can confirm that the author has put in a lot of work to make this work as intended, and knows his stuff. I've tested the code as well and it works as intended, I'll be adding two new modes to unbox that use this work very soon.

ok fantastic ill be giving it a try, thanks a lot for the reply erik!

it is amazing indeed!

i can't get that windows hook to work? How does it launch rekordbox? There's no exe file in the download?

@fivefortyfour i've integrated unreal dan's work with the latest release, hope y'all like it!


Icon Refactor: Docs Updates

Jira
N/A
Summary
Docs-site and demo-specific updates related to the Icon component work in #1602.
Details
Note: without the other component-specific and build-process specific updates, these docs updates won't work (or pass the build) since current schema validation results prevent custom SVG icons that are not part of the Icon component's schema to get used (the upstream work changes that).
How to test
Check out the updated Docs here since this PR's deployed code will be broken until the schema changes are merged in.

@sghoweri Is there a particular use case for background="outline", this is inconsistent with circle and square, which are shapes. outline is always a circle, and there's actually no background color. If there's no use case, I would like to eliminate it.

@danielamorse, as discussed with @mikemai2awesome, we're going to disable the new outline option for the time being till we iron out some of the details (separate boolean prop vs being part of the other background options, what we can do to avoid having collisions between different props, etc)

@mikemai2awesome outline option disabled with this commit: https://github.com/boltdesignsystem/bolt/pull/1602/commits/088d2f29db6d7d109eb6ac2119bb64c66f922e19


Simplifiications to Proguard config

Removed some unnecessary Proguard rules:

dontwarn android.support rule is default on Android proguard-android.txt platform file, no need to add it again (and with migration to AndroidX I don't think is relevant for us anyway).
AndroidControllers rule is not needed after removing reflection code
AndroidInput rule is not needed either (legacy reflection), actually that class is now an Interface, the old one was renamed to DefaultAndroidInput.

AndroidControllers is instantiated with ClassReflection.forName. I know that Proguard can identify some reflections like this, but did you make sure it does in this case?

AndroidControllers is instantiated with ClassReflection.forName. I know that Proguard can identify some reflections like this, but did you make sure it does in this case?

Good point, I see it's used on gdx-controllers (I've searched for Class.forName references only). As you say, Class.forName calls are handled automatically by ProGuard without the need of a rule but I'm not sure if ProGuard/R8 is able to infer it when it's passed to the utility class. Will have a look.

Yep, here is the code
https://github.com/libgdx/libgdx/blob/8d514ce74e46af80641dc70c2a37f2cfb800ed6b/extensions/gdx-controllers/gdx-controllers/src/com/badlogic/gdx/controllers/Controllers.java#L83

Unfortunately R8 is not able to deal with this case and the rule is needed. I've reverted the change and added some comments.
There is a separate discussion to be had if we can improve extensions current dependency management not to have to use reflection to instantiate backend especific code. There is a circular dependency between extensions core modules and the extension backends which leads to this particular need.

I'm not sure this is the best place to bring this up, but isn't this proguard rule file woefully insufficient to enable obfuscation for many parts of libgdx?
I see nothing in here which would allow Scene2d/particles/serialization based loaders to work with the obfuscated results.

It should be enough, yes, Proguard is a bit smart and handles basic reflection, these rules haven been used for a long time and have passed the test of time. Scene2D and particles (2d at least) work without issues. I don't use libGDX serialization but for any serialization framework you use, at least you'd need to add a rule for the classes you serialize but that's up to each project. That doesn't mean there can't be an uncommon functionality that requires a missing rule that we haven't noticed yet.


fix: add ionic as a dev dependency

This should fix issue https://issues.jboss.org/browse/INTLY-3619

@jhellar this change should fix the issue.


add array zip method, docs, tests

Ref: #4

Just a suggestion, you can simplify the branch logic (ie remove the ternaries) by giving predicate a default value.
function zip (array1, array2, predicate=(a,b)=>[a,b]) {

Good call, much cleaner

LGTM, is there anything you want to add before I add this?

Nope, all good here


Performance Test: Smarter Brain

Smarter brain will use the basic's brain implementation along with other machine learning techniques to make sure that it can take better decisions in battle.


More gentle cards in home page

Is your feature request related to a problem? Please describe.
This is not a problem in code but it is for the visitor's eyes, and feel of the website.
Describe the solution you'd like
Current cards design that we have is similar to examples on w3Schools website, what we need is something that looks closer to bootstrap or materialUI that have shadows and color hierarchy.
Additional context
Current design

Use these for reference
Material-UI
Material.io

Actually I am working on rest content for landing page.
The card looks bit common, if you want you can modify it. Give some aesthetic look
I am building up rest content for landing page.
Go Ahead @AbhinavReddy-Dev

Awesome, what fonts are we using for headings?

hi everyone! can I participate?

@imabp I'll try to make a PR today and also I have raised an issue on clad, could you please check it?

@imabp are you working on alignment and sizing assets for home page? I see there is an absent uniform sizing for the technologies images (section above footer).

yaa actually i am working on that.. i just pushed it. so that .. we dont loose community engagement. It will take bit time... Thanks bro.. for this..

Cool bro, I am working on the cards, Material UI feels more like Styled components with extra work but saves us from the burden of making it responsive.

Go Ahead I have already assigned you this 😊 @AbhinavReddy-Dev


charmcraft: init at 2.6.0

Description of changes
Follow on from #295646 to add the craft build tools to NixOS.
Things done

Built on platform(s)

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

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[x] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[x] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)

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

[x] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

@SuperSandro2000 thank you! Comments addressed!

@SuperSandro2000 I also snuck in an extra commit to remove the nix-update-script from pydantic-yaml-0, as I keep getting automated PRs to update it beyond version 0: https://github.com/NixOS/nixpkgs/pull/303678#event-12453183224

@drupol I think the tests problem is fixed :)

@drupol thank you! much appreciated! :rocket:

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/corporate-adoption-list/47578/1


Duplicate references with different code coverage results

Bug Report
I love the short code coverage report with every little bit of information that we need.
However when I get the results they make no sense.  I seem to have the same namespace listed more than once and have different coverage results.  It's as though it isn't combining the multiple coverage reports properly.
Workflow File
- name: ReportGenerator
        uses<EMAIL_ADDRESS>        with:
          filename: src/**/TestResults/*/coverage.cobertura.xml
          badge: true
          format: markdown
          indicators: true
          output: both

Actions Log
I couldn't easily seperate this - private repo.

Expected Behavior
A clear and concise description of what you expected to happen.
I would expect to see just 1 line for each namespace and 1 line for each class
Currently I get this list repeated several times.

Figure: Amazon.Client listed at least 3 times (Blurred for privacy)
Additional Context
Add any other context about the problem here.
Linked To
List any issues linked to this bug.

@leahy268 - I had the same issue. Reason for the duplicates was that I had like 2 unittest projects, they referenced a shared library which was used in both test-projects. so It generated multiple coverage.cobertura.xml files.
I use dotnet-coverage (https://learn.microsoft.com/en-us/dotnet/core/additional-tools/dotnet-coverage) and merge the results before I create the report, see here the actions
      - name: Merge coverage reports
        run: |
          dotnet tool install --global dotnet-coverage
          cd testresults
          dotnet-coverage merge -o coverage-merged.xml -f cobertura -r coverage.cobertura.xml

      - name: Code Coverage Summary Report
        uses<EMAIL_ADDRESS>        with:
          filename: ./testresults/coverage-merged.xml
          format: markdown
          output: both

@LMSSonos thanks for your comment - I had this exact same issue, and using dotnet-coverage to merge the raw data before passing to CodeCoverageSummary fixed the issue perfectly.
Maybe this could be added to the documentation, at least until de-duplication can be built into CCS itself?


docker image version

thank you for this repo :)
is it my misunderstanding or is https://hub.docker.com/r/alexliesenfeld/httpmock/tags not up to date?

@alexliesenfeld thanks :)


SWN-Revised: v2.1.0

@Solarswordsman This version now seems to be live, yet sheet workers aren't doing anything, despite the fact that they work just fine when I copy the code into a test game. Also, I have updated the translations with this, but the individual translations were not updated (for any sheet). Something is wrong, could you look into it?

@jacksty @wing-it for good measure.

@joesinghaus I'm looking into it now.  From a cursory glance it looks like it's hitting a snag on MAXIMUM_HIT_POINTS:
Translation Error: the key [MAXIMUM_HIT_POINTS] is not in the translation object.
Likely this is killing the processing of the sheet workers and causing them to fail.  Interestingly, MAXIMUM_HIT_POINTS is definitely defined as a valid translation in all the languages.
Perhaps there is a bug in a sheet worker (possibly on our end, that would require a workaround at least for now?) processing the translation key.  I'll look into it deeper.  If you have some insight (e.g. a function that uses this key) it might help.

It is not defined, since it seems you forgot to update the individual translation files this time around. That's probably the problem then?

You are absolutely right.  I updated the translation files, but I missed the rather important step of pushing it to the repository.  My mistake!  I will get this sorted out ASAP.  Sorry!
And thank you for reporting this!
-Jeff

Thanks for responding so quickly and resolving the issue!
Jakob


facing issue in running docker

Dear Sir,
File "uvloop/loop.pyx", line 1994, in uvloop.loop.Loop.create_connection
app_1  | ConnectionRefusedError: [Errno 111] Connection refused
app_1  |
app_1  | ERROR:    Application startup failed. Exiting.
app_1  | INFO:     Started server process [1]
app_1  | INFO:     Waiting for application startup.
app_1  | ERROR:    Traceback (most recent call last):
app_1  |   File "/usr/local/lib/python3.9/site-packages/starlette/routing.py", line 526, in lifespan
app_1  |     async for item in self.lifespan_context(app):
app_1  |   File "/usr/local/lib/python3.9/site-packages/starlette/routing.py", line 467, in default_lifespan
app_1  |     await self.startup()
app_1  |   File "/usr/local/lib/python3.9/site-packages/starlette/routing.py", line 502, in startup
app_1  |     await handler()
app_1  |   File "./examples/main.py", line 34, in startup
app_1  |     redis = await aioredis.create_redis_pool("redis://localhost", encoding="utf8")
app_1  |   File "/usr/local/lib/python3.9/site-packages/aioredis/commands/init.py", line 188, in create_redis_pool
app_1  |     pool = await create_pool(address, db=db,
app_1  |   File "/usr/local/lib/python3.9/site-packages/aioredis/pool.py", line 58, in create_pool
app_1  |     await pool._fill_free(override_min=False)
app_1  |   File "/usr/local/lib/python3.9/site-packages/aioredis/pool.py", line 383, in _fill_free
app_1  |     conn = await self._create_new_connection(self._address)
app_1  |   File "/usr/local/lib/python3.9/site-packages/aioredis/connection.py", line 111, in create_connection
app_1  |     reader, writer = await asyncio.wait_for(open_connection(
app_1  |   File "/usr/local/lib/python3.9/asyncio/tasks.py", line 442, in wait_for
app_1  |     return await fut
app_1  |   File "/usr/local/lib/python3.9/site-packages/aioredis/stream.py", line 23, in open_connection
app_1  |     transport, _ = await get_event_loop().create_connection(
app_1  |   File "uvloop/loop.pyx", line 2017, in create_connection
app_1  |   File "uvloop/loop.pyx", line 1994, in uvloop.loop.Loop.create_connection
app_1  | ConnectionRefusedError: [Errno 111] Connection refused
app_1  |
app_1  | ERROR:    Application startup failed. Exiting.
fastapi-admin_app_1 exited with code 0
(testpy3.9) iibadmin@iibadmin-uat-ubuntu:~/Python-3.9.1/fastapi-admin$ sudo docker-comp

What's the version?

Dear Sir,
Its ubuntu18.04 bionic
kindly help please
On Sat, May 1, 2021 at 9:47 PM long2ice @.***> wrote:

What's the version?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/fastapi-admin/fastapi-admin/issues/44#issuecomment-830656553,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AEGAGU5STIG2M7HCS7IPN2DTLQSQHANCNFSM436L766Q
.

Sorry, I mean fastapi-admin version, but the error is can not connect to redis

Dear Sir,
I took latest https://pypi.org/project/fastapi-admin/
and tried running pip install fastapi-admin
Collecting pypika-tortoise<0.2.0,>=0.1.0
Using cached pypika_tortoise-0.1.0-py3-none-any.whl (42 kB)
Collecting iso8601<0.2.0,>=0.1.13
Using cached iso8601-0.1.14-py2.py3-none-any.whl (9.5 kB)
Collecting pytz<2021.0,>=2020.4
Using cached pytz-2020.5-py2.py3-none-any.whl (510 kB)
Collecting pycparser
Using cached pycparser-2.20-py2.py3-none-any.whl (112 kB)
Installing collected packages: starlette, typing-extensions, pydantic,
fastapi, wcwidth, prompt-toolkit, python-dotenv, six, pycparser, cffi,
bcrypt, PyMySQL, aiomysql, aiosqlite, python-rapidjson, h11, click,
uvicorn, MarkupSafe, jinja2, passlib, colorama, xlsxwriter,
pypika-tortoise, iso8601, pytz, tortoise-orm, pyjwt, fastapi-admin
ERROR: After October 2020 you may experience errors when installing or
updating packages. This is because pip will change the way that it resolves
dependency conflicts.
We recommend you use --use-feature=2020-resolver to test your packages with
the new resolver before it becomes the default.
tortoise-orm 0.17.2 requires aiosqlite<0.17.0,>=0.16.0, but you'll have
aiosqlite 0.17.0 which is incompatible.
Successfully installed MarkupSafe-1.1.1 PyMySQL-0.9.3 aiomysql-0.0.21
aiosqlite-0.17.0 bcrypt-3.2.0 cffi-1.14.5 click-7.1.2 colorama-0.4.4
fastapi-0.63.0 fastapi-admin-0.3.3 h11-0.12.0 iso8601-0.1.14 jinja2-2.11.3
passlib-1.7.4 prompt-toolkit-3.0.18 pycparser-2.20 pydantic-1.8.1
pyjwt-2.1.0 pypika-tortoise-0.1.0 python-dotenv-0.17.1 python-rapidjson-1.0
pytz-2020.5 six-1.15.0 starlette-0.13.6 tortoise-orm-0.17.2
typing-extensions-<IP_ADDRESS> uvicorn-0.13.4 wcwidth-0.2.5 xlsxwriter-1.4.0
WARNING: You are using pip version 20.2.3; however, version 21.1.1 is
available.
You should consider upgrading via the
'/home/iibadmin/srik/mayprojects/fastadminenv/bin/python3.9 -m pip install
--upgrade pip' command.
(fastadminenv) @.***:~/srik/mayprojects$
Please help in resolution
Thanks
On Sun, May 2, 2021 at 5:44 AM long2ice @.***> wrote:

Sorry, I mean fastapi-admin version, but the error is can not connect to
redis
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/fastapi-admin/fastapi-admin/issues/44#issuecomment-830713544,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AEGAGU6JKKKWNLKT6OYQPQTTLSKPTANCNFSM436L766Q
.

pypi is not latest, you can try install from source code

Dear Sir
Can you please give link of source tar zip file
And after installing the command to run fastapiadnin
Thanks a lot for your prompt replies
Regards
Srikanth
On Sunday, May 2, 2021, long2ice @.***> wrote:

pypi is not latest, you can try install from source code
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/fastapi-admin/fastapi-admin/issues/44#issuecomment-830738562,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AEGAGU6HA7IJPFWO5JJRV63TLTJBVANCNFSM436L766Q
.

use git clone

Ok sir
I did git clone only
So you mean instead of pip try install source
Ok I will do
How to run after installing
Please give command
On Sunday, May 2, 2021, long2ice @.***> wrote:

use git clone
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/fastapi-admin/fastapi-admin/issues/44#issuecomment-830740517,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AEGAGU6IGAET4CIST5WQFULTLTLARANCNFSM436L766Q
.

You can see documation there

Ok sure
Thanks
Will refer documentation
On Sunday, May 2, 2021, long2ice @.***> wrote:

You can see documation there
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/fastapi-admin/fastapi-admin/issues/44#issuecomment-830742131,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AEGAGU3WZQZR4233IPLNUILTLTNMBANCNFSM436L766Q
.

Dear Sir,
I referred documentation  built from  source
File "uvloop/loop.pyx", line 1994, in uvloop.loop.Loop.create_connection
app_1  | ConnectionRefusedError: [Errno 111] Connection refused
app_1  |
app_1  | ERROR:    Application startup failed. Exiting.
app_1  | INFO:     Started server process [1]
app_1  | INFO:     Waiting for application startup.
app_1  | ERROR:    Traceback (most recent call last):
app_1  |   File
"/usr/local/lib/python3.9/site-packages/starlette/routing.py", line 526, in
lifespan
app_1  |     async for item in self.lifespan_context(app):
app_1  |   File
"/usr/local/lib/python3.9/site-packages/starlette/routing.py", line 467, in
default_lifespan
app_1  |     await self.startup()
app_1  |   File
"/usr/local/lib/python3.9/site-packages/starlette/routing.py", line 502, in
startup
app_1  |     await handler()
app_1  |   File "./examples/main.py", line 34, in startup
app_1  |     redis = await aioredis.create_redis_pool("redis://localhost",
encoding="utf8")
app_1  |   File
"/usr/local/lib/python3.9/site-packages/aioredis/commands/init.py",
line 188, in create_redis_pool
app_1  |     pool = await create_pool(address, db=db,
app_1  |   File "/usr/local/lib/python3.9/site-packages/aioredis/pool.py",
line 58, in create_pool
app_1  |     await pool._fill_free(override_min=False)
app_1  |   File "/usr/local/lib/python3.9/site-packages/aioredis/pool.py",
line 383, in _fill_free
app_1  |     conn = await self._create_new_connection(self.address)
app_1  |   File
"/usr/local/lib/python3.9/site-packages/aioredis/connection.py", line 111,
in create_connection
app_1  |     reader, writer = await asyncio.wait_for(open_connection(
app_1  |   File "/usr/local/lib/python3.9/asyncio/tasks.py", line 442, in
wait_for
app_1  |     return await fut
app_1  |   File
"/usr/local/lib/python3.9/site-packages/aioredis/stream.py", line 23, in
open_connection
app
1  |     transport, _ = await get_event_loop().create_connection(app_1  |
File "uvloop/loop.pyx", line 2017, in create_connectionapp_1  |   File
"uvloop/loop.pyx", line 1994, in uvloop.loop.Loop.create_connectionapp_1  |
ConnectionRefusedError: [Errno 111] Connection refusedapp_1  | app_1  |
ERROR:    Application startup failed. Exiting.fastapi-admin_app_1 exited
with code 0(fastadminenv)
@.*:~/srik/mayprojects/fastadminenv/fastapi-admin$
~
*kindly help  hwo  to resolve *
On Sun, May 2, 2021 at 10:51 AM Srikanth Pokkuluri @.***>
wrote:

Ok sure
Thanks
Will refer documentation
On Sunday, May 2, 2021, long2ice @.***> wrote:

You can see documation there
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/fastapi-admin/fastapi-admin/issues/44#issuecomment-830742131,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AEGAGU3WZQZR4233IPLNUILTLTNMBANCNFSM436L766Q
.

Current is hard code redis connection in example, you should update it


[WIP] Better interface mocking

Example of how interface should be mocked to prevent implicit requirements on concrete implementations.
See #11732

Thanks, but we just need to add a method_exists check really.

@GrahamCampbell you are unbelievable. Stop closing issues that are clearly too complicated for you to grasp.

I understand what you are saying that this is technically incorrect without the method on the interface. I understand that just fine, but, this is not the only place where this occurs, and Taylor intentionally missed out some methods.

Ah so if you make errors consistently it's okay?
If you require methods not in a contract don't typehint against the contract... It totally defeats the purpose of the contract. By closing these issues it cannot be discussed; there is no harm in leaving it open for more developers to chime in.
Basically what you are suggesting is that if Laravel requires me to implement an interface I should also go through the whole source code to see if there are any undocumented requirements on my implementation..

They've already been previously discussed, as you can imagine.

I'm also not stopping people from further discussion, it's just not a bug.

If they have been previously discussed how about linking to that discussion and documenting the decision somewhere?
I am really curious to hear arguments in favor of calling functions on objects without any valid motivation for assuming the function exists...
I am also really curious to hear arguments in favor of making your tests always pass because they are not really testing what they are supposed to...


Can you update it to support new google forms ?

I tried it, it just worked (but didn't know if it really works or not) so I created a new google form to try it, but it didn't recognize it, after comparing your form with my new one I realized google is using new forms.
Can you update it ?

Hello abc44,
Sorry for late reply.
Can you give me a link to a form that doesn't work?
Also make sure you only use basic questions.
cf readme file:

can handle only basic types: radio, select, checkbox, text, paragraph text

Thank you!

Hi @sebcagnon, I 'm having the same issue. Here is a new Google Form with simple questions https://docs.google.com/forms/d/e/1FAIpQLScf7iYx4QRf2210j164zgGcjLzrd0Fkfn1tSHdRIvgnWF2HQQ/viewform

Hi @sebcagnon, I'm having the same issue. Here is a new Google Form with simple questions https://docs.google.com/forms/d/e/1FAIpQLScf7iYx4QRf2210j164zgGcjLzrd0Fkfn1tSHdRIvgnWF2HQQ/viewform

Hey... I am having same problem here... My form link is:
https://docs.google.com/forms/d/e/1FAIpQLScoRbU7Y_L8Tu2ZcycXqoyG3gsk5w0kKybCKSecn-eYbeIpZw/viewform
Can you please help me with this part?
Thanks in advance

This is probably happening because
Before google forms used to have links of this kind.
https://docs.google.com/forms/d/1FAIpQLScoRbU7Y_L8Tu2ZcycXqoyG3gsk5w0kKybCKSecn-eYbeIpZw/viewform
Now they are in this form
ttps://docs.google.com/forms/d/e/1FAIpQLScoRbU7Y_L8Tu2ZcycXqoyG3gsk5w0kKybCKSecn-eYbeIpZw/viewform
Notice the extra parameter e/in the URL


fix: look for reports.h5 in both contents and outputs S3 paths

What new features does this PR implement?

some datasets only have the simulation results in files.biosimulations.dev/simulations/{run_id}/contents, others have it only in files.biosimulations.dev/simulations/{run_id}/outputs, some have reports.h5 in both locations.  simdata-api should be able to support both conventions.
renamed path for simdata-api from data.biosimulations.dev to simdata.api.biosimulations.dev for symmetry with other secondary services (e.g. combine-api).  Was temporarily named data.biosimulations.dev to reuse networking from hsds service which was recently replaced.
fixed root logger configuration in simdata-api so that INFO and above will be logged - we may revisit in the future after simdata-api becomes more mature.

What bugs does this PR fix?
simulation runs which stored their reports.h5 in 'outputs' subdirectory were not supported.
How have you tested this PR?
altered unit testing in simdata-api to verify simulation data support for both 'contents' and 'outputs' subdirectories.

:tada: This PR is included in version 9.55.3 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


charts render with black background in Javafx Webview

Chartjs charts render in black on Webview. This can be seen using the chartjs.org homepage as an example. Screenshot is attached. I have not seen this issue with other chart libraries, including d3js, but I would prefer to use chartjs.
I know this isn't a big priority, but I understand that is based on Webkit and is used on Android to some degree (so not entirely crazy).

Closing because I think this is a problem with the JavaFX WebView. I would recommend filing the issue there.
As an aside, I think the culprit is something to do with the canvas default CSS background color. In Chrome it is rgba(0, 0, 0, 0) but maybe this is different in the webview


[proposal][desktop] Tab character (\t) should be displayed as indentation in TextField

Tab Character \t should be displayed as indentation in EditableText, TextField and all implementations of Text widgets in Desktop
This is a common behaviour in many desktop applications
Flutter Channel: master
Platform: Desktop, Linux
Version: 2.1.0-11.0.pre.138
When Tab key is pressed while the TextField is focused, in a Flutter Desktop Application, by default, the focused TextField is unfocused and the focus shifts to another widget. That is a problem in my case as I want the user to be able to enter tab characters. But I partially solved it by using a RawKeyboardListener to detect when the user presses Tab key, and then inserted a \t to the TextField at the current cursor position through its controller.
The problem is that, the \t character is displayed as a small space, almost half as wide as whitespace, which is counterproductive.
There should be an option to configure how \t is displayed, as it can be of multiple number of spaces' width, and it should be customisable.
I believe this is not exactly a bug. For mobile devices, the Tab key is irrelevant. For web, pressing Tab key is helpful in shifting focus between UI elements.
But for desktop, it makes sense to have an option to customise how a Tab character is displayed in a TextField.
Suggestion
Add an option to disable focus shifting on Tab press on Desktop and add Tab character to the TextField. Provide a way to customise Tab character display, by equating it to a specific number of whitespaces that can be changed if required.

Yes this is definitely a proposal. Just tested on Slack MacOS app and Tab button move focus to another component.

Found a way to accomplish this:
But I agree that there should be two properties on EditableText and TextField called something like:
bool acceptTabs
int tabIndentation
And TextField or Editable text should handle wrapping in the Action/ Shortcuts widget.
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData.dark(),
      home: MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key, this.title}) : super(key: key);

  final String title;

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class InsertTabIntent extends Intent {
  const InsertTabIntent(this.numSpaces, this.textController);
  final int numSpaces;
  final TextEditingController textController;
}

class InsertTabAction extends Action {
  @override
  Object invoke(covariant Intent intent) {
    if (intent is InsertTabIntent) {
      final oldValue = intent.textController.value;
      final newComposing = TextRange.collapsed(oldValue.composing.start);
      final newSelection = TextSelection.collapsed(
          offset: oldValue.selection.start + intent.numSpaces);

      final newText = StringBuffer(oldValue.selection.isValid
          ? oldValue.selection.textBefore(oldValue.text)
          : oldValue.text);
      for (var i = 0; i < intent.numSpaces; i++) {
        newText.write(' ');
      }
      newText.write(oldValue.selection.isValid
          ? oldValue.selection.textAfter(oldValue.text)
          : '');
      intent.textController.value = intent.textController.value.copyWith(
        composing: newComposing,
        text: newText.toString(),
        selection: newSelection,
      );
    }
    return '';
  }
}

class _MyHomePageState extends State<MyHomePage> {
  TextEditingController textController;
  @override
  void initState() {
    super.initState();
    textController = TextEditingController();
  }

  @override
  void dispose() {
    textController.dispose();
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: Text(widget.title)),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            Actions(
              actions: {InsertTabIntent: InsertTabAction()},
              child: Shortcuts(
                shortcuts: {
                  LogicalKeySet(LogicalKeyboardKey.tab):
                      InsertTabIntent(2, textController)
                },
                child: TextField(
                  controller: textController,
                  textInputAction: TextInputAction.newline,
                  maxLines: 30,
                  keyboardType: TextInputType.multiline,
                ),
              ),
            ),
          ],
        ),
      ),
    );
  }
}

@TimWhiting @pedromassangocode
I tested the implementation by Tim Whiting and it works well. :+1:
However, I reviewed the code and found that it is adding the appropriate number of spaces whenever the user presses Tab key. I have already implemented this in the application that I am developing. Is there anyway that we can add the '\t' character in the text and make it look like multiple spaces? I mean, without replacing the tab with spaces?
In theory, we should be able to configure and customise the display of certain characters in the text field. Especially when we consider the possibility that desktop applications developed by flutter might not always be mere "applications", they might be complex enough to be called "software".
Use case
I want the user to be able to add the raw tab character (\t) to the text field. And I want to customise the display of the tab character to resemble the equivalent number of spaces chosen by the user.
I am developing a text/code editor. I think you get where I am going with this. If a user/programmer presses tab to indent their content/code, and if I write code to replace the indentation with actual whitespace, someone's definitely getting angry. I can easily provide them with an option to replace '\t' with spaces, but that shouldn't be the default behaviour in this case.

This is the modified code. This won't run as there is no property called indentSpaceCount for TextField.
import 'dart:io';

import 'package:flutter/material.dart';
import 'package:flutter/services.dart';

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData.dark(),
      home: MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key, this.title}) : super(key: key);

  final String title;

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class InsertTabIntent extends Intent {
  const InsertTabIntent(this.textController);
  final TextEditingController textController;
}

class InsertTabAction extends Action {
  @override
  Object invoke(covariant Intent intent) {
    if (intent is InsertTabIntent) {
      final oldValue = intent.textController.value;
      final newComposing = TextRange.collapsed(oldValue.composing.start);
      final newSelection = TextSelection.collapsed(
          offset: oldValue.selection.start + 1);

      final newText = StringBuffer(oldValue.selection.isValid
          ? oldValue.selection.textBefore(oldValue.text)
          : oldValue.text);
      newText.write('\t');
      newText.write(oldValue.selection.isValid
          ? oldValue.selection.textAfter(oldValue.text)
          : '');
      intent.textController.value = intent.textController.value.copyWith(
        composing: newComposing,
        text: newText.toString(),
        selection: newSelection,
      );
    }
    return '';
  }
}

class _MyHomePageState extends State<MyHomePage> {
  TextEditingController textController;
  @override
  void initState() {
    super.initState();
    textController = TextEditingController();
  }

  @override
  void dispose() {
    textController.dispose();
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: Text(widget.title)),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            Actions(
              actions: {InsertTabIntent: InsertTabAction()},
              child: Shortcuts(
                shortcuts: {
                  LogicalKeySet(LogicalKeyboardKey.tab):
                      InsertTabIntent(textController)
                },
                child: TextField(
                  controller: textController,
                  textInputAction: TextInputAction.newline,
                  maxLines: 30,
                  keyboardType: TextInputType.multiline,
                  indentSpaceCount: 4,
                ),
              ),
            ),
          ],
        ),
      ),
    );
  }
}

Yeah, I agree, the properties should be more like:

bool acceptTabs (with this property set to false which should be the default pressing tab should change focus)
int indentSpaceCount (this property controls the visual spacing of a literal \t,  default should probably be 4)
bool replaceTabsWithSpaces (this property controls whether to replace a literal \t with indentSpaceCount of spaces, default should be false) or there should be an InputFormatter provided by Flutter to do the same

As a design note, for accessibility there needs to be a way to unfocus the field that accepts tabs to a larger focus scope to allow moving to a different field. I believe this is typically done by the escape key, but I could be wrong.

@TimWhiting
Exactly, this model looks perfect. And yes, Escape key is usually the way to do it.

Thinking a bit more:
The indentSpaceCount should probably be in the TextStyle instead. Which can be specified application wide.
And replaceTabsWithSpaces should not be a property and users should use a TextInputFormatter instead to replace \t with whatever so that users can do anything (for example code editors should indent the start of the line the user pressed \t on, and not at the location they pressed it, same for bulleted lists).
So the TextInputFormatters that should be added would be:
IndentLineFormatter() --> replaces a \t anywhere in the line with a \t at the beginning of the line
ReplaceTabFormatter(int numSpaces) --> replaces a \t with numSpaces of plain spaces
Which could be chained to provide both.
Also I forgot in my implementation to add a Shift-tab which would need a
DedentLineFormatter(int numSpaces) --> replace a \t or numSpaces at the beginning of the line with ''
Edit:
But I guess this is where the TextInputFormatters break down, because any time it formats it will remove another \t or spaces until everything is dedented completely. So maybe the Shortcuts / Action framework is really the better fit for indentation. But we could still use TextInputFormatters to do the job to allow for flexibility for the user to change tabs to whatever they want. But instead of have them in the list of general TextInputFormatters, they should be two properties:

tabFormatter
shiftTabFormatter

or:

indentFormatter
dedentFormatter
tabFormatter (indentFormatter would be used if it is not null, otherwise tabFormatter would be used if it is not null)

I agree that there should be something like a tabWidth in the TextStyle, that controls how wide a tab is drawn when rendered, the units should probably be in multiples of the em space of the font. There should be a property on the text field that says whether it handles tabs or not.  Replacing tabs with spaces is probably something that should be done after the text is received by the app, since that's highly dependent on the use case (a rich text editor would want tab stops, a code editor might want to start at a particular initial indent before replacing tabs with spaces, etc.)
Note that if a text field handles tabs, then the app is no longer traversable via the keyboard, since as soon as a text field gets focus, it will not allow the focus to leave again when the user presses tab. This is bad for accessibility on all platforms (including mobile platforms), which is why the current implementation always interprets tabs as focus change events. @TimWhiting in your usage of the escape key to enable this, what is the behavior? Does it just jump to the next control? Does Shift-Esc do anything (like go to the previous control)?
We aspire to someday be able to allow people to easily write a code or rich text editor in Flutter, but we're definitely not there yet, and this is one of the areas where we're missing functionality.
I've thought before that there should also be some way to configure all of the text fields in a widget subtree based on the TextInputType of the field (and maybe allow defining user types for text fields), which would be useful in configuring more complex apps for things like this.
cc @HansMuller

@gspencergoog
I have implemented many major features required for a basic code editor in my application. The application can autosave files and create new files. it supports basic auto-completion. It starts with Dark Mode as the default colour scheme. It can generate a Syntax Tree for the code as the user types. Git support, Opening files within app and custom terminal commands is in the prototype phase, and custom file save is already implemented. I have even devised a logic to implement a custom file browser, since the default flutter package is not supported in all platforms. All of these features are using just Dart and Flutter. No other programming language is used. The app is in private development for now, and it will be released to the public once all major features are implemented and tested.
Handling of the Tab character is the only important thing that I find to be missing right now. If there already is a way to implement this using TextInputFormatter, that will be great. As far as I know, there isn't, but may be I haven't looked in the right place.
As of now, all I need is to control the display of the \t character. In theory, the TextInputFormatter should be able to handle it, as it seems like it was made for purposes like this.

@TimWhiting
Is there anyway to implement this without the use of a predefined Formatter? Does the TextInputFormatter support low-level customisation like that?

According to the TextInputFormatter docs: A TextInputFormatter can be optionally injected into an EditableText to provide as-you-type validation and formatting of the text being edited.
So it can format / allow characters / disallow characters, alter text (replace \t with two / four spaces). But it is not meant for controlling how characters are displayed. As @gspencergoog mentioned, visual tab width for display should probably be a property on TextStyle, but is not possible now. I suspect that will involve some engine work.

@TimWhiting
Oh ok then. Thanks for the helpful response. It seems like something like this won't be implemented in the flutter engine for a long time. So for now and the foreseeable future, Tab characters in the TextField in my application will look like half-spaces. That's really counterproductive. And unfortunate. At least, it will still be Tab characters when the user saves the file.

You might be able to create some sort of workaround for now without engine changes, but it will probably be more complex. I'm really not sure what is required to actually display tabs better, maybe the engine is not actually involved.

@TimWhiting
I had a brief look at:
https://pub.dev/packages/flutter_multi_formatter
and its Github Repository:
https://github.com/caseyryan/flutter_multi_formatter
But it seems to be a predefined static spacing between two characters and doesn't seem to be dynamic.

@AldrinMathew
Yeah formatters aren't what you are looking for:
@gspencergoog
I've implemented two approaches to the tab character / tab focus problem:
Approach 1: Escape to exit entering tabs into the textfield and move to next field. Shift escape to exit entering tabs and move to previous field
Approach 2: Tabs aren't automatically captured when textfield becomes focused until user presses enter, escape exits the tab entering mode but still has focus on the textfield, as a part of the regular tab order. (There is an 'outer' and 'inner' hierarchical focus, that you navigate using enter / escape).
2 seems like the better approach and feels more natural since you can tab right past the field without automatically getting captured. Also probably fits best with voice/accessibility interfaces. The shift-escape-tab solution feels awkward, but tabbing to the previous field is probably less used.
Here is the code:
https://github.com/TimWhiting/test_app
And the demo app on github pages: https://timwhiting.github.io/test_app/#/

@TimWhiting
I tested the Test App and the second implementation (Escape and Enter to exit and enter TabScopes) makes more sense. It is not much of hindrance to accessibility, and changes focus only when required and not automatically.

@TimWhiting
The current implementation in my code editor changes the focus every time the user presses Tab key and only refocuses on a second key press. Do I have the permission to use the implementation of Shortcuts & IndentationAction in your Test App in my application?

Yeah you have permission. It's meant to be a sample to help solve this issue and determine what the desired behaviour is. There might be better ways of doing it.

Another conflicting use-case of Tab in text fields is for tab auto-complete. It seems to me that this can be distinguished from a insert of a literal tab by first checking if there is a suggestion available and the selection is empty, if so, then the first suggestion should be applied. If there is no suggestion available or the selection is not empty than the tab should be taken as a literal tab.

I've created a design doc here: https://docs.google.com/document/d/1aHucsI0NWGWu2Dm_XFsBLxiTgJRM8h2XBB7PVAnVxlU/edit?usp=sharing&resourcekey=0-zLbXFlP_A2e_Yoi43vdiiw

Any news about this topic?

@TimWhiting The design doc looks like it's on the right track to me, are you still working on bringing it to Flutter?  Happy to help if needed.

@justinmc I was waiting for feedback on the design doc and for all of the changes around TextEditing / Shortcuts / Actions that were happening at the time, and since then I have had some other priorities. I'm busy with a bunch of stuff right now for my Master's Thesis, so would welcome any contribution or help you have to offer.

Sorry I thought I had already replied here.  I will see if I can get this in as part of my current text editing work.  Thanks for the great design doc and good luck on your thesis!


Epic: Improve linting coverage, fix Go Report Card validations

There are a number of validations run against submariner-io/submariner and reported on the main README as an icon. While we do have an A+, there are a number of failing tests. We should dig through the test results and clean them up.
https://goreportcard.com/report/github.com/submariner-io/submariner
Update: Also using this as an epic to track the subsequent addition of linters through golangci-lint.

Part of this is adding linting to prevent future volitions from slipping back in. Started on that in https://github.com/submariner-io/submariner/pull/698.

Related https://github.com/submariner-io/shipyard/pull/241

https://github.com/submariner-io/submariner/pulls?q=is%3Apr+label%3Acncf+
https://github.com/submariner-io/submariner-operator/pulls?q=is%3Apr+label%3Acncf+
https://github.com/submariner-io/admiral/pulls?q=is%3Apr+label%3Acncf+

I think I'm going to go ahead and call this epic "done". We've drastically improved our linting tooling and related CI. There's still some GHA refactoring ongoing, and some room for small improvements in lintig, but the goal of this Issue is done.


Describe required docker image in examples

This is needed for users trying examples at our platform or selecting Docker file to extend.

Added in https://github.com/apifytech/apify-js/commit/49b723b2179850ad11b345875ca0edc29a2043a7


Add curly braces to var name

Investigate whether the curly braces are the reason that the gsutil ls command failed.

/lgtm


Modifying README

Modified the README slightly - #4

@ajh11g Thanks for the PR. Looks like some fine additions. Keep contributing!