Skip to content

Top right search bar not functioning correctly #3861

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
curiouslaw opened this issue Sep 1, 2024 · 2 comments · Fixed by #3865
Closed

Top right search bar not functioning correctly #3861

curiouslaw opened this issue Sep 1, 2024 · 2 comments · Fixed by #3865
Assignees
Labels
P1 A high priority bug; for example, a single project is unusable or has many test failures type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@curiouslaw
Copy link

curiouslaw commented Sep 1, 2024

In the top right search bar, I got this buggy behaviours:

  1. When the bar is empty, it always showing hint text of Loading screen...
  2. When I type search query and click enter, it won't show the result page, but it will refresh the page instead
  3. When I make the browser width smaller, the search bar won't resize it's width correctly

Interestingly, all these buggy behaviours don't happen in freezed documentation page, where it only consist of one method

*might be related with #3859

@srawlins
Copy link
Member

srawlins commented Sep 3, 2024

Thanks for the report; on what pages do you see this buggy behavior?

@curiouslaw
Copy link
Author

No worries. I think this happens in almost all of the pub.dev API reference page (e.g., for flutter_bloc documentation page).

The freezed documentation page with one method which I mention before is a rare exception.

srawlins added a commit to srawlins/dartdoc that referenced this issue Sep 3, 2024
The library sidebars on container (e.g. Class), top-level variable, top-level
function, and typedefs were totally busted, as a result of
d629e1e.

Fixes dart-lang#3859 and fixes
dart-lang#3861.

The fix is to allow a Library's `canonicalModelElement` to be it's canonical
library, instead of `null`. This involves adding a few checks for "am I
calculating something for a Library?" and moving some "is this library
considered public" logic out of `Element.hasPrivateName` and into
`ModelElement.isPublic`. That corrects the issue of an exported Class's (for
example) enclosing element's URI, for the search results.

Once all of that is fixed, we also correct the `aboveSidebarPath`
implementation for a few elements, to point to the _canonical_ library's
sidebar path.

This fix highlights an issue with wildcard-variables, so one test is newly
marked as failing.
@srawlins srawlins added type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) P1 A high priority bug; for example, a single project is unusable or has many test failures labels Sep 3, 2024
@srawlins srawlins self-assigned this Sep 3, 2024
srawlins added a commit to srawlins/dartdoc that referenced this issue Sep 3, 2024
The library sidebars on container (e.g. Class), top-level variable, top-level
function, and typedefs were totally busted, as a result of
d629e1e.

Fixes dart-lang#3859 and fixes
dart-lang#3861.

The fix is to allow a Library's `canonicalModelElement` to be it's canonical
library, instead of `null`. This involves adding a few checks for "am I
calculating something for a Library?" and moving some "is this library
considered public" logic out of `Element.hasPrivateName` and into
`ModelElement.isPublic`. That corrects the issue of an exported Class's (for
example) enclosing element's URI, for the search results.

Once all of that is fixed, we also correct the `aboveSidebarPath`
implementation for a few elements, to point to the _canonical_ library's
sidebar path.

This fix highlights an issue with wildcard-variables, so one test is newly
marked as failing.
srawlins added a commit to srawlins/dartdoc that referenced this issue Sep 3, 2024
The library sidebars on container (e.g. Class), top-level variable, top-level
function, and typedefs were totally busted, as a result of
d629e1e.

Fixes dart-lang#3859 and fixes
dart-lang#3861.

The fix is to allow a Library's `canonicalModelElement` to be it's canonical
library, instead of `null`. This involves adding a few checks for "am I
calculating something for a Library?" and moving some "is this library
considered public" logic out of `Element.hasPrivateName` and into
`ModelElement.isPublic`. That corrects the issue of an exported Class's (for
example) enclosing element's URI, for the search results.

Once all of that is fixed, we also correct the `aboveSidebarPath`
implementation for a few elements, to point to the _canonical_ library's
sidebar path.

This fix highlights an issue with wildcard-variables, so one test is newly
marked as failing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 A high priority bug; for example, a single project is unusable or has many test failures type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants