Skip to content
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

Add automation for linting and code gen for Extension package #3146

Merged
merged 86 commits into from
Apr 7, 2022

Conversation

SpencerWBarnes
Copy link
Contributor

@SpencerWBarnes SpencerWBarnes commented Feb 1, 2022

Add JSDoc tags:

  • @extensions to indicate items in the Extension API
  • @preview to indicate new Extension APIs that are still in progress

Add lint rule to enforce Extension API items being @public, optional parameter to include other acceptable tags such as @preview
Add workflow to generate the Extension API by generating the Extension package's index.ts and index.d.ts files and Frontend's ExtensionRuntime.ts

@aruniverse
Copy link
Member

Could we get DISABLE_ESLINT_PLUGIN working as documented here, or are we too far behind on upstream CRA? https://create-react-app.dev/docs/advanced-configuration

Our fork does allow for this. I thought we were using this in a few places already

@williamkbentley
Copy link
Member

@williamkbentley did this change recently or has it been this way for a while?

I wasn't aware of rush build:ci, so the docs build has been using rush build.

@paulius-valiunas
Copy link
Contributor

Could we get DISABLE_ESLINT_PLUGIN working as documented here, or are we too far behind on upstream CRA? https://create-react-app.dev/docs/advanced-configuration

Our fork does allow for this. I thought we were using this in a few places already

oh man... I see we're using DISABLE_ESLINT everywhere but not DISABLE_ESLINT_PLUGIN. Maybe that's why it's still acting up. We should probably change that and remove the fake .eslintrc files from test apps.

@SpencerWBarnes SpencerWBarnes requested review from a team and hnn0003 as code owners April 6, 2022 19:06
Copy link
Member

@calebmshafer calebmshafer left a comment

Choose a reason for hiding this comment

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

LGTM!

Especially after @aruniverse reverts his prettier changes ;)

@aruniverse aruniverse enabled auto-merge (squash) April 6, 2022 21:16
@kckst8
Copy link
Contributor

kckst8 commented Apr 7, 2022

@iTwin/itwinjs-core-display, @iTwin/itwinjs-core-presentation - mind approving, assuming you're satisfied

pmconne
pmconne previously requested changes Apr 7, 2022
Copy link
Member

@pmconne pmconne left a comment

Choose a reason for hiding this comment

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

I asked, regarding the new tags:

I'd like to see this documented somewhere. Perhaps in docs/learning/guidelines/release-tags-guidelines.md.

@johnnyd710
Copy link
Contributor

This branch does generate the extension api using that tag. @extensionApi defaults to adding as a type but it is added as value if the item is an enum or the tag is @extensionApi REAL

Great. I'd like to see this documented somewhere. Perhaps in docs/learning/guidelines/release-tags-guidelines.md.

@pmconne @calebmshafer mentioned the plan is to hold off on documentation until 3.2 when we have broader extension docs. An issue has been created and added to the backlog so we don't forget.

@pmconne
Copy link
Member

pmconne commented Apr 7, 2022

@johnnyd710 I am not asking for full-blown or finalized documentation. You have introduced some new tags which you expect developers to use correctly. Please tell developers how to use them correctly.

@calebmshafer
Copy link
Member

@johnnyd710 I am not asking for full-blown or finalized documentation. You have introduced some new tags which you expect developers to use correctly. Please tell developers how to use them correctly.

@pmconne I'd advise mentioning the @extensions as a minimum, please don't mention @preview yet. Although until we have full docs, I don't really expect any devs to be adding that tag.

@kckst8
Copy link
Contributor

kckst8 commented Apr 7, 2022

@iTwin/itwinjs-core-ui - last but not least to approve :-)

@aruniverse aruniverse merged commit 155b8d6 into master Apr 7, 2022
@aruniverse aruniverse deleted the spencer/extension-code-gen branch April 7, 2022 20:56
pmconne added a commit that referenced this pull request Apr 20, 2022
* 3.2.0-dev.27

