instance_id stringlengths 10 65 | repo stringlengths 5 59 | pr_number int64 1 313k | task_type stringclasses 1
value | base_commit stringlengths 40 40 | review_commit stringlengths 40 40 | title stringlengths 2 282 | body stringlengths 7 3k | patch stringlengths 202 204k | n_defects int64 1 72 | n_supported int64 1 65 | n_major int64 0 32 | defects stringlengths 140 18.8k | certifier_count int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
swagger-api__swagger-parser__1910 | swagger-api/swagger-parser | 1,910 | defect | 9b875f971fea7935473188e6f1f708c7d1cb29ff | d982f91cf3f3f9b05ab598d2693d83a5b8376e56 | Initial commit of safe url resolver | This PR adds a new module to the swagger parser repo: `swagger-parser-safe-url-resolver`
## What is it?
The main class of the package is the `PermittedUrlsChecker` which has one method: `verify(String url)`.
This method takes in a string URL and performs the following steps:
1. Gets the hostname portion from the ... | diff --git a/modules/swagger-parser-safe-url-resolver/pom.xml b/modules/swagger-parser-safe-url-resolver/pom.xml
new file mode 100644
index 0000000000..cf92ae8b79
--- /dev/null
+++ b/modules/swagger-parser-safe-url-resolver/pom.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.a... | 5 | 4 | 1 | [{"id": "G0", "claim": "Asks whether IDN.toASCII handles wildcard characters ok, noting its Javadoc allows IllegalArgumentException, and says to remove the wildcard handling if it proves problematic.", "category": "correctness", "verdict": "opposed", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The ... | null |
swagger-api__swagger-parser__2127 | swagger-api/swagger-parser | 2,127 | defect | 0ab2e8a7774b147e7b8c2c75b929089677d1b246 | ac4efc2077d8b969f9efef8d2a3cfbde30c9f316 | Enhancement/parser resolve responses flag | Due to unexpected results during parsing OAS with options - resolve and flatten set to true, we decided to create resolveResponses flag, from now responses will not be fully resolved by default with option resolve - true.
If anyone wants to keep previous behaviour needs to use option `setResolveResponses(true)` | diff --git a/modules/swagger-parser-core/src/main/java/io/swagger/v3/parser/core/models/ParseOptions.java b/modules/swagger-parser-core/src/main/java/io/swagger/v3/parser/core/models/ParseOptions.java
index adc2ddb308..60a587af3a 100644
--- a/modules/swagger-parser-core/src/main/java/io/swagger/v3/parser/core/models/Pa... | 2 | 2 | 1 | [{"id": "G0", "claim": "The comment added in OperationProcessor should be reworded to `// This part allows parser to put response inline when resolveResponses = true`.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The inline-response processing s... | null |
swagger-api__swagger-parser__555 | swagger-api/swagger-parser | 555 | defect | 94633e5f9567f1b748549c1e2d524b2658f9bd95 | 28cead0f6d53aeeff5573998bd4a023b09e560aa | Issue-35 Fixed | Fixed: https://github.com/swagger-api/swagger-spec-converter/issues/35 | diff --git a/modules/swagger-parser-v2-converter/src/main/java/io/swagger/parser/v2/SwaggerConverter.java b/modules/swagger-parser-v2-converter/src/main/java/io/swagger/parser/v2/SwaggerConverter.java
index ecbdbb71fc..a0e346ab66 100644
--- a/modules/swagger-parser-v2-converter/src/main/java/io/swagger/parser/v2/Swagge... | 2 | 2 | 2 | [{"id": "G0", "claim": "The x-nullable conversion should affect schemas/models in general, not only parameters.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Add a case to the test where one of the definitions has a property with x-nullable.", "cat... | null |
swagger-api__swagger-parser__556 | swagger-api/swagger-parser | 556 | defect | 1ed15c3e9adcffa4c695cb3a2049e6ff31c5d403 | a87d77860108e2a687bdafae589abf4dabf200c3 | Issue-15 Test added, Some fixes in Responses, Paths, Items extensions | Issue 15 Fixed.
Test added.
The Contact Extension in v2 is missing. TODO comment added. | diff --git a/modules/swagger-parser-v2-converter/src/main/java/io/swagger/parser/v2/SwaggerConverter.java b/modules/swagger-parser-v2-converter/src/main/java/io/swagger/parser/v2/SwaggerConverter.java
index f0ea484365..d8b6512b95 100644
--- a/modules/swagger-parser-v2-converter/src/main/java/io/swagger/parser/v2/Swagge... | 2 | 2 | 1 | [{"id": "G0", "claim": "Keep the TODO comment but remove the commented-out vendor-extension code block in the Contact converter.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "x-example, x-examples and x-nullable should not be moved as vendor ex... | null |
swagger-api__swagger-parser__578 | swagger-api/swagger-parser | 578 | defect | b5b19f21ebb5f768760f398fc537a110983a3e33 | b2333883926b7a27f39554ca7a97ec3a4b6944dc | Referring without components | According to how i interpret the spec the "components" object is not required. I wish it were! (Or at least default to an empty components object) I have had so some bugs where I assume components exists...
According to the deserializer it assumes it is required. (The `true` means it is required) https://github.com/... | diff --git a/modules/swagger-parser-v3/src/main/java/io/swagger/v3/parser/processors/ExternalRefProcessor.java b/modules/swagger-parser-v3/src/main/java/io/swagger/v3/parser/processors/ExternalRefProcessor.java
index b30f168487..3abb15ed72 100644
--- a/modules/swagger-parser-v3/src/main/java/io/swagger/v3/parser/proces... | 1 | 1 | 0 | [{"id": "G0", "claim": "Since the spec makes the components object optional, the deserializer should stop requiring the components tag (change \"true\" to \"false\") and the components object should be validated as not null in the places that might have been missed.", "category": "correctness", "verdict": "supported", ... | null |
swagger-api__swagger-parser__580 | swagger-api/swagger-parser | 580 | defect | bfe2c8020f97c2b5d72a3c74867183bd881ce0b8 | a912130552bf3b005374afaea3ddc00089566259 | Fix to SwaggerCompatConverter so it can load inputSpec from classpath. | Swagger20Parser already can load input spec from classpath, but codegen project loads extensions one them is SwaggerCompatConverter and it fails loading from classpath
This fixes https://github.com/swagger-api/swagger-codegen/issues/2666 | diff --git a/modules/swagger-compat-spec-parser/src/main/java/io/swagger/parser/SwaggerCompatConverter.java b/modules/swagger-compat-spec-parser/src/main/java/io/swagger/parser/SwaggerCompatConverter.java
index 9f652541a6..f426da7430 100644
--- a/modules/swagger-compat-spec-parser/src/main/java/io/swagger/parser/Swagge... | 5 | 1 | 1 | [{"id": "G0", "claim": "Add a test to the pull request for the new classpath/file loading behavior.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The local string \"file:\" should be declared as a constant rather than a method-local variable.", "catego... | null |
swagger-api__swagger-parser__605 | swagger-api/swagger-parser | 605 | defect | 0703301bf5ba14ce443310d79f8217e447046ba5 | 77da92efe1f542ba684b93e8e3ff6181450c3c9c | Schema with Additional properties was not solving remote refs #342 #423 | fixing bug when parser trying to solve remote ref in additional properties schema issue #342 | diff --git a/modules/swagger-parser-v3/src/main/java/io/swagger/v3/parser/processors/ExternalRefProcessor.java b/modules/swagger-parser-v3/src/main/java/io/swagger/v3/parser/processors/ExternalRefProcessor.java
index 8f9edfd323..e742e964d5 100644
--- a/modules/swagger-parser-v3/src/main/java/io/swagger/v3/parser/proces... | 1 | 1 | 1 | [{"id": "G0", "claim": "getItems() may return null and is dereferenced without a null check in the new additionalProperties handling (both the ArraySchema branch and the nested map additionalProperties branch), risking a NullPointerException.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope... | null |
swagger-api__swagger-parser__612 | swagger-api/swagger-parser | 612 | defect | 5bd6721a7334a90a6e9834311fb67d3d2b1f92d1 | 09d4809bca5dd8f892cf132a3b2e04694ed7b290 | Supporting change in additionalProperties Boolean and Schema | refs swagger-api/swagger-core#2461
#499 and fixing refs in additionalProperties Resolving RefExternalResolver #342 (in v3) | diff --git a/modules/swagger-parser-v2-converter/pom.xml b/modules/swagger-parser-v2-converter/pom.xml
index ce3eab30d1..a0d8a2e43e 100644
--- a/modules/swagger-parser-v2-converter/pom.xml
+++ b/modules/swagger-parser-v2-converter/pom.xml
@@ -32,6 +32,11 @@
<artifactId>swagger-parser-core</artifactId>
... | 2 | 2 | 1 | [{"id": "G0", "claim": "The `items` variable is created only for assignment, so it should be deleted and `model.setItems((Schema) object.getAdditionalProperties())` set directly.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "A test with additio... | null |
swagger-api__swagger-parser__636 | swagger-api/swagger-parser | 636 | defect | 7d9098f021819d7e43444fe20773ebd781b1d17a | 3c6f2e667376a418d60c83074b86719902e29d95 | Avoid overflow when storing an int64 in an Integer | In int64example.yaml the example value comes out as -81224344 in an Integer.
Maybe there is a better way of checking for int64 examples, but this seems to do the job at least. I'm happy to change if there is some obvious better way this should be done in. :) | diff --git a/modules/swagger-parser-v3/src/main/java/io/swagger/v3/parser/util/OpenAPIDeserializer.java b/modules/swagger-parser-v3/src/main/java/io/swagger/v3/parser/util/OpenAPIDeserializer.java
index 98e4d0d2db..e1061b5867 100644
--- a/modules/swagger-parser-v3/src/main/java/io/swagger/v3/parser/util/OpenAPIDeserial... | 1 | 1 | 1 | [{"id": "G0", "claim": "The int64 overflow validation should be done in getInteger() by checking that the number is an integer (v.isInt()) and returning null otherwise, so all integers are validated there, rather than by a format-string check in getAnyExample().", "category": "correctness", "verdict": "supported", "pri... | null |
swagger-api__swagger-parser__806 | swagger-api/swagger-parser | 806 | defect | 7c80d15ac80814c426d301204f2e696af44df01e | 288c8e6e641e5356f8082450be55065f7552214e | fix relative ref with http ref bug | This patch fixes https://github.com/swagger-api/swagger-parser/issues/805. | diff --git a/modules/swagger-parser-v3/src/main/java/io/swagger/v3/parser/processors/ExternalRefProcessor.java b/modules/swagger-parser-v3/src/main/java/io/swagger/v3/parser/processors/ExternalRefProcessor.java
index b5de807d3e..12c7d25345 100644
--- a/modules/swagger-parser-v3/src/main/java/io/swagger/v3/parser/proces... | 2 | 2 | 2 | [{"id": "G0", "claim": "The new unit test requires a real server call to https://raw.githubusercontent.com/ and should be mocked in the unit tests (e.g. with @Mocked RemoteUrl and Expectations).", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Asks whethe... | null |
swagger-api__swagger-parser__852 | swagger-api/swagger-parser | 852 | defect | 911d01893a150d61c49fd44ea2a331e446f42f8e | a989c2aa9c7f5cca3a9c7c3311ac350b25c83124 | Fix NullPointerException when resolving an ApiResponse with no content | This PR fixes a NullPointerException which occurs when an `ApiResponse` is read from an external reference which does not have any content defined. | diff --git a/modules/swagger-parser-v3/src/main/java/io/swagger/v3/parser/ResolverCache.java b/modules/swagger-parser-v3/src/main/java/io/swagger/v3/parser/ResolverCache.java
index a78538d3f9..2d9aeb5f27 100644
--- a/modules/swagger-parser-v3/src/main/java/io/swagger/v3/parser/ResolverCache.java
+++ b/modules/swagger-p... | 1 | 1 | 1 | [{"id": "G0", "claim": "The pull request's fix (guarding against an ApiResponse with no content) has no test; add a test so it can be merged.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
swagger-api__swagger-parser__967 | swagger-api/swagger-parser | 967 | defect | 6b8215b884ab9ef2ac2a5293b8fa7217c60fbdd2 | 14e9c90e2021e5f14ad5514aaaffcab215c1f0b8 | Ensure the body parameter name is preserved | For https://github.com/swagger-api/swagger-parser/issues/966
Related: https://github.com/swagger-api/swagger-parser/issues/748 | diff --git a/modules/swagger-parser-v2-converter/src/main/java/io/swagger/v3/parser/converter/SwaggerConverter.java b/modules/swagger-parser-v2-converter/src/main/java/io/swagger/v3/parser/converter/SwaggerConverter.java
index 0a47ca639c..5ac515f4a6 100644
--- a/modules/swagger-parser-v2-converter/src/main/java/io/swag... | 1 | 1 | 1 | [{"id": "G0", "claim": "Instead of adding the x-codegen-request-body-name vendor extension, the converter should set the request body's title to the parameter name (setTitle(param.getName())), since the name field's intent appears to have been replaced by the built-in title infrastructure and the extension duplicates i... | null |
swagger-api__swagger-ui__10247 | swagger-api/swagger-ui | 10,247 | defect | 5bf8e57e1be9a6992888b3db4c8fa27a44ea4e4d | 4e808a23517c7b7cdb84b312a18e91284bc76b04 | fix: adds version 3.0.4 and 3.1.1 to supported versions | <!--- Provide a general summary of your changes in the Title above -->
### Description
<!--- Describe your changes in detail -->
adds version 3.0.4 to the list of supported versions
3.0.4 is a maintenance release of the specification that does not change any of the functional aspects.
https://www.openapis.org/blog/20... | diff --git a/README.md b/README.md
index 7ba444476161..491ca6388f11 100644
--- a/README.md
+++ b/README.md
@@ -33,17 +33,17 @@ If you are looking for plain ol' HTML/JS/CSS, [download the latest release](http
## Compatibility
The OpenAPI Specification has undergone 5 revisions since initial creation in 2010. Compatib... | 3 | 2 | 1 | [{"id": "G0", "claim": "The entire `openapi` version validation function should be refactored so each new OpenAPI release (3.2, major.minor-only versioning, 3.1.2) stops breaking it.", "category": "maintainability", "verdict": "uncertain", "priority": "P2", "scope": "pre_existing"}, {"id": "G1", "claim": "The OAS 3.0 v... | null |
swagger-api__swagger-ui__10421 | swagger-api/swagger-ui | 10,421 | defect | fceaec605072fbc717a04895bd19814d9a1c8e6d | 53b17ca3d421a3ab3c8d4aff7307f7b959e916cc | fix(json-schema-5-samples): fix example for time string (#10420) | <!--- Provide a general summary of your changes in the Title above -->
At the moment, Swagger UI doesn't produce a correct Example Value with OpenAPI 3.0.1 definition for a `string` property with `time` format.
### Description
<!--- Describe your changes in detail -->
This PR will add the missing type, format com... | diff --git a/src/core/plugins/json-schema-5-samples/fn/index.js b/src/core/plugins/json-schema-5-samples/fn/index.js
index e1fcf8623fe..490057bec56 100644
--- a/src/core/plugins/json-schema-5-samples/fn/index.js
+++ b/src/core/plugins/json-schema-5-samples/fn/index.js
@@ -19,6 +19,7 @@ const primitives = {
"string_e... | 2 | 2 | 2 | [{"id": "G0", "claim": "Use `new Date().toISOString().substring(11)` for the string_time sample, aligned with how `time` is generated for JSON Schema 2020-12 (OpenAPI 3.1.x) and RFC 3339, instead of `.substring(11, 23)`.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id... | null |
swagger-api__swagger-ui__10488 | swagger-api/swagger-ui | 10,488 | defect | 4680916cd91d4c9e7caabef0a1c677e2ab011118 | c4eed88617a8019a31f504a7571b08c767cf8ecb | ft(oas3): show the schema tab in the Try it Out mode | Fixes #10440
### Description
Render the 'RequestBodyEditor' component in case user is in 'Try it out' mode, otherwise keep previous logic. | diff --git a/src/core/plugins/oas3/components/request-body.jsx b/src/core/plugins/oas3/components/request-body.jsx
index b85f597d1ef..dbff056179b 100644
--- a/src/core/plugins/oas3/components/request-body.jsx
+++ b/src/core/plugins/oas3/components/request-body.jsx
@@ -282,35 +282,25 @@ const RequestBody = ({
... | 2 | 2 | 1 | [{"id": "G0", "claim": "The inline isExecute ternary building the example prop could be extracted to a separate variable.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The pull request should also provide a test for the new Schema-tab-in-Try-it... | null |
swagger-api__swagger-ui__10691 | swagger-api/swagger-ui | 10,691 | defect | e755cc8c9ee59301381ed41ecf2c6bcb547f6011 | 0df0dfb80d0533d2b4137f1c874445dc3bdd8f36 | fix(utils): disallow schema type array value string | Add validation and show error if the schema type is an array and value provided is string
### Description
Before https://github.com/swagger-api/swagger-js/pull/3826, it was possible to send request without any issues. Now validation and error has been added
### Motivation and Context
After https://github.com/sw... | diff --git a/src/core/utils/index.js b/src/core/utils/index.js
index 9b008587f84..9e9934d9066 100644
--- a/src/core/utils/index.js
+++ b/src/core/utils/index.js
@@ -466,7 +466,6 @@ function validateValueBySchema(value, schema, requiredByParam, bypassRequiredChe
let stringCheck = type === "string" && value
let arr... | 2 | 1 | 1 | [{"id": "G0", "claim": "The error message 'Required field is not provided' that the updated test expects for a string value on an array-type parameter is misleading; it should indicate a type mismatch such as 'Value must be an array'.", "category": "correctness", "verdict": "uncertain", "priority": "P1", "scope": "intr... | null |
swagger-api__swagger-ui__5939 | swagger-api/swagger-ui | 5,939 | defect | 12e86dafb09d275d6cf87fcd89dded2a77041469 | d1d2a13855bc19a7a1cb0958702d89dba452e5e7 | Preserve authorization on browser refresh and close/reopen | <!--- Provide a general summary of your changes in the Title above -->
### Description
<!--- Describe your changes in detail -->
This pull request is a continuation of #4864. I just managed to write it in a more clear manner, and it would also satisfy the requirement by @shockey to have a configuration which is `c... | diff --git a/src/core/index.js b/src/core/index.js
index c0aaae00fcd1..2714c50757de 100644
--- a/src/core/index.js
+++ b/src/core/index.js
@@ -37,7 +37,9 @@ export default function SwaggerUI(opts) {
filter: null,
validatorUrl: "https://validator.swagger.io/validator",
oauth2RedirectUrl: `${window.locatio... | 4 | 3 | 1 | [{"id": "G0", "claim": "Tests should be included with this PR, covering missing, invalid, and valid sample options.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The PR includes artifacts (unrelated changes) from other PRs.", "category": "maintainabili... | null |
swagger-api__swagger-ui__7438 | swagger-api/swagger-ui | 7,438 | defect | 770e748f149cd2066fd9fcfd90df43dde80a8a54 | 2ba25d013c297ea07cb32863b45001d394735219 | feat: do not ask for client secret when using auth code with PKCE | According to [OAuth 2.0 Security Best Current Practice](https://datatracker.ietf.org/doc/html/draft-ietf-oauth-security-topics) the implicit grant should no longer be used, but be replaced by the authorization code grant with PKCE.
While the swagger-ui permits to use the PKCE grant type, the authorization dialog st... | diff --git a/src/core/components/auth/oauth2.jsx b/src/core/components/auth/oauth2.jsx
index 7fec252f5a7..5a39f26360d 100644
--- a/src/core/components/auth/oauth2.jsx
+++ b/src/core/components/auth/oauth2.jsx
@@ -130,7 +130,11 @@ export default class Oauth2 extends React.Component {
const AUTH_FLOW_ACCESS_CODE = i... | 3 | 2 | 1 | [{"id": "G0", "claim": "The ' with PKCE' suffix is appended to the flow title even for flows other than the authorization code flow (e.g. implicit), so the usePkce flag should be ignored unless the flow is authorization.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id... | null |
swagger-api__swagger-ui__7997 | swagger-api/swagger-ui | 7,997 | defect | 381017b48562e9caf458191ef0ad46126b6079b7 | 1db2ce6a68f21c9e4abdf9393ce923d799f1878e | fix(ui): avoid empty div when there are no `externalDocs` | Relocate `div` for `externalDocs` into conditional checking for existence of `externalDocs` entry.
### Description
- Move div into the conditional
- Ran `prettier` on the file
### Motivation and Context
Fixes #7996
### How Has This Been Tested?
Manually tested on macOS with and without `externalDocs... | diff --git a/src/core/components/operation-tag.jsx b/src/core/components/operation-tag.jsx
index 8dbc39a5bc6..1357906a423 100644
--- a/src/core/components/operation-tag.jsx
+++ b/src/core/components/operation-tag.jsx
@@ -59,7 +59,7 @@ export default class OperationTag extends React.Component {
let rawTagExternalDo... | 2 | 2 | 1 | [{"id": "G0", "claim": "Add a Cypress test or two comparing and verifying the two cases noted in the PR's screenshot (externalDocs div present vs absent).", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Add a className=\"info__externaldocs\" to the exter... | null |
swagger-api__swagger-ui__8265 | swagger-api/swagger-ui | 8,265 | defect | cced54700609d72047c6636dca239eb3610586b7 | 464818e2abbf983643b302a25336bff7a907583e | Fix #8217: Reset Request Body not using default values | ### Description
It was not possible to pass a required validation of a request body field which has a default value after clicking the Reset button.
Behind the scenes everything was being reset to 'null' values. This fix should resolve this issue by using the default request body values instead.
### Motivation an... | diff --git a/src/core/components/parameters/parameters.jsx b/src/core/components/parameters/parameters.jsx
index eb6dd47aaae..ef6ed65dcd5 100644
--- a/src/core/components/parameters/parameters.jsx
+++ b/src/core/components/parameters/parameters.jsx
@@ -161,7 +161,10 @@ export default class Parameters extends Component ... | 3 | 3 | 1 | [{"id": "G0", "claim": "The PR should add a Cypress test asserting that after resetting the request body the field value is what it should be instead of \"default\".", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The two internal functions defined inlin... | null |
swagger-api__swagger-ui__8400 | swagger-api/swagger-ui | 8,400 | defect | c9d94066d4c23236211b2bdc28d47a82b4aaaddb | f03e35c79f31daafc47f920f7ab4d8d1032cd358 | Decode model schema name on model component | ### Description
Decodes the schema name on model
### Motivation and Context
Fixes #5626 (for both OpenAPI v3 and Swagger V2)
### How Has This Been Tested?
- Go to `localhost:3200`
- Paste this data-url in the url field
```
data:application/json;base64,eyJjb21wb25lbnRzIjp7InNjaGVtYXMiOnsiYVwvYitjIjp7In... | diff --git a/src/core/components/model.jsx b/src/core/components/model.jsx
index e72edbd6d1f..bea0b74d5d3 100644
--- a/src/core/components/model.jsx
+++ b/src/core/components/model.jsx
@@ -3,6 +3,8 @@ import ImmutablePureComponent from "react-immutable-pure-component"
import ImPropTypes from "react-immutable-proptypes... | 5 | 5 | 2 | [{"id": "G0", "claim": "decodeRefName may throw a URIError because decodeURIComponent fails on strings like \"c%d\" that JSON Pointer (RFC6901 section 5) allows, so the invalid encoding corner-case must be compensated for.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"... | null |
swagger-api__swagger-ui__8999 | swagger-api/swagger-ui | 8,999 | defect | ea6e3985871cdd2e949d8b890f4681f6920dda0f | 1cec852b011a96ff538083ed728fd4f4eefddd0c | Provide additional context for authorization and logout button |
<!--- Provide a general summary of your changes in the Title above -->
### Description
- Introduced the AuthorizeButton component that entails the apply authorization and remove authorization functionality, as well as a close button.
- Unit tests provided for different states.
- AuthorizeButton is able to be ... | diff --git a/src/core/components/auth/auths.jsx b/src/core/components/auth/auths.jsx
index c2a51ead9c1..75dc44a59c3 100644
--- a/src/core/components/auth/auths.jsx
+++ b/src/core/components/auth/auths.jsx
@@ -88,8 +88,8 @@ export default class Auths extends React.Component {
}
<div className="... | 3 | 3 | 2 | [{"id": "G0", "claim": "The additional screen-reader context the PR aims for would be achieved by an ad-hoc aria-label HTML attribute instead of creating the rather complex AuthorizeButton usecase component.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": ... | null |
swagger-api__swagger-ui__9023 | swagger-api/swagger-ui | 9,023 | defect | 89f04d3f11288b4a63bf1f6dda3a7ca297ed69ff | c989d71e16f9210a3ad388768714ac82841d0fbc | fix(json-schema-2020-12): Fix OAS 3.1 additionalProperties false samples | <!--- Provide a general summary of your changes in the Title above -->
### Description
<!--- Describe your changes in detail -->
swagger-ui incorrectly adds `"additionalProp1": {}` to samples for schemas where `additionalProperties` is `false` in OpenAPI 3.1.0, even though this was previously correct in OpenAP... | diff --git a/src/core/plugins/json-schema-2020-12/samples-extensions/fn/main.js b/src/core/plugins/json-schema-2020-12/samples-extensions/fn/main.js
index 983d6253434..523f5160597 100644
--- a/src/core/plugins/json-schema-2020-12/samples-extensions/fn/main.js
+++ b/src/core/plugins/json-schema-2020-12/samples-extension... | 1 | 1 | 0 | [{"id": "G0", "claim": "The explicit `additionalProperties === true` check is unnecessary; the condition can be simplified to `if (isBooleanJSONSchema(additionalProperties) && additionalProperties)`.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}] | null |
swagger-api__swagger-ui__9775 | swagger-api/swagger-ui | 9,775 | defect | 311095476774329519ba5e4fb48e84f60f455665 | 2dcc38760ee78851e9c7f885529f425fac3742dd | fix(spec): format validation errors for nested parameters | Refs #9774
The array parameters should now get `index` of the value where the error is instead of the undefined `propKey`. We should also go recursively into the nested errors to get a proper error message.
With these changes, the validation errors for this example input:
<img width="1403" alt="Screenshot 2024... | diff --git a/src/core/plugins/spec/selectors.js b/src/core/plugins/spec/selectors.js
index 82607ac8f1f..8dd36dc3ce2 100644
--- a/src/core/plugins/spec/selectors.js
+++ b/src/core/plugins/spec/selectors.js
@@ -494,12 +494,21 @@ export const validationErrors = (state, pathMethod) => {
let paramValues = state.getIn(["m... | 4 | 4 | 1 | [{"id": "G0", "claim": "The author is unsure about the names and placement of the newly added formatting helper functions, and they should be reconsidered.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Validation error messages need to identify... | null |
swaggest__jsonschema-go__125 | swaggest/jsonschema-go | 125 | defect | 8a67fbff12033c3ffbb6ca11fe0c466b1d290b6c | e973782ae44d114d05450c12401ecf5d53cd87ab | Add deprecated and writeOnly as part of schema | ## Description
This is a part of fixing swaggest/openapi-go#145. Both of these members are [official parts of `jsonschema`](https://json-schema.org/draft/2020-12/json-schema-validation#name-deprecated), so I'd like to treat them as such.
## Changes
* Add a couple of round-trip tests for the new members
* Add `wri... | diff --git a/entities.go b/entities.go
index 480c41e..a4819df 100644
--- a/entities.go
+++ b/entities.go
@@ -23,6 +23,8 @@ type Schema struct {
Description *string `json:"description,omitempty"`
Default *interface{} `json:"defa... | 3 | 1 | 0 | [{"id": "G0", "claim": "The reflection logic in reflect.go no longer sets the Deprecated field from struct tags and no logic was added to set WriteOnly from tags, so users reflecting Go structs will not get these fields populated in the generated schema.", "category": "correctness", "verdict": "opposed", "priority": "P... | null |
swaggest__rest__225 | swaggest/rest | 225 | defect | 37e565a1302f967e04da0e2aa17f34e4653e9de8 | fd69e60283046cde9abe82e771e313564338e3a1 | feat: add support for special characters in path | This change adds support for parsing URL encoded characters, ensuring regex matches down the pipeline can be executed against the unescaped, raw value, matching the contents of the generated swagger documentation. | diff --git a/chirouter/example_test.go b/chirouter/example_test.go
index a5f5e8a..9ebb211 100644
--- a/chirouter/example_test.go
+++ b/chirouter/example_test.go
@@ -45,7 +45,8 @@ func ExamplePathToURLValues() {
// Serving example URL.
w := httptest.NewRecorder()
- req, _ := http.NewRequest(http.MethodPost, "/foo/... | 9 | 4 | 0 | [{"id": "G0", "claim": "The error handling for URL decoding is not comprehensive: decoded path parameter values that exceed the maximum allowed length or contain invalid characters are not rejected, and checks for length and validity should be added.", "category": "correctness", "verdict": "uncertain", "priority": "P2"... | null |
swaggo__gin-swagger__168 | swaggo/gin-swagger | 168 | defect | c14c0debe8e9cb46699f41ef1b26672195950a4a | 6e81fff85b887af06d3ee612ea022adba32b414c | allow multiple Swagger documents (no breaking changes), requires http… | **Describe the PR**
Allow the registration of multiple Swagger documents with different names.
This PR does not contain any breaking changes as the method signature change is backwards compatible.
It basically solves the problems listed in #885.
**Relation issue**
https://github.com/swaggo/swag/pull/1022
**Ad... | diff --git a/swagger.go b/swagger.go
index 7fb3462..58f13e0 100644
--- a/swagger.go
+++ b/swagger.go
@@ -21,6 +21,7 @@ type Config struct {
DeepLinking bool
DocExpansion string
DefaultModelsExpandDepth int
+ InstanceName string
}
// URL presents the url pointing to API def... | 2 | 2 | 2 | [{"id": "G0", "claim": "The README.md must be updated to document the pull request's new configuration option (InstanceName), as was forgotten to do on swag.", "category": "documentation", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "gin-swagger requires github.com/swaggo/swa... | null |
swaggo__gin-swagger__271 | swaggo/gin-swagger | 271 | defect | aa92a0ac3f26c587e4248afcf8d8b6318353e7b0 | da6a206e0bbb88ad721bb3226a075ceebbaeebf8 | Allow to enable Proof Key for Code Exachange (PKCE) | **Describe the PR**
Wires usePkceWithAuthorizationCodeGrant OAuth2 option of the Swagger UI to the options interface
**Relation issue**
Closes https://github.com/swaggo/gin-swagger/issues/243
**Additional context**
Allow library users to set the usePkceWithAuthorizationCodeGrant OAuth2 config option of the Swa... | diff --git a/README.md b/README.md
index 9c20ddd..a94c123 100644
--- a/README.md
+++ b/README.md
@@ -195,12 +195,13 @@ func main() {
}
```
-| Option | Type | Default | Description ... | 2 | 2 | 1 | [{"id": "G0", "claim": "Please rename the option UsePkceWithAuthorizationCodeGrant to Oauth2UsePkce, keeping the details in the function doc.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The rewritten initOAuth block should stay backward compa... | null |
swaggo__gin-swagger__46 | swaggo/gin-swagger | 46 | defect | ea4ea9de0c1dfbdab6e540e7723828953babdf4b | efb67c3e8b6d7064c9e2bb1ccc3233d1f7ca4200 | feat: support swagger configuration | now URL variable can be set.
address https://github.com/swaggo/swag/issues/194 | diff --git a/README.md b/README.md
index d4b27fc..22c05e0 100644
--- a/README.md
+++ b/README.md
@@ -64,8 +64,11 @@ import (
func main() {
r := gin.New()
- // use ginSwagger middleware to
- r.GET("/swagger/*any", ginSwagger.WrapHandler(swaggerFiles.Handler))
+ config := &ginSwagger.Config{
+ URL: "http://... | 1 | 1 | 1 | [{"id": "G0", "claim": "Changing the exported WrapHandler (and DisablingWrapHandler) signatures is a destructive change for existing users of the API; the reviewer asks to keep backward compatibility by providing a separate function/interface instead of altering WrapHandler, and, the PR being merged already, to revert ... | null |
swaggo__swag__1621 | swaggo/swag | 1,621 | defect | c8372f64eaf1127cc9d9a95611d02fc34ada2f42 | f4f91bbfc753223a807496392739b6ccbdbbbbcc | fix required params parsing for routes with multiple paths and multiple params | **Describe the PR**
Fixes #1267
**Relation issue**
[e.g. https://github.com/swaggo/swag/pull/118/files](https://github.com/swaggo/swag/issues/1267)
**Additional context**
Add any other context about the problem here.
| diff --git a/parser.go b/parser.go
index 2e453960a..b6718c0da 100644
--- a/parser.go
+++ b/parser.go
@@ -975,7 +975,21 @@ func processRouterOperation(parser *Parser, operation *Operation) error {
parser.debug.Printf("warning: %s\n", err)
}
- *op = &operation.Operation
+ if len(operation.RouterProperties) > 1... | 1 | 1 | 0 | [{"id": "G0", "claim": "Please use `var validParams []spec.Parameter` instead of `validParams := []spec.Parameter{}` in processRouterOperation to avoid memory allocations.", "category": "performance", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
swaggo__swag__2055 | swaggo/swag | 2,055 | defect | 77771f0be4f3ed47e54b5872e9d3fb685bedbefb | 9a354db1bcda28cba642882c3a230d2d0fe942fe | formatter: skip generated files | **Describe the PR**
Skip generated Go files before running goimports.
**Relation issue**
Fixes https://github.com/swaggo/swag/issues/2050
Follow-up for https://github.com/swaggo/swag/pull/1927
| diff --git a/formatter.go b/formatter.go
index 1074a3bf5..355f5fac0 100644
--- a/formatter.go
+++ b/formatter.go
@@ -50,11 +50,17 @@ func NewFormatter() *Formatter {
// that happen during parsing of contents.
func (f *Formatter) Format(fileName string, contents []byte) ([]byte, error) {
fileSet := token.NewFileSet(... | 1 | 1 | 1 | [{"id": "G0", "claim": "The pull request fails to build and its tests fail on Go versions < 1.21 because ast.IsGenerated does not exist there; fix it (e.g. via conditional compilation with build tags) rather than bumping the minimum supported Go version.", "category": "correctness", "verdict": "supported", "priority": ... | null |
swaggo__swag__629 | swaggo/swag | 629 | defect | f150c139699a0333974d879a76a1ee1f451e6b51 | 577f62e4e1d8cc21711f4b3d4fb5a6643e6a82da | Conflicting package + struct name | **Describe the PR**
If code uses two packages that contains types with same name, swag generate wrong json/yaml. This PR fixes this.
**Relation issue**
Fixes #225
**Additional context**
This changes need testing on bigger swag files.
| diff --git a/parser.go b/parser.go
index 438630d98..16f4fb96c 100644
--- a/parser.go
+++ b/parser.go
@@ -516,7 +516,8 @@ func (parser *Parser) ParseType(astFile *ast.File) {
typeName := fmt.Sprintf("%v", typeSpec.Type)
// check if its a custom primitive type
if IsGolangPrimitiveType(typeName) {
- ... | 1 | 1 | 1 | [{"id": "G0", "claim": "The package name should be used only in the CustomPrimitiveTypes lookup in getArrayPropertyName — the returned type name must stay unprefixed and the raw (untransposed) name must be looked up, applying TransToValidSchemeType only when the type is not a custom primitive type, in both the *ast.Ide... | null |
swapagarwal__swag-for-dev__339 | swapagarwal/swag-for-dev | 339 | defect | 4fa6f30f8526a8b5585bcda1da1cff201f694fc4 | 71ffdf8c02124c60774ea7e585a19b21e52f050d | Alphabetical check in Tests | <!--
If you want to propose a new swag opportunity, please ensure you created an issue first and then head to:
https://github.com/swapagarwal/swag-for-dev/compare/master...swapagarwal:master?expand=1&template=new-swag-opportunity.md
-->
- [x] I've checked that this isn't a new swag opportunity proposal.
- [x] I'... | diff --git a/data.json b/data.json
index f8ab56833..201111229 100644
--- a/data.json
+++ b/data.json
@@ -110,7 +110,7 @@
{
"name": "Hacktoberfest 2019",
"difficulty": "hard",
- "description": "To qualify for the official limited edition Hacktoberfest T-shirt, you must register and then make four pull re... | 3 | 3 | 2 | [{"id": "G0", "claim": "The package-lock.json must be updated (e.g. by running npm install) so the lock file reflects the PR's dependency changes.", "category": "correctness", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The change to the Hacktoberfest 2019 description in dat... | null |
swar__nba_api__626 | swar/nba_api | 626 | defect | d1dfaa0baa922d372b427eeaa0805534b296a327 | fba6641818bf35826301c740c9d71c8e20374234 | feat: added GravityLeaders Endpoint | Added the new Gravity Leaders endpoint. The NBA defines Player Gravity as "Gravity quantifies how much a player pulls defenders towards them above expected, essentially measuring how much attention they draw compared to what the spacing on the floor predicts." | diff --git a/src/nba_api/stats/endpoints/__init__.py b/src/nba_api/stats/endpoints/__init__.py
index f3661801..10e507b9 100644
--- a/src/nba_api/stats/endpoints/__init__.py
+++ b/src/nba_api/stats/endpoints/__init__.py
@@ -44,6 +44,7 @@
"franchiseplayers",
"gamerotation",
"glalumboxscoresimilarityscore... | 5 | 4 | 0 | [{"id": "G0", "claim": "Rename the dataset attribute `league_leaders` to `leaders` for consistency with the nba_api nomenclature.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The dataset attribute should not be initialized to None in __init__ ... | null |
swarmclawai__swarmclaw__54 | swarmclawai/swarmclaw | 54 | defect | e633e6def6562beb95592df24975ec62109694c0 | cfa2a80e694f6a02c91955cbe0d14116dcd42dd6 | Fix chatroom member inspection and session selection | ## Summary
- fix chatroom composer mirror highlighting so caret alignment stays correct at line end
- add active-member inspection in chatrooms by opening each member's synthetic session view with recent messages and execution log
- allow selecting and continuing an exact session from agent sessions and chat list via a... | diff --git a/src/components/agents/inspector-panel.tsx b/src/components/agents/inspector-panel.tsx
index 154e4e05..2d4934da 100644
--- a/src/components/agents/inspector-panel.tsx
+++ b/src/components/agents/inspector-panel.tsx
@@ -903,6 +903,8 @@ function SessionsSection({ agent }: { agent: Agent }) {
const connecto... | 2 | 2 | 1 | [{"id": "G0", "claim": "handleInspectAgentSession can race when the user triggers multiple inspections quickly: earlier requests may resolve after later ones and overwrite inspectedMessages/inspectedExecLogs for a different inspectedSessionId; consider tracking a requestId/AbortController or checking the sessionId befo... | null |
swarmclawai__swarmclaw__62 | swarmclawai/swarmclaw | 62 | defect | 22ff576a7180e2c913ce5045117a2b2f6115727c | adb046514d43b7643603557e956ed9fd4ad29c47 | Fix codex session continuity and active session selection UX | Summary
- fix Codex CLI continuity so session/thread state is preserved across turns
- persist provider-mutated resume IDs correctly during turn finalization
- align CLI behavior with user service setup (SWARMCLAW_HOME, systemd usage, key lookup)
- improve active session derivation to avoid selecting empt... | diff --git a/bin/swarmclaw.js b/bin/swarmclaw.js
index 3bbafebf..bd4c7d49 100755
--- a/bin/swarmclaw.js
+++ b/bin/swarmclaw.js
@@ -3,6 +3,8 @@
/* eslint-disable @typescript-eslint/no-require-imports */
const path = require('node:path')
+const fs = require('node:fs')
+const os = require('node:os')
const { spawnSync... | 2 | 2 | 2 | [{"id": "G0", "claim": "If a first Codex turn doesn't create perSessionHome (no system prompt/MCP) yet a codexThreadId gets persisted, hasPerSessionHome will still be false on the next turn so the branch clears the stored thread id and breaks session continuity; the per-session CODEX_HOME should be ensured (or at least... | null |
swaroopch__edn_format__56 | swaroopch/edn_format | 56 | defect | 8a4469a71f809e7a3ad4939487b6d754961cbe17 | 84303240e660022cf8a8adc50e882dcfda5b410a | add support for unicode char literals | As per new examples in tests, this includes both `\Σ` and `\u03bB` variations | diff --git a/edn_format/edn_lex.py b/edn_format/edn_lex.py
index f9322e4..b98d2a1 100644
--- a/edn_format/edn_lex.py
+++ b/edn_format/edn_lex.py
@@ -21,6 +21,7 @@
long = int
basestring = str
unicode = str
+_bytes = (bytes if sys.version_info[0] == 2 else lambda s: bytes(s, 'utf-8'))
ESCAPE_SEQUENCE_... | 3 | 2 | 0 | [{"id": "G0", "claim": "The two separate steps that both check sys.version_info should be combined into a single if/else so that _bytes is defined per version branch.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The comment above the t_CHAR re... | null |
swaywm__sway__3399 | swaywm/sway | 3,399 | defect | 14cab7861294189f820e0830ae84ac7b15271342 | 89958f4d425e9a8bf8e3b2af1a8a0ec7de456e39 | Fix segfaults on output destruction | Fixes #3065
This fixes two causes of segfaulting when an output is destroyed.
The first occurred when an output was never enabled. The issue was that
the destroy signal was never initialized so when it was emitted, sway
segfaulted. This was fixed by moving the initialization into
`output_create` since all out... | diff --git a/sway/input/cursor.c b/sway/input/cursor.c
index 96feb47d0e..185c59bba0 100644
--- a/sway/input/cursor.c
+++ b/sway/input/cursor.c
@@ -87,6 +87,10 @@ static struct sway_node *node_at_coords(
struct sway_output *output = wlr_output->data;
double ox = lx, oy = ly;
wlr_output_layout_output_coords(root->o... | 2 | 2 | 1 | [{"id": "G0", "claim": "The PR should not dynamically add and remove listeners when enabling and disabling outputs.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The null-output guard should be moved earlier in node_at_coords (from line 88 to line 87)."... | null |
swaywm__sway__3422 | swaywm/sway | 3,422 | defect | 64ef9366733d6d332a24897f72eba90ba2adca1e | 0d11a3459269158e512bf34c82d60646ef94c358 | Resize only current and immediate siblings rather than all siblings | For example, create layout `V[view view view]` and resize the leftmost view using mod+rightclick. Previously, the edge between view 2 and 3 would be adjusted as well. Now this edge will remain constant, which matches the behaviour of i3.
To do this operation correctly, the resize tiling seatop now keeps track of two... | diff --git a/include/sway/commands.h b/include/sway/commands.h
index 5d45d78bbd..1be3a72fbe 100644
--- a/include/sway/commands.h
+++ b/include/sway/commands.h
@@ -94,9 +94,12 @@ struct cmd_results *add_color(const char *name,
/**
* TODO: Move this function and its dependent functions to container.c.
*/
-void conta... | 1 | 1 | 1 | [{"id": "G0", "claim": "Running `resize grow width 10px` or `resize grow height 10px` on the first or last child segfaults, because `prev` and `next` are assigned out-of-range sibling pointers that are later dereferenced.", "category": "correctness", "verdict": "supported", "priority": "P0", "scope": "introduced"}] | null |
swaywm__sway__3753 | swaywm/sway | 3,753 | defect | d3d7956576341bbbfb60d045175b0e8a44752e0b | 9301a74ba86817303d13935c78e2b5531241a061 | input/cursor: allow whole-window bindings on ws | Fixes #3750
To match i3's behavior, this allows mouse bindings to be triggered over
a workspace when `--whole-window` is given. | diff --git a/sway/input/cursor.c b/sway/input/cursor.c
index 3236c74a11..930192b440 100644
--- a/sway/input/cursor.c
+++ b/sway/input/cursor.c
@@ -552,10 +552,11 @@ static void state_add_button(struct sway_cursor *cursor, uint32_t button) {
static struct sway_binding* get_active_mouse_binding(
const struct sway_cur... | 1 | 1 | 1 | [{"id": "G0", "claim": "The whole-workspace check should compare the binding flags to the click region bitwise, because binding->flags can carry other non-region flags besides the click region.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
swaywm__sway__4142 | swaywm/sway | 4,142 | defect | 8c8e6a6c9089d70c3b970b03c3f783eafd16f825 | d3c4afc85ad5c4fecfa6cede1aef200b117a580e | Implement output toggle | Closes #4136
Per discussion in #4136. Does handle disconnected output but does not handle wildcard. | diff --git a/include/sway/commands.h b/include/sway/commands.h
index cfe2aa0792..c4903788c1 100644
--- a/include/sway/commands.h
+++ b/include/sway/commands.h
@@ -270,6 +270,7 @@ sway_cmd output_cmd_mode;
sway_cmd output_cmd_position;
sway_cmd output_cmd_scale;
sway_cmd output_cmd_subpixel;
+sway_cmd output_cmd_togg... | 10 | 10 | 4 | [{"id": "G0", "claim": "The `argc > 1` condition on the all-outputs check should be dropped because this handler takes no arguments, and with the condition the guard is skipped when argc is not greater than 1.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "c... | null |
swaywm__sway__4173 | swaywm/sway | 4,173 | defect | 00cffb8e20d4bb800134f26dcda8a01afa4467d2 | 5c223b996859ba832872d18e58b2ad90e8ba7bd2 | Perform keymap validation | Closes #4148 (this is the error part; see #4153 for something usable)
**Just the first commit**: basic invalid keymap prevention
Before the delta input config is stored, this attempts to compile a
keymap with it. If the keymap fails to compile, then the first line of
the xkbcommon log entry will be included wit... | diff --git a/include/sway/input/keyboard.h b/include/sway/input/keyboard.h
index b862205353..90214af912 100644
--- a/include/sway/input/keyboard.h
+++ b/include/sway/input/keyboard.h
@@ -65,7 +65,8 @@ struct sway_keyboard {
struct sway_binding *repeat_binding;
};
-struct xkb_keymap *sway_keyboard_compile_keymap(st... | 7 | 6 | 1 | [{"id": "G0", "claim": "The `error` string leaks on the keymap-failure return path in cmd_input (sway/commands/input.c).", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "It would be better to log the xkbcommon errors when they appear, rather than only... | null |
swaywm__sway__4187 | swaywm/sway | 4,187 | defect | de5cfa7232b5011e291da368baba7945f10b5724 | 3e1aa751cb1da0f329a5c39015e825899f5953e6 | bindings: allow unlocked and locked bindings | _Preface: I noticed while working on this that I missed that
`sway/input/switch.c` is space indented when I approved the PR that
added it. I'll submit a follow-up PR to correct the indentation of the
file (submitted as #4188)_
Closes #4183
This changes the behavior of bindings to make the `BINDING_LOCKED` fla... | diff --git a/sway/commands/bind.c b/sway/commands/bind.c
index ea8179bb34..d43c87fb0f 100644
--- a/sway/commands/bind.c
+++ b/sway/commands/bind.c
@@ -49,6 +49,10 @@ static bool binding_switch_compare(struct sway_switch_binding *binding_a,
if (binding_a->state != binding_b->state) {
return false;
}
+ if ((bindin... | 1 | 1 | 0 | [{"id": "G0", "claim": "In the rewritten get_active_binding, the inner check `(*current_binding)->order != binding->order` inside `if (*current_binding == binding)` can never be true, since equal pointers mean the same order, so the duplicated-bindings debug log is unreachable dead code.", "category": "correctness", "v... | null |
swaywm__sway__4249 | swaywm/sway | 4,249 | defect | 3f77591b00a98dba4d2ddc5198e87f9106579ed1 | de4d7f82c959cc2cd5f67f2f20d49277c96a8392 | bindings: defer while initializing | Fixes #4224
This adds the logic to defer binding execution while sway is still
initializing. Without this, the binding command would be executed, but
the command handler would return CMD_DEFER, which was being treated as
a failure to run. To avoid partial executions, this will defer all
bindings while config->a... | diff --git a/include/sway/config.h b/include/sway/config.h
index 57ae3c639e..9736a6650d 100644
--- a/include/sway/config.h
+++ b/include/sway/config.h
@@ -558,6 +558,11 @@ bool read_config(FILE *file, struct sway_config *config,
*/
void run_deferred_commands(void);
+/**
+ * Run the binding commands that were defer... | 1 | 1 | 1 | [{"id": "G0", "claim": "Suggests moving the transaction_commit_dirty() call out of run_deferred_bindings() and placing it after the function's call in main(), so that the new state for both deferred commands and bindings is applied atomically in one transaction.", "category": "design", "verdict": "supported", "priority... | null |
swaywm__sway__4312 | swaywm/sway | 4,312 | defect | c9cb5ced7f7597afeb73fd5b661a98462f170d11 | 9c46c8655df69284599476178ecad46b8fd37aa0 | cmd_bindswitch: add option to execute on reload | Closes #4305
This adds a --reload flag to cmd_bindswitch that allows for the binding
to be executed on reload. One possible use case for this is to allow
users to disable outputs when the lid closes and enable them when the
lid opens without having to open and re-close the lid after a reload. | diff --git a/include/sway/config.h b/include/sway/config.h
index 4adce8abb8..c5558c0d14 100644
--- a/include/sway/config.h
+++ b/include/sway/config.h
@@ -39,6 +39,7 @@ enum binding_flags {
BINDING_CONTENTS=8, // mouse only; trigger on container contents
BINDING_TITLEBAR=16, // mouse only; trigger on container tit... | 1 | 1 | 0 | [{"id": "G0", "claim": "include/sway/input/switch.h appears to use mixed tabs and spaces and should use a consistent indentation style.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}] | null |
swaywm__sway__4342 | swaywm/sway | 4,342 | defect | 37308f65495feebcef5480ad28a9e1f936f7e807 | b9ff4b3876864e8d0f1edd0e22ffd799c6fdbe50 | ipc: add an input event | Closes #4334
This adds an ipc event related to input devices. Currently the
following changes are supported:
- [x] added: when an input device becomes available
- [x] removed: when an input device is no longer available
- [x] xkb_keymap_changed: (keyboards only) the keymap changed
- [x] xkb_layout_changed: (ke... | diff --git a/include/ipc.h b/include/ipc.h
index 6063f69c51..7ae21ab31e 100644
--- a/include/ipc.h
+++ b/include/ipc.h
@@ -34,6 +34,7 @@ enum ipc_command_type {
// sway-specific event types
IPC_EVENT_BAR_STATE_UPDATE = ((1<<31) | 20),
+ IPC_EVENT_INPUT = ((1<<31) | 21),
};
#endif
diff --git a/include/sway/inp... | 3 | 1 | 1 | [{"id": "G0", "claim": "The input event's change types should not carry the `_changed` suffix; for consistency with i3 (e.g. the `window` event) they should just be the name of the property.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "It may be wise t... | null |
swaywm__sway__4351 | swaywm/sway | 4,351 | defect | 1a16262903dce09a60f94698afa96c1b2c91c264 | a5d4c9ea6b450fdac0fc24fa95deb312a954d5f6 | bindsym/code: add group support | ~**This is built on #4342 so that'll have to be merged first.**~ #4342 has been merged
Closes #3662
This adds support for specifying a binding for a specific group. Any
binding without a group listed will be available in all groups. The
priority for matching bindings is as follows: input device, group, and
lo... | diff --git a/include/sway/config.h b/include/sway/config.h
index f1426453ae..c65d93533e 100644
--- a/include/sway/config.h
+++ b/include/sway/config.h
@@ -53,6 +53,7 @@ struct sway_binding {
list_t *keys; // sorted in ascending order
list_t *syms; // sorted in ascending order; NULL if BINDING_CODE is not set
uint... | 1 | 1 | 1 | [{"id": "G0", "claim": "The group parsing should also check `end[0] != '\\0'` so that malformed group names like `Group1asdf` are rejected.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
swaywm__sway__4373 | swaywm/sway | 4,373 | defect | 1a16262903dce09a60f94698afa96c1b2c91c264 | dbfc9b5ec618f883fc63762b35cc0a3397e5d16b | Add support for wlr_keyboard_group | **Depends on wlroots PR swaywm/wlroots#1771**
Related swaywm/wlroots#1217
Related #2897
Closes #3847
A wlr_keyboard_group allows for multiple keyboard devices to be
combined into one logical keyboard. This is useful for keyboards that
are split into multiple input devices despite appearing as one physical
ke... | diff --git a/include/sway/commands.h b/include/sway/commands.h
index 7ff3b651e0..0b5d8cbaab 100644
--- a/include/sway/commands.h
+++ b/include/sway/commands.h
@@ -281,6 +281,7 @@ sway_cmd seat_cmd_attach;
sway_cmd seat_cmd_cursor;
sway_cmd seat_cmd_fallback;
sway_cmd seat_cmd_hide_cursor;
+sway_cmd seat_cmd_keyboard... | 2 | 2 | 0 | [{"id": "G0", "claim": "Fix the typo in sway-input.5.scd: \"The restore the behavior of older\" should read \"To restore the behavior of older\".", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Fix the typo in sway-input.5.scd: \"it's own isolated ... | null |
swaywm__sway__4570 | swaywm/sway | 4,570 | defect | 08b3eaf93074daf4e7fa0831a63c46bba55fbbd7 | 7db4798df3f6277a769f39b56d264a1f5f653f68 | Full drawing tablet support. | This implements the wlr tablet v2 protocol, including fallback events for surfaces that do not support it. This is mostly based on the code in Rootston, but differs enough thanks to Sway's input system being reasonably different from Rootston's.
Most things seem to work correctly at this point. I do not own a tablet... | diff --git a/include/sway/input/cursor.h b/include/sway/input/cursor.h
index 516718c97f..e46c9b18ac 100644
--- a/include/sway/input/cursor.h
+++ b/include/sway/input/cursor.h
@@ -21,6 +21,8 @@ struct sway_cursor {
struct sway_node *node;
} previous;
struct wlr_xcursor_manager *xcursor_manager;
+ struct wl_list t... | 7 | 6 | 5 | [{"id": "G0", "claim": "Pen (tablet tool) button events are not sent to clients.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "unclear"}, {"id": "G1", "claim": "Setting the cursor image for the pen does not always work (the tool set_cursor implementation is spotty).", "category": "cor... | null |
swaywm__sway__4740 | swaywm/sway | 4,740 | defect | 5ed01c861a2e720d53b42f707872dbfb36b2fce7 | 90134cb764c78821680ceaa5f1f1b3db759669c7 | Port input method and text input from rootston | This ports basic input method support from rootston to sway.
Origin from:
- swaywm/wlroots#1203
- swaywm/wlroots#1303
- swaywm/wlroots#1308
- swaywm/wlroots#1759
| diff --git a/include/sway/input/seat.h b/include/sway/input/seat.h
index 9c3028c5db..5eb1075859 100644
--- a/include/sway/input/seat.h
+++ b/include/sway/input/seat.h
@@ -6,6 +6,7 @@
#include <wlr/util/edges.h>
#include "sway/config.h"
#include "sway/input/input-manager.h"
+#include "sway/input/text_input.h"
stru... | 4 | 3 | 2 | [{"id": "G0", "claim": "The text-input destroy listener should be registered inside sway_text_input_create rather than in relay_handle_text_input.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Clearing the pending focused surface in handle_text_input_de... | null |
swaywm__sway__4794 | swaywm/sway | 4,794 | defect | fe7ec8024c910ec3f0e7cb06bdcb8de2d4afcb59 | d5baa8638fb228084553ac391b09c7eb4bcb7d8e | Pass gesture events to clients | Fixes #4724.
This change can be tested quite easily if you use a backend which supports gestures (i.e. libinput). Open evince and your favourite pdf and you shall now see that pinch-to-zoom works properly. Prior to this, pinch-to-zoom would not do anything since the pinch and swipe events generated by the libinput b... | diff --git a/include/sway/input/cursor.h b/include/sway/input/cursor.h
index e46c9b18ac..0bcd262fad 100644
--- a/include/sway/input/cursor.h
+++ b/include/sway/input/cursor.h
@@ -3,6 +3,7 @@
#include <stdbool.h>
#include <stdint.h>
#include <wlr/types/wlr_pointer_constraints_v1.h>
+#include <wlr/types/wlr_pointer_ge... | 1 | 1 | 1 | [{"id": "G0", "claim": "The pinch/swipe gesture listeners added in sway_cursor_create are not removed when the cursor is destroyed.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
swaywm__sway__5240 | swaywm/sway | 5,240 | defect | 2b15cf453e4b28324e9012515011a705c2960b30 | 57ca76d3056dabf590969b28b992091090993bc7 | input/cursor: fix hide cursor timeouts on tablets and touchscreens | This commit refactors `cursor_handle_activity` to also take the idle
source, so that it can be reused for tablet and touch activity.
Previously, the timeouts would be tracked, but the cursor would never be
un-hidden for anything but pointers (including emulated pointers on
non-tablet_v2 surfaces).
Fixes #5169. | diff --git a/include/sway/input/cursor.h b/include/sway/input/cursor.h
index 5b6f9a9f0a..a221ac296a 100644
--- a/include/sway/input/cursor.h
+++ b/include/sway/input/cursor.h
@@ -85,7 +85,7 @@ struct sway_cursor *sway_cursor_create(struct sway_seat *seat);
void cursor_rebase(struct sway_cursor *cursor);
void cursor_r... | 1 | 1 | 0 | [{"id": "G0", "claim": "The new idle_source parameter of cursor_handle_activity should keep its type, i.e. be declared as `enum sway_input_idle_source idle_source` instead of `int`.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
swaywm__sway__5387 | swaywm/sway | 5,387 | defect | 34e0cad9acd88ccf18fc24d6917520cfc819abc1 | 5a7381c403b05e8476cb732895e020f807eadfe6 | input/cursor: keep reference to cursor in constraint | `set_region` accepts a `NULL` `*data`, so we can't use it to reference the constraint and find the cursor through its seat.
Fixes #5386.
/cc @emersion, sorry about that, don't know how this didn't fail during my testing...
I've tested this PR with:
```
$ wlroots/build/examples/pointer-constraints confine p... | diff --git a/sway/input/cursor.c b/sway/input/cursor.c
index 7b094d857d..c519c80173 100644
--- a/sway/input/cursor.c
+++ b/sway/input/cursor.c
@@ -835,7 +835,7 @@ static void handle_pointer_constraint_set_region(struct wl_listener *listener,
wl_container_of(listener, sway_constraint, set_region);
struct wlr_pointe... | 1 | 1 | 0 | [{"id": "G0", "claim": "Remove the two declarations in handle_pointer_constraint_set_region that became unused once the cursor is taken from sway_constraint instead of via the seat.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
swaywm__sway__5420 | swaywm/sway | 5,420 | defect | f7e050c58f61a15bf5987e2e3d280a72666f6381 | cc7f0e7abe21476de78f0b9a36e18197ac85de1b | Patches to address static analysis warnings | Hi!
This is a collection of small patches fixing some warnings reported by PVS-Studio.
Happy to change things if I got the "bug fix" wrong.
| diff --git a/common/ipc-client.c b/common/ipc-client.c
index ec0454c96d..d30212d25a 100644
--- a/common/ipc-client.c
+++ b/common/ipc-client.c
@@ -79,7 +79,6 @@ bool ipc_set_recv_timeout(int socketfd, struct timeval tv) {
struct ipc_response *ipc_recv_response(int socketfd) {
char data[IPC_HEADER_SIZE];
- uint32_t... | 1 | 1 | 0 | [{"id": "G0", "claim": "Fix the unchecked malloc in hex_to_rgba_hex that snprintf writes into, as part of this patch, so its null result is handled.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "pre_existing"}] | null |
swaywm__sway__5468 | swaywm/sway | 5,468 | defect | d328c2439c47fbbb24f74fd26e1a88ad8aaa3ace | 5e0955311e34d6c307c5c938d688f19d092e8114 | input: disable events for map_to_output devices when output not present | Fixes #3449.
---
Tested with a pointer device, since I do not have a libinput recent enough to contain https://gitlab.freedesktop.org/libinput/libinput/-/commit/0d06bfc4e27bf4a56a7f34b3f20c4a61570e765c. | diff --git a/include/sway/input/input-manager.h b/include/sway/input/input-manager.h
index 5107647d1e..ce74f7263a 100644
--- a/include/sway/input/input-manager.h
+++ b/include/sway/input/input-manager.h
@@ -44,9 +44,13 @@ void input_manager_configure_xcursor(void);
void input_manager_apply_input_config(struct input_... | 4 | 4 | 1 | [{"id": "G0", "claim": "input_manager_configure_input is not used outside input-manager.c, so it should not be exported from the header and should be kept static.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The 'Reconfigure all devices...' co... | null |
swaywm__sway__5525 | swaywm/sway | 5,525 | defect | e5954f321f76c9337efaf9c5f66140bfba2bae77 | e87462104f5ac0c53be3902b2125042acd49e2e0 | input: implement xdg_toplevel interactive resize hints | This PR implements interactive resize hints for xdg_toplevels by setting the resize state on all clients participating in an interactive resize. Should resolve #5411. The issues made it sounds ambiguous, but by my reading of xdg-shell.xml clients _should_ receive a non-resizing configure at the end:
> xdg_toplevel r... | diff --git a/include/sway/tree/container.h b/include/sway/tree/container.h
index fd028131ce..136d618b2e 100644
--- a/include/sway/tree/container.h
+++ b/include/sway/tree/container.h
@@ -219,6 +219,8 @@ void container_floating_resize_and_center(struct sway_container *con);
void container_floating_set_default_size(st... | 2 | 2 | 1 | [{"id": "G0", "claim": "The xdg_shell-specific code in container_set_resizing should be moved behind a new sway_view_impl->set_resizing callback implemented in sway/desktop/xdg_shell.c, since container.c should contain no shell-specific code.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "i... | null |
swaywm__sway__5780 | swaywm/sway | 5,780 | defect | 0cb9282aeebddeed0b5259f153f98a45311053a5 | 95680331dfca2939f9a872355b7f48fcbee75034 | commands/focus: force container warp when fulfilling `focus mode_toggle` | This commit switches focusing behavior to force a warp when executing
`focus mode_toggle`.
Fixes #5772. | diff --git a/include/sway/input/cursor.h b/include/sway/input/cursor.h
index 4c130fafc1..f17bed4826 100644
--- a/include/sway/input/cursor.h
+++ b/include/sway/input/cursor.h
@@ -110,7 +110,7 @@ void cursor_set_image_surface(struct sway_cursor *cursor,
struct wl_client *client);
void cursor_warp_to_container(stru... | 1 | 1 | 1 | [{"id": "G0", "claim": "The cursor-unhide logic that seat_consider_warp_to_focus runs after its call to cursor_warp_to_container may need to be kept, since this PR removes it from that path.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
swaywm__sway__6099 | swaywm/sway | 6,099 | defect | ba6c0eb18bd87938c7fba72236129c9ba949b007 | fc59e66adccea3a30ba71323fd65cae0e1ac8698 | Add toggle logic inside DPMS handler | Logic that obtains current DPMS state is put inside the handler.
sway_output from which the current DPMS state will be obtained is selected by the following logic:
* For `-` and `--` the focused output is used;
* For `*` error "Cannot apply toggle to all outputs" is reported;
* For everything else all_output_by_n... | diff --git a/sway/commands/output.c b/sway/commands/output.c
index 4418f23f08..8e51da16a8 100644
--- a/sway/commands/output.c
+++ b/sway/commands/output.c
@@ -62,8 +62,30 @@ struct cmd_results *cmd_output(int argc, char **argv) {
output_get_identifier(identifier, 128, sway_output);
output = new_output_config(id... | 1 | 1 | 1 | [{"id": "G0", "claim": "The DPMS-state logic added to cmd_output would also modify the dpms state for non-dpms wildcard output commands, and the output config should not be modified outside the handler — the logic belongs in output/dpms.c.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "intr... | null |
swaywm__sway__6455 | swaywm/sway | 6,455 | defect | bb3fd0abc56f39e35dc7f4e86f25da1b4a6efbd7 | 6cfbb102da82cda6b86a9afe9cad956e52f9c7b9 | Implement seatop_touch | Atm we got issue with the touch position sent to the clients. While
holding contact, leaving the initial container will continue to send
motion event to the client but with the new local position from the new
container.
This seatop goal is to send the position of the touch event, relatively
to the initial contai... | diff --git a/include/sway/input/seat.h b/include/sway/input/seat.h
index a2b5d2a1ba..14d3d9d83e 100644
--- a/include/sway/input/seat.h
+++ b/include/sway/input/seat.h
@@ -4,6 +4,7 @@
#include <wlr/types/wlr_keyboard_shortcuts_inhibit_v1.h>
#include <wlr/types/wlr_layer_shell_v1.h>
#include <wlr/types/wlr_seat.h>
+#i... | 12 | 11 | 4 | [{"id": "G0", "claim": "Touch up makes sway crash, and the author is unsure how to release the seatop cleanly when the last finger is lifted.", "category": "correctness", "verdict": "supported", "priority": "P0", "scope": "introduced"}, {"id": "G1", "claim": "Dispatching touch down from seat.c (falling back to handle_t... | null |
swaywm__sway__6475 | swaywm/sway | 6,475 | defect | 5865af75cf8029cc703cda36b68daafcb658c97b | 5ebe68c3daebd2ece79d565f6ef809222674c834 | Add 'output render_bit_depth [8|10]' command | ~Companion to [wlroots MR !3333](https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3333).~ ~See commit message (and the documentation for the introduced command in the man page) for what this does.~
This PR provides an `output <name> render_bit_depth [8|10]` command which can be used to make sway rende... | diff --git a/include/sway/commands.h b/include/sway/commands.h
index 4be4087058..c6f5c2e04e 100644
--- a/include/sway/commands.h
+++ b/include/sway/commands.h
@@ -284,6 +284,7 @@ sway_cmd output_cmd_max_render_time;
sway_cmd output_cmd_mode;
sway_cmd output_cmd_modeline;
sway_cmd output_cmd_position;
+sway_cmd outpu... | 5 | 3 | 0 | [{"id": "G0", "claim": "The PR should not silently fall back to 8-bit formats when the user explicitly asks for 10-bit; like unenableable modes, the request should fail instead.", "category": "design", "verdict": "opposed", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Use DRM_FORMAT_INVALID instead ... | null |
swaywm__sway__6802 | swaywm/sway | 6,802 | defect | cd1ee0e172a10a3f8a420ff20aa1a69d46c7b4ad | 6a4ee2a9f31090fe62fddc836e90094bd86be05d | Fix snprintf compiler warnings (errors) | ERROR: type should be string, got "https://github.com/swaywm/sway/issues/6784\r\nHello this replaces sprintf with snprintf to avoid\r\n`../sway/server.c:217:50: warning: ‘%d’ directive writing between 1 and 11 bytes into a region of size 8 [-Wformat-overflow=]\r\n`\r\nand\r\n`../sway/commands/output/background.c:115:25: warning: ‘sprintf’ argument 4 overlaps destination object ‘src’ [-Wrestrict]\r\n`" | diff --git a/sway/commands/output/background.c b/sway/commands/output/background.c
index 68ee9fe14c..1a3939d431 100644
--- a/sway/commands/output/background.c
+++ b/sway/commands/output/background.c
@@ -112,7 +112,7 @@ struct cmd_results *output_cmd_background(int argc, char **argv) {
"Unable to allocate resourc... | 2 | 2 | 1 | [{"id": "G0", "claim": "The snprintf size argument should use sizeof(name_candidate) instead of hardcoding the magic number 7.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The size argument 7 was the wrong value and would truncate the output t... | null |
swaywm__sway__6879 | swaywm/sway | 6,879 | defect | 04676936e71f6fccccb098f3232d16572b140902 | 836c57f8092283f6dfe7634bef561d0f61ba7fa0 | Implement ext-session-lock-v1 | This prevents input from bypassing a lockscreen if the lockscreen crashes or has other problems (for example, https://github.com/swaywm/swaylock/issues/204). Swaylock support is already present as of 1.6 (https://github.com/swaywm/swaylock/pull/219). | diff --git a/include/sway/input/seat.h b/include/sway/input/seat.h
index 77c2278d75..0f345ac8df 100644
--- a/include/sway/input/seat.h
+++ b/include/sway/input/seat.h
@@ -185,6 +185,10 @@ struct sway_workspace *seat_get_last_known_workspace(struct sway_seat *seat);
struct sway_container *seat_get_focused_container(s... | 21 | 17 | 1 | [{"id": "G0", "claim": "The PERMALOCK_CLIENT sentinel (a wl_client pointer of -1) used to keep the input grab after the locker dies is an approach the reviewer is not a fan of.", "category": "design", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The new sway_force_focus helpe... | null |
swaywm__sway__6970 | swaywm/sway | 6,970 | defect | a7898637de43de1757f72393ef1caedf568f45e4 | f93a85079586783dd1652f58b6949c766a0fd1f6 | Session lock focus fixes | Keyboard focus tracking with session lock has some incorrect edge cases around output destroy/create; this changes them to more closely mirror those used by layer_shell. | diff --git a/include/sway/input/seat.h b/include/sway/input/seat.h
index 4772615939..afa2306d42 100644
--- a/include/sway/input/seat.h
+++ b/include/sway/input/seat.h
@@ -171,6 +171,8 @@ void seat_set_focus_surface(struct sway_seat *seat,
void seat_set_focus_layer(struct sway_seat *seat,
struct wlr_layer_surface_v1... | 1 | 1 | 0 | [{"id": "G0", "claim": "The reviewer dislikes the hack in handle_surface_destroy that temporarily clears surf->lock_surface->mapped to make sway_set_focus_locker move the seat focus to another lock surface.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
swaywm__sway__7039 | swaywm/sway | 7,039 | defect | 1c368fbb5fcd8fb67040bcc12bd71c7fbf119e97 | 391e408f527f4c916ec17b1b9cbf9560021b2a0c | Improve tablet tool button handling. | This change allows the tablet tool button to be used for floating mod resize. In addition, it attempts to ensure that tablet tool events are consistent such that tablet v2 events and pointer events will never be interleaved, and such that the tool buttons count will never fall out of sync and cause tool button emulatio... | diff --git a/include/sway/input/cursor.h b/include/sway/input/cursor.h
index 8a2898dd0b..828ac3704c 100644
--- a/include/sway/input/cursor.h
+++ b/include/sway/input/cursor.h
@@ -64,6 +64,7 @@ struct sway_cursor {
struct wl_listener tool_proximity;
struct wl_listener tool_button;
bool simulating_pointer_from_tool... | 3 | 2 | 0 | [{"id": "G0", "claim": "The comment on the added simulation logic misspells \"surface\" as \"surace\" and should be corrected.", "category": "documentation", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The WLR_BUTTON_RELEASED count update should be flattened to an if/else th... | null |
swaywm__sway__7083 | swaywm/sway | 7,083 | defect | 122d8ce95484bd097bf3a15b8191213bd6969b41 | 269a7c3b5d3c24fc67f893bc6c9964a00c66e8f4 | Rename dpms output command to power | The "dpms" command refers to VESA Display Power Management
Signaling, a deprecated standard. It's superseded by VESA DPM.
Instead of tying out command name to a particular standard, use the
neutral term "power". | diff --git a/include/sway/commands.h b/include/sway/commands.h
index 5f71a79dbb..013a7b826c 100644
--- a/include/sway/commands.h
+++ b/include/sway/commands.h
@@ -287,6 +287,7 @@ sway_cmd output_cmd_max_render_time;
sway_cmd output_cmd_mode;
sway_cmd output_cmd_modeline;
sway_cmd output_cmd_position;
+sway_cmd outpu... | 2 | 2 | 0 | [{"id": "G0", "claim": "The deprecated dpms alias should print a message to the user telling them the command is deprecated.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The new documentation line saying the output \"will loose its current works... | null |
swaywm__sway__7278 | swaywm/sway | 7,278 | defect | 7623292734d6ba48bbfef1c32da28d02118dac38 | 9082d055b83e05f9102d11053dcaac101bf5f3dd | Add libinput RotationAngle | This patch adds the libinput option RotationAngle to sway.
Fix: #7277
Signoff-by: Lucas Zampieri <lzampier@redhat.com> | diff --git a/include/sway/commands.h b/include/sway/commands.h
index 7fad26a1a1..3d0087baae 100644
--- a/include/sway/commands.h
+++ b/include/sway/commands.h
@@ -261,6 +261,7 @@ sway_cmd input_cmd_map_to_region;
sway_cmd input_cmd_middle_emulation;
sway_cmd input_cmd_natural_scroll;
sway_cmd input_cmd_pointer_accel... | 1 | 1 | 0 | [{"id": "G0", "claim": "The error string should report the upper bound as non-inclusive, i.e. \"Input out of range [0, 360)\" instead of \"[0, 360]\".", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}] | null |
swaywm__sway__7478 | swaywm/sway | 7,478 | defect | b757ef94ef15093b8851598f85ef047379c341b5 | d18f27dbc3944eaf25116424e801280cc6b1b189 | Output matching cleanup | Centralize output matching in a single function. Will make it easier to add more logic to it later, e.g. to match port names or sink tags. | diff --git a/sway/config/output.c b/sway/config/output.c
index 3b524433ce..352d7f7ccc 100644
--- a/sway/config/output.c
+++ b/sway/config/output.c
@@ -153,28 +153,22 @@ static void merge_wildcard_on_all(struct output_config *wildcard) {
}
static void merge_id_on_name(struct output_config *oc) {
- char *id_on_name =... | 2 | 1 | 0 | [{"id": "G0", "claim": "Building id_on_name in merge_id_on_name would be easier as a large fixed-size stack buffer (e.g. PATH_MAX, zero-initialized with = {0}) than a malloc'd buffer sized by a first snprintf pass, avoiding the second snprintf call.", "category": "design", "verdict": "opposed", "priority": "P3", "scope... | null |
swaywm__sway__7552 | swaywm/sway | 7,552 | defect | 33cfdbe886144e8515593d96a80d850a7c6e382e | 76300be2b90792cb2c614febaba4a8c831c4e1e6 | Use wlr_render_pass | Ref: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3631 | diff --git a/include/sway/input/seat.h b/include/sway/input/seat.h
index 7b2d3d0759..6d29cf3bf3 100644
--- a/include/sway/input/seat.h
+++ b/include/sway/input/seat.h
@@ -12,6 +12,7 @@
#include "sway/input/text_input.h"
struct sway_seat;
+struct render_context;
struct sway_seatop_impl {
void (*button)(struct s... | 3 | 1 | 0 | [{"id": "G0", "claim": "Swaybar appears to render clipped when the output has a 90-degree rotation and scale=1.5, and it does not seem to be a damage issue; later re-reported as the cursor still getting chopped off when hovering swaybar with scale=1.5 transform=90.", "category": "correctness", "verdict": "opposed", "pr... | null |
swaywm__sway__8196 | swaywm/sway | 8,196 | defect | 2e9139df664f1e2dbe14b5df4a9646411b924c66 | 0d5ccd60b98beee7c4669d3b2fce06fe7cd45380 | input_method: Split up update method | The update method was a big hammer, it did a lot of things.
- This function would recreate the scene every time the input method client commits a new buffer
Instead, we create the scene when the input method surface maps / unmaps.
When the input method is unfocused, we simply disable the scene node.
Fixes: #808... | diff --git a/include/sway/input/text_input_popup.h b/include/sway/input/text_input_popup.h
index e5f6ab8b51..d70f998749 100644
--- a/include/sway/input/text_input_popup.h
+++ b/include/sway/input/text_input_popup.h
@@ -9,11 +9,13 @@ struct sway_input_popup {
struct wlr_scene_tree *scene_tree;
struct sway_popup_desc... | 4 | 4 | 1 | [{"id": "G0", "claim": "The popup still needs to be re-constrained when its size changes, which the removed popup_surface_commit listener used to handle.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Add a small comment explaining that the popup is... | null |
swaywm__sway__8264 | swaywm/sway | 8,264 | defect | 4d4c88f0a73f6ee3da1c99355f04362ef2ad68c9 | a0507851edc1737b5feaf98c34d789ca5e6331a6 | Add null-safety check for virtual keyboard keymaps | Even though there are already many issues / prs trying to address this problem, including #6484, #6873, #6990, I still get segfaults due to null keymap pointer.
Hence, I would simply suggest to add a check before we call `xkb_keymap_num_layouts`. | diff --git a/sway/ipc-json.c b/sway/ipc-json.c
index e512a22391..8f7a734be6 100644
--- a/sway/ipc-json.c
+++ b/sway/ipc-json.c
@@ -1129,6 +1129,7 @@ json_object *ipc_json_describe_input(struct sway_input_device *device) {
json_object *layouts_arr = json_object_new_array();
json_object_object_add(object, "xkb_layo... | 2 | 1 | 1 | [{"id": "G0", "claim": "M002: the keymap==NULL early-return should use a bracketed, non-single-line if (project coding style), and returning early is wrong because libinput details still need to be added, so the keymap access should instead be made conditional; M004: a runtime NULL check is the wrong approach if NULL i... | null |
swaywm__sway__8376 | swaywm/sway | 8,376 | defect | c90cb37b2a0861548461daa9b75d75317e01b679 | 219168c7a1cbcacbb5a2956b07358ddbc7b574d6 | fix: sway crashes if switch to another workspace with surface when IME popup is shown | resolve: https://github.com/swaywm/sway/issues/8375
in pr https://github.com/swaywm/sway/pull/8196, when im_popup_surface is unmapped, author set the popup->relative to NULL, butt popup is still in popup groups, where assert the relative is not NULL, this cause the panic | diff --git a/sway/input/text_input.c b/sway/input/text_input.c
index 6bcd02341e..c57b9bbbff 100644
--- a/sway/input/text_input.c
+++ b/sway/input/text_input.c
@@ -454,9 +454,6 @@ static void handle_im_popup_surface_unmap(struct wl_listener *listener, void *da
struct sway_input_popup *popup =
wl_container_of(listen... | 4 | 3 | 2 | [{"id": "G0", "claim": "Guard the new scene_descriptor_destroy() call (a popup->desc.relative check at the call site, or an early return when no descriptor exists) so that a popup mapped while text-input has no focus does not try to free a NULL descriptor and crash.", "category": "correctness", "verdict": "supported", ... | null |
swaywm__sway__8578 | swaywm/sway | 8,578 | defect | 10e50e6bf9b63b205c141f97a5709fd4d405542f | 60d85c2fac97b1dfe0cff1cdb43060fb63a38c80 | Fix crashes on exit caused by wlroots listener checks | This PR fixes sway crashing on exit due to event listeners not being removed from wlroots objects on exit.
Listeners fixed:
- server: all objects created during `server_init()`, reworked `handle_renderer_lost()` to use an idle callback
- input/input-manager: `wlr_backend.new_input`, `wlr_virtual_keyboard`, `wlr... | diff --git a/sway/server.c b/sway/server.c
index c7fc2a6df5..92cbafd604 100644
--- a/sway/server.c
+++ b/sway/server.c
@@ -457,6 +457,28 @@ bool server_init(struct sway_server *server) {
}
void server_fini(struct sway_server *server) {
+ // remove listeners
+ wl_list_remove(&server->new_output.link);
+ wl_list_remo... | 3 | 2 | 1 | [{"id": "G0", "claim": "There should be quite a few more dangling event listeners removed in server_fini(), including server->renderer_lost which is still missing, and the reviewer asks that they be checked and added to the PR.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"... | null |
swaywm__sway__8621 | swaywm/sway | 8,621 | defect | 30434b2beb0c621015452775011426da8d5e4705 | 9b54eb2594c0d4153c1f17d49367de06886cea3a | text_input: Fix ime panic in ext-session-lock | resolve: https://github.com/swaywm/sway/issues/8620 | diff --git a/sway/input/text_input.c b/sway/input/text_input.c
index e167246712..2facbd21ec 100644
--- a/sway/input/text_input.c
+++ b/sway/input/text_input.c
@@ -10,6 +10,7 @@
#include "sway/input/text_input_popup.h"
#include "sway/layers.h"
#include "sway/server.h"
+#include <wlr/types/wlr_session_lock_v1.h>
st... | 4 | 4 | 0 | [{"id": "G0", "claim": "The comment should say that this case covers not just lock surfaces but shells in general.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Log a debug message when the focus surface is not a handled kind (any shell), with wo... | null |
swc-project__plugins__154 | swc-project/plugins | 154 | defect | 3e821137cdef465aafb933490c8b9c608c43f77b | d8db111d2de80631a25d2ffc5255f529a6fb4927 | fix(emotion): Autolabel filename label generation | Currently the filename is taken with the extension, but this should be excluded.
Fixes #153 | diff --git a/packages/emotion/transform/Cargo.toml b/packages/emotion/transform/Cargo.toml
index 07eca6cd4..16caa83fc 100644
--- a/packages/emotion/transform/Cargo.toml
+++ b/packages/emotion/transform/Cargo.toml
@@ -22,6 +22,7 @@ swc_core = { features = [
"common",
"ecma_ast",
"ecma_codegen",
+ "ecma_parser"... | 3 | 2 | 0 | [{"id": "G0", "claim": "The `ecma_parser` feature enabled on swc_core in packages/emotion/transform/Cargo.toml's [dependencies] is not used from the package and should be moved to dev-dependencies.", "category": "correctness", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The ... | null |
swc-project__plugins__156 | swc-project/plugins | 156 | defect | d1c5e6b8e1f6566d0a785613eb73ee74bdd7baf4 | 2cab67efe095ac25e41a72febcb24c670e456399 | fix(emotion): Autolabel name sanitisation | Pending #155
This ports over the label sanitisation behaviour from emotin babel plugin, which sanitises the label input. | diff --git a/packages/emotion/transform/src/lib.rs b/packages/emotion/transform/src/lib.rs
index 22df197bc..421e7e41b 100644
--- a/packages/emotion/transform/src/lib.rs
+++ b/packages/emotion/transform/src/lib.rs
@@ -81,6 +81,12 @@ static EMOTION_OFFICIAL_LIBRARIES: Lazy<Vec<EmotionModuleConfig>> = Lazy::new(||
]
... | 1 | 1 | 0 | [{"id": "G0", "claim": "The commented-out '[filename]' label replacement line left in create_label is not needed and should be removed.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
swc-project__plugins__583 | swc-project/plugins | 583 | defect | 37620d566c750a501e483bc24ff81a2e011750e1 | 0933167d3bbd1b66809dfee670e9072748d65cdd | feat(flags): Support indirect destructuring and property access patterns | ## Summary
Extends the `swc_feature_flags` build-time transformer to support multiple ways of accessing feature flags beyond direct destructuring.
**New patterns now supported:**
- ✅ Indirect destructuring: `const flags = useFlags(); const { featureA } = flags;`
- ✅ Property access: `const flags = useFlags(); if (fla... | diff --git a/.changeset/little-cherries-compete.md b/.changeset/little-cherries-compete.md
new file mode 100644
index 000000000..063077eba
--- /dev/null
+++ b/.changeset/little-cherries-compete.md
@@ -0,0 +1,5 @@
+---
+@swc/plugin-experimental-feature-flags: minor
+---
+
+feat(swc_feature_flags): Support indirect destr... | 15 | 1 | 1 | [{"id": "G0", "claim": "A feature to exclude a feature flag is not needed; the pull request should discard its exclude-related changes.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The flag object declaration is marked for removal whenever any transfor... | null |
swc-project__swc__11250 | swc-project/swc | 11,250 | defect | 527c3914fca4915578606902c455b80efdf39451 | a3ac2259d514999e7c56eeea66b4cc7586181cfb | feat(minifier): Drop empty constructors during minification | Fixes #9727
I have to update fixtures according changes:
- `crates/swc_ecma_minifier/tests/fixture`
- `crates/swc/tests/exec/issues-9xxx/9527/1`
- `crates/swc/tests/babel-exec/packages/babel-plugin-transform-classes/test/fixtures/loose/derived-constructor-must-call-super` | diff --git a/.changeset/alien-invasion.md b/.changeset/alien-invasion.md
new file mode 100644
index 0000000000000..5fb7bf2a4f4bd
--- /dev/null
+++ b/.changeset/alien-invasion.md
@@ -0,0 +1,12 @@
+---
+dbg-swc: patch
+swc: patch
+swc_bundler: patch
+swc_compiler_base: patch
+swc_core: patch
+swc_ecma_minifier: patch
+sw... | 2 | 2 | 2 | [{"id": "G0", "claim": "The pull request must not modify execution tests; all of its changes to execution tests should be reverted.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The failing execution tests mean something is wrong - there is a bug in th... | null |
swc-project__swc__11359 | swc-project/swc | 11,359 | defect | 25f3a4724d48e7fe32eebacd743f1ab623681e46 | 2c9cf0fd3e5be3797b3d7836fe470f4283a8a5ad | feat(es/parser): support `no_paren` parser option | **Description:**
There's no `ParenExpr` ast type in estree spec: https://github.com/estree/estree/blob/master/es5.md
This PR is a simple and useful implementation to eliminate the usage of `paren_remover`. | diff --git a/crates/swc_ecma_parser/src/parser/expr.rs b/crates/swc_ecma_parser/src/parser/expr.rs
index 9ad64f6ea1ba..fd112fa622a6 100644
--- a/crates/swc_ecma_parser/src/parser/expr.rs
+++ b/crates/swc_ecma_parser/src/parser/expr.rs
@@ -2416,6 +2416,11 @@ impl<I: Tokens> Parser<I> {
} => syntax_error... | 5 | 3 | 0 | [{"id": "G0", "claim": "The doc comment on paren_remover misspells \"straightforward\" as \"straight forward\".", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The one-line doc comment on TsSyntax::no_paren should be expanded to explain the behavio... | null |
swc-project__swc__11415 | swc-project/swc | 11,415 | defect | 1faa4a57454ef3932c75a1aca7dd36e37bb215d3 | f5de72d2bb0af12964f3667a533dee7ef021a18c | refactor(es/minifier): Improve tpl to str | **Description:**
- Enhance `Pure::convert_tpl_to_str` to prefer `cooked` values as much as possible.
- Improve `Str::from_tpl_raw` to return `Wtf8Atom` instead of `Atom`.
- Add more test cases.
| diff --git a/crates/swc/tests/fixture/issues-8xxx/8496/output/8.js b/crates/swc/tests/fixture/issues-8xxx/8496/output/8.js
index 6b11428c20ea..0ca16a1cbe7d 100644
--- a/crates/swc/tests/fixture/issues-8xxx/8496/output/8.js
+++ b/crates/swc/tests/fixture/issues-8xxx/8496/output/8.js
@@ -1 +1 @@
-export const use=`\xffat... | 16 | 9 | 6 | [{"id": "G0", "claim": "convert_str_value_to_tpl_cooked is redundant because Str::value and Tpl::cooked already hold the same thing, so it can just be removed.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "pre_existing"}, {"id": "G1", "claim": "force_str_for_tpl is confusing becau... | null |
swc-project__swc__11423 | swc-project/swc | 11,423 | defect | af3c2d36d772eab7905db717f8be2080fd14abec | 8bd23ac8d168b0d53d19f8a8e45c0acc9c0b7dd3 | fix(es/compat): Preserve this context in nested arrow functions | ## Summary
This PR fixes issue #11422 where `this` context was not being properly preserved in nested arrow functions within class fields when transpiling to ES2016.
## Problem
When a class field contains an arrow function with a nested arrow function, the `this` reference in the nested arrow was not being rep... | diff --git a/crates/swc_ecma_compat_es2015/src/arrow.rs b/crates/swc_ecma_compat_es2015/src/arrow.rs
index a5bcfd1c5d70..3e9cbff72e5a 100644
--- a/crates/swc_ecma_compat_es2015/src/arrow.rs
+++ b/crates/swc_ecma_compat_es2015/src/arrow.rs
@@ -135,10 +135,15 @@ impl VisitMut for Arrow {
})
... | 3 | 1 | 1 | [{"id": "G0", "claim": "Other places in arrow.rs still use the post-order ordering (converting nested arrows before hoisting `this`), an inconsistency with the reordered arrow-body handling that the reviewer questions and the author asks to fix.", "category": "correctness", "verdict": "supported", "priority": "P1", "sc... | null |
swc-project__swc__11501 | swc-project/swc | 11,501 | defect | a54eb0ef7518f759e52636162870f90233ef8532 | 81975ec29754c81e94c0dcf7390f640bad9c7d0e | feat(cli): Add --root-mode argument for .swcrc resolution | ## Summary
Adds `--root-mode` CLI argument to the `swc compile` command, matching Babel's behavior for resolving `.swcrc` configuration files.
Closes #1801
### Modes
| Mode | Behavior |
|------|----------|
| `root` (default) | Only looks for `.swcrc` at the root directory |
| `upward` | Walks upward from the file d... | diff --git a/crates/swc/src/lib.rs b/crates/swc/src/lib.rs
index 1ce2868165e0c..c906dae5609ed 100644
--- a/crates/swc/src/lib.rs
+++ b/crates/swc/src/lib.rs
@@ -491,7 +491,24 @@ impl Compiler {
_ => {
if *swcrc {
if let FileName::Real(ref path) = name {
- ... | 6 | 3 | 2 | [{"id": "G0", "claim": "The root-mode tests read back input.js (which --out-dir . overwrites in place, or which still contains '=>' uncompiled) instead of reading the actual compiled output file, so they verify the wrong artifact.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}... | null |
swc-project__swc__11769 | swc-project/swc | 11,769 | defect | 87dee576923cc85687b281bc762b9e56c26ab7c6 | c9ea5571877c2fec836b1040ac7cedd993c17164 | fix(es/typescript): Handle TypeScript expressions in enum transformation | <!-- Note: CI script will automatically rebase your PR so please do not rebase unless required -->
<!-- Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. -->
**Description:**
<!-- Explain the **motivation** for making this change. What existing... | diff --git a/crates/swc_ecma_transforms_typescript/src/transform.rs b/crates/swc_ecma_transforms_typescript/src/transform.rs
index 46746efd9298..af69bc9f5e9d 100644
--- a/crates/swc_ecma_transforms_typescript/src/transform.rs
+++ b/crates/swc_ecma_transforms_typescript/src/transform.rs
@@ -1074,17 +1074,22 @@ impl Tran... | 3 | 2 | 1 | [{"id": "G0", "claim": "Calling expr.visit_mut_with(self) on opaque enum initializers re-runs the full TypeScript transform on already-traversed expressions, which for nested enum declarations makes decl_id_record treat the nested enum as a later merge declaration and emits code without a prior var/let declaration that... | null |
swc-project__swc__11839 | swc-project/swc | 11,839 | defect | 426183b0da71621034f8be83c3794c81a34acfbd | 8a35a501ecc82058dce993c01bc724c6486f7f78 | fix(es/minifier): Avoid generating mangled property names that collide with existing properties | ## What's the problem this PR addresses?
Closes #11027.
When `jsc.minify.mangle.props` is enabled, the property mangler can rename a property in a subclass to a name that already exists as a property of a base class (or of any other object in the program), producing observable shadowing at runtime.
Minimal repro fro... | diff --git a/.changeset/fix-mangle-props-collision-11027.md b/.changeset/fix-mangle-props-collision-11027.md
new file mode 100644
index 000000000000..3876a9f02d4e
--- /dev/null
+++ b/.changeset/fix-mangle-props-collision-11027.md
@@ -0,0 +1,6 @@
+---
+swc_core: patch
+swc_ecma_minifier: patch
+---
+
+fix(es/minifier): ... | 2 | 2 | 1 | [{"id": "G0", "claim": "The review requests that complex test cases be added to cover the property-name collision avoidance introduced by this PR.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The review requests test cases that mangle lots of properti... | null |
swc-project__swc__8921 | swc-project/swc | 8,921 | defect | a9bab833ba6370a66ab8d7ac209d89ad2ea4c005 | 7a7aaf8f76976f054ddefa4c080c65b65f163ef1 | fix(es/preset-env): Consider `browserslist` config if `env.target` is not configured | <!-- Note: CI script will automatically rebase your PR so please do not rebase unless required -->
<!-- Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. -->
**Description:**
The `env.path` option in `.swcrc` was originally implemented for `bro... | diff --git a/crates/preset_env_base/src/query.rs b/crates/preset_env_base/src/query.rs
index fb2183af909ee..e023a89701980 100644
--- a/crates/preset_env_base/src/query.rs
+++ b/crates/preset_env_base/src/query.rs
@@ -1,7 +1,7 @@
//! Module for `browserslist` queries.
#![deny(clippy::all)]
-use std::collections::Has... | 5 | 1 | 1 | [{"id": "G0", "claim": "Forcing a browserslist query when no target is configured changes prerecorded test results and may not be the best approach, and the author asks whether the env.path option should be made mandatory if a browserslist config lookup is desired.", "category": "design", "verdict": "uncertain", "prior... | null |
sweeneychris__TheiaSfM__228 | sweeneychris/TheiaSfM | 228 | defect | eb3ff1876625be0db982dfab656eba5f70a376c4 | 4e5e28adf0f5303bc266f2c3bf12abea3ab25705 | Feature/six point radial distortion homography | This PR adds the six point radial distortion Homography solver proposed in:
Radial Distortion Homography, Zuzana Kukelova et al. CVPR 2015
The original Matlab / C++ implementation is taken from the authors: http://cmp.felk.cvut.cz/~hellej1/radhomo/radhomo-0.1.zip
In the paper two solvers are proposed: H5_l1l2 an... | diff --git a/include/theia/theia.h b/include/theia/theia.h
index e3b429883..f05ef780d 100644
--- a/include/theia/theia.h
+++ b/include/theia/theia.h
@@ -181,6 +181,7 @@
#include "theia/sfm/pose/relative_pose_from_two_points_with_known_rotation.h"
#include "theia/sfm/pose/seven_point_fundamental_matrix.h"
#include "t... | 4 | 4 | 0 | [{"id": "G0", "claim": "Rename isNearZero to IsNearZero to follow Google-style capitalization for function names.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "Reference and pointer symbols belong on the left-hand type, so write 'const std::vec... | null |
sweetalert2__sweetalert2-react-content__126 | sweetalert2/sweetalert2-react-content | 126 | defect | d3307602206c76cd5dfd2f6f857a3a3c38989eb1 | 111e2dc82fdb671fe563ce9336bad6c486068bcb | Use didOpen and didDestroy instead of deprecated onOpen and onDestroy | Closes #125 | diff --git a/README.md b/README.md
index ce40137..38920cd 100644
--- a/README.md
+++ b/README.md
@@ -37,7 +37,7 @@ const MySwal = withReactContent(Swal)
MySwal.fire({
title: <p>Hello World</p>,
footer: 'Copyright 2018',
- onOpen: () => {
+ didOpen: () => {
// `MySwal` is a subclass of `Swal`
// wit... | 1 | 1 | 1 | [{"id": "G0", "claim": "The PR is totally broken with sweetalert2 version < 10.3.0, because it unconditionally uses the didOpen/didDestroy hooks that those versions do not support.", "category": "correctness", "verdict": "supported", "priority": "P0", "scope": "introduced"}] | null |
sweetalert2__sweetalert2__1347 | sweetalert2/sweetalert2 | 1,347 | defect | b30a265c52a7c6e5b24c8d38efe08d62a9b7ad1a | f9a48170a5d7368c5c65185839d9919f8a880133 | New feature for specifying custom container class | As discussed in #1244 this adds a `customContainerClass` parameter to specify a customer class for swal2 container element.
One possible use case could be to apply custom positioning to the swal in order to display a swal inside a target element. | diff --git a/src/toasts.scss b/src/toasts.scss
index 139a0cd2b..b17a6a81e 100644
--- a/src/toasts.scss
+++ b/src/toasts.scss
@@ -1,7 +1,6 @@
body {
&.swal2-toast-shown {
.swal2-container {
- position: fixed;
background-color: transparent;
&.swal2-shown {
diff --git a/src/utils/params.js b/... | 4 | 3 | 0 | [{"id": "G0", "claim": "The new customContainerClass param should be placed next to the related customClass param in defaultParams.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The positioning tests should use SwalWithoutAnimation instead of r... | null |
sweetalert2__sweetalert2__1379 | sweetalert2/sweetalert2 | 1,379 | defect | f76808ef4876a2f0602a4da04a07223e0e8c5821 | c48300ca79184acdf6e13bb5cea00f4d86a14264 | Breaking change: close() as instance method | Closes #919
I noticed the TODO comment on: https://github.com/sweetalert2/sweetalert2/blob/f76808ef4876a2f0602a4da04a07223e0e8c5821/src/instanceMethods/_main.js#L46
and I took the opportunity of the fix for issue #919 to refactor `close()` as instance method.
I also removed the aliases `closeModal()` and `clo... | diff --git a/src/instanceMethods.js b/src/instanceMethods.js
index d4046e164..b6fa508b0 100644
--- a/src/instanceMethods.js
+++ b/src/instanceMethods.js
@@ -1,6 +1,8 @@
export * from './instanceMethods/hideLoading.js'
export * from './instanceMethods/getInput.js'
+export * from './instanceMethods/close.js'
export * ... | 3 | 3 | 2 | [{"id": "G0", "claim": "closeModal and closeToast were not deprecated, so removing them would be an unexpected breaking change and they should be kept.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Please add a test proving that the desired functionalit... | null |
sweetalert2__sweetalert2__1403 | sweetalert2/sweetalert2 | 1,403 | defect | a1bd5e9e719208c7b47f5a42784c1a99893f72da | 71eb292d660dfa96c644ce73ed1222c5a6a6e520 | Fix for preConfirmValue check preConfirmPromise | Closes #1402
Currently the check on `preConfirmValue` is done on a _falsy_ value:
https://github.com/sweetalert2/sweetalert2/blob/ca9d19724b85b79f217a461ef24e013a7e081718/src/instanceMethods/_main.js#L104
This check considers also 0 as _falsy_, which could actually be a valid return value.
Replacing this w... | diff --git a/src/instanceMethods/_main.js b/src/instanceMethods/_main.js
index 7d2a7ea04..94498cb24 100644
--- a/src/instanceMethods/_main.js
+++ b/src/instanceMethods/_main.js
@@ -101,7 +101,7 @@ export function _main (userParams) {
if (dom.isVisible(domCache.validationMessage) || preConfirmValue === fals... | 1 | 1 | 1 | [{"id": "G0", "claim": "The test added in this PR is not verifying the expected behavior from #1402 and passes even without the change made in _main.js, so it should be rewritten to follow TDD: fail without the fix, then pass with it.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduc... | null |
sweetalert2__sweetalert2__1411 | sweetalert2/sweetalert2 | 1,411 | defect | 6ce085300f96457390e00c47fa5c9bb2d95fec37 | 058a8cd0a51e81da17a7fe07345f027fa4409adf | Added new SCSS variables for input and progress steps | Closes #1405
### Added the following SCSS variables:
Input:
* `$swal2-input-background`
Progress steps:
* `$swal2-progress-steps-background`
* `$swal2-progress-steps-padding`
* `$swal2-progress-steps-font-weight`
A single step in progress steps block:
* `$swal2-progress-steps-width`
* `$swal2-... | diff --git a/src/sweetalert2.scss b/src/sweetalert2.scss
index c34b85591..51d05b898 100644
--- a/src/sweetalert2.scss
+++ b/src/sweetalert2.scss
@@ -476,6 +476,7 @@ body {
transition: border-color .3s, box-shadow .3s;
border: 1px solid $swal2-input-border;
border-radius: $swal2-input-border-radius;
+ ... | 3 | 3 | 1 | [{"id": "G0", "claim": "The checkbox does not render well with the new $swal2-input-background-color (the author is not happy with how the checkbox looks).", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The variable's ending should match the CSS property... | null |
sweetalert2__sweetalert2__1414 | sweetalert2/sweetalert2 | 1,414 | defect | 6ce085300f96457390e00c47fa5c9bb2d95fec37 | c8ecede5a267548837c84deaeb545eb7aaf155fd | Adding `scrollbarPadding` parameter | Default value: `true`. When set to `false` no padding is added to the `body` if the scrollbar is present.
To implement that, the `fixScrollbar()` is called only if the `scrollbarPadding` is `true`. There is no need to add similar check before calling `undoScrollbar()`, even though it would be cleaner code.
On a... | diff --git a/src/utils/openPopup.js b/src/utils/openPopup.js
index e84856a0f..f8796b198 100644
--- a/src/utils/openPopup.js
+++ b/src/utils/openPopup.js
@@ -45,7 +45,7 @@ export const openPopup = (params) => {
}
if (dom.isModal()) {
- fixScrollbar()
+ if (params.scrollbarPadding) { fixScrollbar() }
i... | 1 | 1 | 1 | [{"id": "G0", "claim": "The `@default` annotation for the new `scrollbarPadding` parameter in sweetalert2.d.ts is a copy-paste typo and should read `true` instead of `false`.", "category": "documentation", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
sweetalert2__sweetalert2__165 | sweetalert2/sweetalert2 | 165 | defect | b7a6a0dec56323c5de4342e907f00e5290d8f3ac | e3a524b64066730497b91fdfb1b58008bf011533 | Add queue() method for chaining modals. | Related to https://github.com/limonte/sweetalert2/issues/160 and https://github.com/limonte/sweetalert2/issues/125
Usage example:
``` js
swal.setDefaults({
confirmButtonText: 'Next >',
showCancelButton: true,
animation: false
});
var steps = [
{title: 'Step 1', text: 'Chaining swal2 modals is easy'},
'Step... | diff --git a/src/sweetalert2.js b/src/sweetalert2.js
index 2f8a309c0..7a96bc8d9 100644
--- a/src/sweetalert2.js
+++ b/src/sweetalert2.js
@@ -717,6 +717,25 @@ function sweetAlert() {
return modalDependant.apply(this, args);
}
+/*
+ * Global function for chaining sweetAlert modals
+ */
+sweetAlert.queue = function(... | 3 | 1 | 1 | [{"id": "G0", "claim": "The new queue() implementation calls swal(steps[i]), but 'swal' is not defined in that scope of src/sweetalert2.js, so it should use the defined in-module identifier instead.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The... | null |
sweetalert2__sweetalert2__1655 | sweetalert2/sweetalert2 | 1,655 | defect | 58564bc0ddf014c01fd928d4331e473ecff610ec | dbb0e5dfbeb3001d1f5b6a5fa1b0ace72cd36abc | Get rid of DISPOSE_SWAL_TIMEOUT | Fixes #1654
I moved `disposeSwal()` to `removePopupAndResetState()`. @gverni let me know if I'm missing some use-cases.
No tests are failing after removing `DISPOSE_SWAL_TIMEOUT` so either we don't have that functionality covered by tests or everything is well without `DISPOSE_SWAL_TIMEOUT`.
@gverni please tak... | diff --git a/src/constants.js b/src/constants.js
index 5bb0991b5..fda0d51e6 100644
--- a/src/constants.js
+++ b/src/constants.js
@@ -1,2 +1 @@
export const RESTORE_FOCUS_TIMEOUT = 100
-export const DISPOSE_SWAL_TIMEOUT = 36000
diff --git a/src/instanceMethods/close.js b/src/instanceMethods/close.js
index 92a49fca3..24... | 3 | 2 | 2 | [{"id": "G0", "claim": "The PR removes the disposal delay without adding a test, so accessing Swal.getInput() shortly after the promise resolves fails depending on timing (the inner properties are disposed too early), and a failing test showing the input's classList changing should be added to the PR.", "category": "co... | null |
sweetalert2__sweetalert2__1985 | sweetalert2/sweetalert2 | 1,985 | defect | a2f2f5a3dd4602d241db8bb7f2e9c4df2f85e362 | b2d8adfa38d50a59c0bce7b98d1835ad428b49ea | feat(input/select): add support to <optgroup> in inputOptions | In order to enable input type 'select' to have the possibility of configuring group of options `<optgroup />`now it is possible to pass ass `inputOptions` a nested object like this:
```
{
apples: 'Apples',
'Bananas': {
prata: 'Prata',
nanica: 'Nanica',
... | diff --git a/cypress/integration/methods/input.spec.js b/cypress/integration/methods/input.spec.js
index 23d42dd40..6cd780891 100644
--- a/cypress/integration/methods/input.spec.js
+++ b/cypress/integration/methods/input.spec.js
@@ -94,6 +94,44 @@ describe('Input', () => {
Swal.clickConfirm()
})
+ it('input ... | 1 | 1 | 0 | [{"id": "G0", "claim": "Revert the changes made to test/sandbox.html.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
sweetalert2__sweetalert2__1998 | sweetalert2/sweetalert2 | 1,998 | defect | 12fbea0312ff3293b19d2e0e137e2aa53cd27e84 | 3818c29388ed6616179ee40a81f9dfe2e68a8acd | feat: add support for objects containing toPromise method | Closes #1982. | diff --git a/src/instanceMethods/buttons-handlers.js b/src/instanceMethods/buttons-handlers.js
index aa244e2e0..86b234a2a 100644
--- a/src/instanceMethods/buttons-handlers.js
+++ b/src/instanceMethods/buttons-handlers.js
@@ -1,6 +1,7 @@
import { isVisible } from '../utils/dom/domUtils.js'
import { getInputValue } fro... | 3 | 3 | 0 | [{"id": "G0", "claim": "The `toPromise` member of the new `Promisify<T>` interface does not need to be declared `readonly`.", "category": "design", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The `Promisify<T>` type should be inlined into `SyncOrAsync<T>` since it is only us... | null |
sweetalert2__sweetalert2__2112 | sweetalert2/sweetalert2 | 2,112 | defect | 8fb96249c9cec72f989dcc319c819b1ff304dcb8 | 967179a7b328a7fe831cc0aec479c64453b097de | Add declarative templates support | Closes #2111
The initial version of declarative templates. The idea is to add the `<template>` support which will be fully backward compatible with existed API so users will be able to use `<template>` + all existed API params, API params will have higher priority.
The declarative <template> of the popup. All AP... | diff --git a/cypress/integration/params/template.spec.js b/cypress/integration/params/template.spec.js
new file mode 100644
index 000000000..4f96f66bf
--- /dev/null
+++ b/cypress/integration/params/template.spec.js
@@ -0,0 +1,63 @@
+import { $, Swal, SwalWithoutAnimation, isVisible, isHidden } from '../../utils'
+
+des... | 11 | 8 | 4 | [{"id": "G0", "claim": "The template should support essentially every option that does not take a function as an argument (each option should be checked for whether it makes sense in the template), and the docs should show an example template with all possible elements and attributes.", "category": "design", "verdict":... | null |
sweetalert2__sweetalert2__2121 | sweetalert2/sweetalert2 | 2,121 | defect | 455b0db0caef340417155c70cdc3a65af62bf975 | 0fc1013c618b83e48356e250c1d6818a6fb10050 | Fix resizing popup when resizing textarea | Fixes #2120 | diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml
index 53d65b260..a1d3a8812 100644
--- a/.github/workflows/coverage.yml
+++ b/.github/workflows/coverage.yml
@@ -4,6 +4,7 @@ on:
push:
branches:
- master
+ - full-test/**
schedule:
- cron: '0 3 * * *'
diff --git a... | 1 | 1 | 0 | [{"id": "G0", "claim": "The padding-width computation added in renderInput.js is similar to code in 2 locations, so consider refactoring to remove the duplication.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
sweetalert2__sweetalert2__2122 | sweetalert2/sweetalert2 | 2,122 | defect | f1837b3ab5e458a69919dfe175b5d018c82b9df0 | 0cf8cfcaf5eac08a11621d810c05a44f47dc9385 | Add ability to trigger popups declaratively: Swal.bindClickHandler() | Closes #2118
```html
<button data-swal-template="#hello-world-alert">Click me!</button>
<button data-swal-toast-template="#hello-world-alert">Click me for a toast!</button>
<template id="hello-world-alert">
<swal-title>Hello world!</swal-title>
<swal-html>Here I come...</swal-html>
</template>
<scr... | diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml
index a1d3a8812..29d975a2d 100644
--- a/.github/workflows/coverage.yml
+++ b/.github/workflows/coverage.yml
@@ -5,6 +5,7 @@ on:
branches:
- master
- full-test/**
+ - feat/bindClickHandler
schedule:
- cron: '0 3... | 2 | 2 | 1 | [{"id": "G0", "claim": "The S1 implementation may fire more than one alert for a single click because a match in chechEventPath only breaks its inner for loop while the outer loop over clickHandlers keeps going, and the helper-based implementation is overcomplicated.", "category": "correctness", "verdict": "supported",... | null |
sweetalert2__sweetalert2__852 | sweetalert2/sweetalert2 | 852 | defect | 9cd4c4e5aeb3ca56f2bc864db02a88c0f4f09318 | 190da34477226ba6a2030e3f6ae3976af393b593 | Implement FOOTER | Closes #850 | diff --git a/src/sweetalert2.js b/src/sweetalert2.js
index 627838189..e51895b7e 100644
--- a/src/sweetalert2.js
+++ b/src/sweetalert2.js
@@ -82,6 +82,7 @@ const setParameters = (params) => {
const confirmButton = dom.getConfirmButton()
const cancelButton = dom.getCancelButton()
const closeButton = dom.getClose... | 1 | 1 | 1 | [{"id": "G0", "claim": "The .d.ts should be updated with getFooter() and the footer param to cover the new API this PR adds.", "category": "documentation", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
sweetalert2__sweetalert2__873 | sweetalert2/sweetalert2 | 873 | defect | 5ca73227dc62ed32ba7a9a245d1174b14c949ca6 | fe88c06509cff4c7aebd2328794f08d1f42e1123 | Allow backdrop to accept string CSS color as a parameter | Fixes #864 | diff --git a/src/sweetalert2.js b/src/sweetalert2.js
index c867aedfd..6238f9b06 100644
--- a/src/sweetalert2.js
+++ b/src/sweetalert2.js
@@ -87,7 +87,9 @@ const setParameters = (params) => {
title.innerHTML = params.title.split('\n').join('<br />')
}
- if (!params.backdrop) {
+ if (params.backdrop && typeof... | 4 | 4 | 2 | [{"id": "G0", "claim": "The backdrop should be applied via style.background instead of style.backgroundColor, so full CSS background values (e.g. url(...) or color plus extra layers) can be used.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The params.... | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.