VGalaxies commented on code in PR #741:
URL:
https://github.com/apache/hugegraph-toolchain/pull/741#discussion_r3566237496
##########
hugegraph-hubble/hubble-fe/src/modules/navigation/Item/index.js:
##########
@@ -77,6 +77,16 @@ const Item = props => {
);
res.push(content);
}
+ const reasons = [...new Set(listData
+ .filter(item => item.disabled && item.reason)
+ .map(item => item.reason))];
+ if (reasons.length > 0) {
+ res.push(
+ <div className={style.reason} role='status'
key='disabled-reason'>
Review Comment:
**Medium: Prevent the disabled reason from overflowing the fixed navigation
row**
`hugegraph-hubble/hubble-fe/src/modules/navigation/Item/index.js:85`
**Evidence**
- The parent navigation container remains fixed at 230px. The module header
consumes 60px, four button rows nearly consume the remaining height, and the
newly appended 160px-wide reason wraps onto additional lines.
**Impact**
- Loading or unavailable Dashboard states make the operations column
overflow and visually jump outside the navigation row.
**Requested fix**
- Reserve stable space for the reason or allow the parent row to grow and
align its children without vertical overflow.
##########
hugegraph-hubble/hubble-fe/src/modules/analysis/QueryBar/ContentCommon/index.js:
##########
@@ -152,6 +153,8 @@ const ContentCommon = props => {
maxLength={48}
value={favoriteName}
onChange={onChangeFavoraiteName}
+ status={favoriteName && !isValidFavoriteName(favoriteName)
Review Comment:
**Medium: Explain why an invalid favorite name is blocked**
`hugegraph-hubble/hubble-fe/src/modules/analysis/QueryBar/ContentCommon/index.js:156`
**Evidence**
- Invalid input only receives a red `status` and disables submission. The
newly localized `favorite_name_rule` and `isFavoriteName()` validator are
unused outside unit tests.
**Impact**
- Users cannot determine which characters are permitted or how to correct
the name.
**Requested fix**
- Render the localized validation message for invalid input, preferably
through `Form.Item` with `isFavoriteName()`, and assert it in the component
test.
##########
hugegraph-hubble/hubble-fe/src/modules/analysis/QueryBar/ContentCommon/index.js:
##########
@@ -139,7 +140,7 @@ const ContentCommon = props => {
e => {
const favoriteName = e.target.value;
setFavoriteName(favoriteName);
- favoriteName ? setDisabledFavorite(false) :
setDisabledFavorite(true);
+ setDisabledFavorite(!isValidFavoriteName(favoriteName));
Review Comment:
**Medium: Apply favorite-name validation to every editor**
`hugegraph-hubble/hubble-fe/src/modules/analysis/QueryBar/ContentCommon/index.js:143`
**Evidence**
- The analysis and algorithm execution-log creation and rename forms still
enable submission for any nonempty value and call the same
`gremlin-collections` endpoints. The backend applies the same
`COMMON_NAME_PATTERN` to all these requests.
**Impact**
- Names such as `query-name` are blocked in the query bar but still
submitted and rejected from four other favorite-management flows.
**Requested fix**
- Reuse `isValidFavoriteName` or `isFavoriteName` in both analysis and
algorithm log creation and rename forms, with tests for each distinct flow.
##########
hugegraph-dist/scripts/dependency/known-dependencies.txt:
##########
@@ -348,6 +348,7 @@ kerby-xdr-1.0.1.jar
kerby-xdr-2.0.0.jar
kotlin-stdlib-1.6.20.jar
kotlin-stdlib-common-1.5.31.jar
+kotlin-stdlib-common-1.6.20.jar
Review Comment:
**High: Add the new dependency version to the packaged LICENSE**
`hugegraph-dist/scripts/dependency/known-dependencies.txt:351`
**Evidence**
- The dependency checker only compares JAR names against this allowlist,
while `release-docs/LICENSE` lists `kotlin-stdlib-common:1.5.31` only, and
`hugegraph-dist/pom.xml` copies that LICENSE unchanged into the release archive.
**Impact**
- CI can pass while the distributed third-party inventory omits the bundled
`kotlin-stdlib-common:1.6.20`.
**Requested fix**
- Add the Apache-2.0 `org.jetbrains.kotlin:kotlin-stdlib-common:1.6.20`
entry to `hugegraph-dist/release-docs/LICENSE`, retaining 1.5.31 because both
versions remain present.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]