* Presentation: Clarify `onlyIfNotHandled` attribute (#3418)

* Clarify `onlyIfNotHandled` attribute

* Reword `onlyIfNotHandled` attribute's description

* Fix overlay map layers that were displayed at the wrong elevation (#3394)

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* Fix framebuffer resize issue that causes WebGL errors (#3406)

* Work around framebuffer resize issues that can cause WebGL errors.

* Should check for viewRect size change in rendersToScreen setter.

* revert protected change

* rush change

* Add test for this specific problem.

* rush extract-api

* 3.2.0-dev.28

* 3.1.0 changelogs (#3440)

Co-authored-by: imodeljs-admin <[email protected]>

* Create a pipeline to run core tests on ios  (#3345)

* Introduce a pipeline for running core units tests on ios using SwiftUI.
* Add processAppCenterLogs script for uploading test result files
* Add the runMocha.js to initiate the tests and add docs on process.
* Setup nightly trigger for the iOS testing

* Update native addon version in pbxproj to match master.

* Add setting to auto-collapse unpinned widget panels (#3439)

* Add ability to auto collapse unpinned widget panels

* rush change

* extract-api again

* Add camera paths to display-test-app (#3365)

* Add camera paths to display-test-app

* Fix a bug causing camera path to not load properly when changing iModels in display-test-app

* Fix a bug causing orientation of a tilting camera path to not be recorded properly

* Add mention of unsupported global coordinates in camera paths

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* 3.2.0-dev.29

* Improve RealityTile loading priority calculation (#3373)

* Improve RealityTile loading priority calculation

* extract-api

* rush change

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* Improve support for WMS  server 1.1.1 (#3444)

* Improved support for WMS 1.1.1 servers.

* changelog

* Removed .only in tests.

* Renamed variable '_json' to 'json'

* API extract.

* Request next animation frame when selection set changes (#3450)

* fix map-layers peer deps (#3447)

Co-authored-by: Arun George <[email protected]>

* 3.1.1 changelogs (#3454)

Co-authored-by: imodeljs-admin <[email protected]>

* Shader variants for unquantized vertex tables (#3445)

* switch back to unquantized vertex tables for decoration graphics.

* technique flag for unquantized vs quantized positions.

* Unquantized technique variants.

* update early z flags.

* propagate position type to vertex shader builder.

* don't bother updating unused uniform

* additional vertex data

* read unquantized positions.

* color

* edge

* polyline

* surface.

* Turn on unquantized vertex tables for decorations.

They mostly don't draw properly or at all. Point strings look like they work.

* typo

* adjust expected vertex size

* Choose unquantized shaders where appropriate.

* Remove spurious assertion - will fail if previous mesh produced no graphics.

* remove u_qOrigin/Scale from shaders that don't need them.

* further cleanup of shader code.

* further cleanup of shader code.

* Fix unquantized vertex read for WebGL 1. (#3456)

* 3.2.0-dev.30

* Reality tile priority on zoom target (#3459)

* Use target center when it exist instead of screen center to compute reality tilles loading priority

* Use wheel event as the only target point and check that it is recent enough

* Apply suggestions

* Rush change

* 3.2.0-dev.31

* 3.2.0-dev.32

* 3.2.0-dev.33

* Added missing properties concerning additional transform paths in GeographicCRS (#3465)

* Added missing properties concerning additional transform paths in GeographicCRS

* fixed lint errors

* extract-api

* rush change

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* 3.2.0-dev.34

* Presentation: Initialize schemas preloading on Presentation.initialize (#3467)

* Configure schemas preloading on Presentation.initialize

* rush change

* rush extract-api

* Fix OOM error stemming from dynamic import of a very large object (backport #3471) (#3473)

Co-authored-by: Arun George <[email protected]>
Co-authored-by: Arun George <[email protected]>

* 3.2.0-dev.35

* Fix blank rendering when dropping and immediately re-adding the same viewport (#3472)

* Do not update canvas dimensions if 0. Resolves an issue with a black rendering when a viewport is dropped and re-added with the same dimensions.

* rush change

* New datum grid file formats identifiers (#3475)

* Added two grid file formats

* extract-api

* rush change

* Restore Mobile Authorization (#3474)

* Restore authorization in MobileHost.

* Fix ios Display Test App (#3354)

* electron-authorization in display-test-app/ios/backend.config.js needs to have 'null-loader'

* Fix electron import and webpack config in display-test-app.

* Disable sign-in for mobile in display-test-app.

* 3.2.0-dev.36

* 3.1.2 changelogs (#3488)

Co-authored-by: imodeljs-admin <[email protected]>

* Move iOS Testing Resources to tools/internal (#3461)

* Move iOS Testing Resources to tools/internal.

* Add automation for linting and code gen for Extension package (#3146)

Co-authored-by: kckst8 <[email protected]>
Co-authored-by: johnnyd710 <[email protected]>
Co-authored-by: Arun George <[email protected]>

* 3.2.0-dev.37

* Added documentation for BingMaps and MapBox. (#3492)

* Added documentation for BingMaps and MapBox.

* Added Azuremaps format, fixed typo.

* Update MapLayerFormatRegistry.ts

* change log

* api-extract

Co-authored-by: Paul Connelly <[email protected]>

* Fix MSAA hang for Mali-G71 and Mali-G76 GPUs (#3499)

* 3.2.0-dev.38

* Add ability to pass overrides to UiItemsManager (#3462)

* Add ability to pass overrides to UiItemsManager

* Updates to unit testing and to filter duplicates at UiItemsManager level.

* updates unit tests

* extract-api

* rush change

* Add documentation for new feature.

* fix warning seen when running unit test

* fix linting errors

* Remove static register method from new UiItemsProviders

* update provider registration in ui-test-app

* Allow apps to delay registration of the UiItemsProviders,
So they can be registered with overrides.
Default initilization behaves the same.

* Lint errors

* Change registerUiItemsProvider to accept an object.

Co-authored-by: NancyMcCallB <[email protected]>

* 3.2.0-dev.39

* 3.2.0-dev.40

* Change Map-layers extension code owners (#3502)

* Use iTwinUI-react components to get consistent styling. (#3482)

* Use iTwinUI-react components to get consistent styling.

* Fixed bug with elevation correction control.

* change log.

* No longer override default button styling

* Fine tune eye-icon position in sublayer tree.

* fine tune eye checkbox style.

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* 3.2.0-dev.41

* Fix jumpy view zoom on touch devices (#3498)

* Remove inertia from view touch handling as soon as zoom is detected

Previously required another event for inertia to be removed and not
re-added. If touches ended before then, inertia would cause the view
to incorrectly pan after a zoom gesture.

* Properly handle touch count change in

Previously if a touch was removed and re-added without a touch
move event in between, the change in touch count would go
undetected. In pinch-lift one finger-pinch scenario that caused
zoom to be calculated from first pinch start position, causing zoom
jumps at the start of the second pinch.

* rush change

* rush extract-api

* Add RPC operations, "getCustomViewState3dData", "hydrateViewState" to minimize back and forth communication between frontends and backends (#3326)

* WIP

* Create defaultviewcreator on backend

* Rename DefaultViewcreator->ViewcreatorHelper

* rename to viewcreatorhelper

* compress modelids before sedning them to getDefaultViewStateData

* use compressed set

* remove two helper functions which now exist on backend

* Add options object to rpc instead of modelids

* add 3d to the name of the viewhelper

* More renames, SerializedViewStateprops - > DefaultViewState3dProps, remove 'helper' name

* Initial commit of viewstatehydrater

* properly handle promises in viewstatehydrater

* Mark defaultviewstate3dcreator as internal

* add some comments

* comments

* rush lint

* pass hydrate props to preload/postload

* put body on separate line from conditional to match coding guidelines

* add newline after closing brace

* spacing

* more coding guidelines

* Rename DefaultViewState3dCreator to CustomViewState3dCreator

* extract-api

* Missed file change for extract-api

* change

* use only one viewStateLoadprops for entire hydrate request

* Dont throw error, log error

* dont use preload postload in modelselectorstate

* check for baseModelId differently

* more if statement separation

* Use the same "missing" in the subcategoriescache for both preload and postload

* don't recalculate missing, don't use hydrate in modelselectorstate

* extract-api

* add tests for viewcreator3d

* add a test making sure that long get requests work

* missed a if on same line as code

* rush change

* remove .only

* wip

* Mock hydrateViewState for appui-react tests

* rush change

* add docs-group-description

* 3.2.0-dev.42

* add excluded advisory (#3513)

* Cleanup imodel transformer test app (#3514)

- use typed yargs instead of manually specifying the type and casting
- remove electron dependency and use new node cli auth client
- don't sign in when using a cached briefcase
- clean up readme to stop recommending `--long-arg=value` and instead recommend `--long-arg value`

* UI: Tool Settings updates (#3519)

* Add "No tool settings" message to docked tool settings.

* First pass animation.

* Move tool settings bar animation to
layout package to avoid animating overflow panel.

* Respect the animateToolSettings state variable

* Final cleanup of tool settings animations and tests.

* Update animation time per UX team.

* Update snaps and api docs after merge.

* rush change

* manual fix to api doc

* Merge remote-tracking branch 'origin/master' into ui/react-icons

Co-authored-by: bsteinbk <[email protected]>

* Bug fix for hydrateViewState (#3518)

* 3.2.0-dev.43

* Add "getMassPropertiesPerCandidate" RPC operation (#3366)

* Added IModelReadRpcInterface function to get mass properties for multiple elements with a single request.

* Renamed the new getMassProperties rpc method.

* extract-api

* changelog

* IModelReadRpcInterface version bump

* Added integration test for getMassPropertiesPerCandidate RPC method

* rush change for the integration test

* Added docks provided by @bbastings

* Removed 1000 candidate limit, getting mass properties in parallel, and added public method

* Documentation note for getMassProperties on when to use getMassPropertiesPerCandidate.

* rush extract-api

* rush change

* Catch all Parasolid severe errors

* Fix pickers styling to align (#3523)

* 3.2.0-dev.44

* Add some tests for subcategories (#3524)

* 3.1.3 changelogs (#3530)

Co-authored-by: imodeljs-admin <[email protected]>

* Read pixel improvements (#3504)

* Add conditions to skip onMotionSnap events

* Reuse ReadPixel resources when possible

* Remove test code

* Remove the move distance criterion to skip a read pixel call

* Add maxOnMotionSnapCallPerSecond tool setting

* Fix typo in createOrReuseReadPixelResources comment

* Force onMotionSnap on ToolAdmin button down

* Move the end of motion detection in the onMotion function

* Add a maximum size to reusable resources in ReadPixel

* rushchange and api extract

* Implement PolyfaceBuilder.addSweptIndexedPolyface (#3527)

* implement PolyfaceBuilder.addSweptIndexedPolyface

* attempt to silence docs build error

* make getEdgeIndices private

* remove bangs

* 3.2.0-dev.45

* 3.2.0-dev.46

* @bentley/imodeljs-native 3.2.4

* lint

* 3.2.0-dev.47

* 3.2.0-dev.48

* @bentley/imodeljs-native 3.2.6

* lint

* Account for orthographic view points in ViewState3d.lookAtGlobalLocation (#3535)

* ViewState3d.lookAtGlobalLocation should account for orthographic view points.

* rush change

* Fix UI 1.0 bug were widgets defined by providers did not honor the Center Zone position (#3534)

* Honor Center ZoneLocations from itemproviders when in UI1.0 mode.

* Add example of setting up widgets to hide in show properly in both UI1  and UI1.

* lint

* bad module

* 3.2.0-dev.49

Co-authored-by: imodeljs-admin <[email protected]>
Co-authored-by: Grigas <[email protected]>
Co-authored-by: Michel D'Astous <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: markschlosseratbentley <[email protected]>
Co-authored-by: Seamus Kirby <[email protected]>
Co-authored-by: Daniel Toby <[email protected]>
Co-authored-by: Bill Steinbock <[email protected]>
Co-authored-by: TitouanLeDuigou <[email protected]>
Co-authored-by: Arun George <[email protected]>
Co-authored-by: Arun George <[email protected]>
Co-authored-by: AlainRobertAtBentley <[email protected]>
Co-authored-by: Saulius Skliutas <[email protected]>
Co-authored-by: Spencer Barnes <[email protected]>
Co-authored-by: kckst8 <[email protected]>
Co-authored-by: johnnyd710 <[email protected]>
Co-authored-by: NancyMcCallB <[email protected]>
Co-authored-by: Eimantas Morkūnas <[email protected]>
Co-authored-by: nick4598 <[email protected]>
Co-authored-by: Michael Belousov <[email protected]>
Co-authored-by: MindaugasButkus <[email protected]>
Co-authored-by: dassaf4 <[email protected]>
Co-authored-by: Bill Goehrig <[email protected]>
Co-authored-by: Michael Belousov <[email protected]>
Co-authored-by: Colin Kerr <[email protected]>
Co-authored-by: DStradley <[email protected]>
Co-authored-by: Akshay Nangare <[email protected]>
Co-authored-by: Robert Lukasonok <[email protected]>
Co-authored-by: christophermlawson <[email protected]>
Co-authored-by: Caleb Shafer <[email protected]>
Co-authored-by: MarcBedard8 <[email protected]>
Co-authored-by: GerardasB <[email protected]>
Co-authored-by: williamkbentley <[email protected]>
Co-authored-by: MarcNeely <[email protected]>
Co-authored-by: Paulius Valiūnas <[email protected]>
Co-authored-by: bbastings <[email protected]>
Co-authored-by: AJMigliore <[email protected]>
Co-authored-by: Travis Cobbs <[email protected]>
Co-authored-by: mgooding <[email protected]>
Co-authored-by: Alina Paliulionytė <[email protected]>
Co-authored-by: Alina Paliulionyte <[email protected]>
Co-authored-by: Martynas <[email protected]>
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.

10 participants