Skip to content

Scala3doc: Added filters for default keywords #10155

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

Merged

Conversation

grzegorz-bielski
Copy link
Contributor

@grzegorz-bielski grzegorz-bielski commented Nov 3, 2020

scala3doc is inserting data into HTML in form of a data attribute for keywords such as override, lazy .etc. Based on that we are building the UI component for filtering by those criteria. The said component didn't support filtering by values that are missing special data keywords.

I'm not sure if there is any ticket for that. Pinging @romanowski

Main change

  • added support for filtering by default keywords

Extras

  • refactored a bit the FE code a, added JSDoc with type annotations that could be interpreted by TS
  • updated the links and commands in the scala3doc README

Copy link
Member

@dottybot dottybot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello, and thank you for opening this PR! 🎉

All contributors have signed the CLA, thank you! ❤️

Commit Messages

We want to keep history, but for that to actually be useful we have
some rules on how to format our commit messages (relevant xkcd).

Please stick to these guidelines for commit messages:

  1. Separate subject from body with a blank line
  2. When fixing an issue, start your commit message with Fix #<ISSUE-NBR>:
  3. Limit the subject line to 72 characters
  4. Capitalize the subject line
  5. Do not end the subject line with a period
  6. Use the imperative mood in the subject line ("Add" instead of "Added")
  7. Wrap the body at 80 characters
  8. Use the body to explain what and why vs. how

adapted from https://chris.beams.io/posts/git-commit

Have an awesome day! ☀️

@grzegorz-bielski grzegorz-bielski force-pushed the scala3doc/btns-for-default-values branch 5 times, most recently from 3526045 to c1edd88 Compare November 4, 2020 15:07
Copy link
Contributor

@romanowski romanowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally LGTM I left one minor suggestion.

Thank you for contribution!

project scala3doc
```

When in the `scala3doc` project in `sbt`, use the following commands to generate documentation for this project and for Dotty, respectively:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Imho we should suggest using:

scala3doc/generateSelfDocumentation
scala3doc/generateScala3Documentation

@romanowski
Copy link
Contributor

I think @TheElectronWill shoudl take a look as well.

isElementVisible(elementData, filter) {
if (!this._areFiltersFromElementSelected(elementData, filter)) {
return false;
return !areFiltersFromElementSelected()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpicking: I'm not a fan of negative ternary conditions when unnecessary - Otherwise LGTM 😃

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm planning on streamlining the logic after adding some integration tests - this is more complicated that it should be, not only here, but for now - it works. ^^

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok! if it works now and will be streamlined later then all good, we can merge as soon as the tests finish

@grzegorz-bielski
Copy link
Contributor Author

@romanowski, @TheElectronWill I added tests

@TheElectronWill
Copy link
Contributor

Is something wrong with the check pipelines ? 🤔

@grzegorz-bielski grzegorz-bielski force-pushed the scala3doc/btns-for-default-values branch from 1712491 to 8ecdcca Compare November 9, 2020 08:15
@grzegorz-bielski
Copy link
Contributor Author

@TheElectronWill I tried rebasing on top of newest master - it didn't help. Also seems like collaborators are getting a different set of PR checks than non-collaborators. I see that we have the same issue here as well: #10170

@romanowski romanowski force-pushed the scala3doc/btns-for-default-values branch from 8ecdcca to 2ca6b36 Compare November 9, 2020 17:16
@romanowski
Copy link
Contributor

@grzegorz-bielski this was caused by our config for CI for scala3doc only changes. Now, we've changed it so all tests will be run. I've updated your PR (change hash on last commit) to retrigger all the tests

@romanowski romanowski force-pushed the scala3doc/btns-for-default-values branch from 2ca6b36 to 5f7d2b8 Compare November 10, 2020 08:55
@romanowski romanowski merged commit aaec84d into scala:master Nov 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants