Open kirisakow opened 4 months ago
@kirisakow Thanks for working on this. Coincidentally, I've also been working on a new column type (for users/groups) at: https://github.com/nextcloud/tables/pull/1090. Maybe the files and feedback I'm getting over there helps :smile:
@kirisakow While working on https://github.com/nextcloud/tables/pull/1090, I wrote down some notes of files I potentially had to change/add. I think not everything is applicable here, but might be helpful:
src/shared/components/ncTable/mixins/columnsTypes
, we create a new column type that specifies:
src/shared/components/ncTable/mixins/magicFields.js
, we specify if the new column fits any particular magicfieldsrc/shared/components/ncTable/mixins/filters.js
, we specify if the new column should be shown for any particular filtersrc/shared/components/ncTable/mixins/columnParser.js
, we specify that this new column is validsrc/shared/components/ncTable/mixins/columnHandler.js
, add the column and subtypes if anysrc/modules/modals/EditColumn.vue
and src/modules/modals/CreateColumn.vue
, specify how to handle column creation and editingsrc/modules/main/partials/ColumnFormComponent.vue
, add the columnsrc/modules/main/partials/ColumnTypeSelection.vue
, add icon and text that will appear when user initially chooses a column typesrc/shared/constants.js
, specify new column typesrc/shared/components/ncTable/mixins/columnClass.js
, maybe add Abstract columnsrc/shared/components/ncTable/mixins/columnHandler.js
, add datatypesrc/shared/components/ncTable/mixins/columnParser.js
, add typesrc/shared/components/ncTable/mixins/metaColumns.js
, maybe add meta typesrc/shared/components/ncTable
, add new TableCell component file for rendering the type in the table.src/shared/components/ncTable/partials/columnTypePartials/forms
, add a new Form component that will be inserted into the create/edit form when we try to create a new column for this new type. Will have to create this for subtypes toosrc/shared/components/ncTable/partials/rowTypePartials
, add a new Form component that will be inserted into the create/edit form when we try to create a new row for this new type. Will have to create this for subtypes too, if there are anylib/Service/ColumnService.php
, specify propertieslib/Service/ColumnTypes
, add a new column typelib/Service/TableTemplateService.php
lib/Controller/ColumnController.php
the properties for new typelib/Controller/ApiColumnsController.php
lib/ResponseDefinitions.php
lib/Capabilities.php
appinfo/routes.php
lib/Controller/Api1Controller.php
lib/Db/ColumnTypes
lib/Db/LegacyRowMapper.php
lib/Db/Row2Mapper.php
lib/Db
lib/Helper/ColumnsHelper.php
lib/Migration
most especially lib/Migration/Version000000Date20210921000000.php
and lib/Migration/Version000700Date20230916000000.php
lib/Service/ImportService.php
src/types/openapi/openapi.ts
tests/integration/features/APIv2.feature
openapi.json
@enjeck Thank you for the input, that was of much help!
I assume development is now finished for the
Still, a few TODOs remain — like things I wasn't sure about:
src/shared/components/ncTable/mixins/columnsTypes/textIPv4Address.js
src/shared/components/ncTable/mixins/columnsTypes/textIPv6Address.js
textAllowedPattern
;* probably nothing to do about OpenAPI or migrations, as this feature merely adds two subtypes to the existing text
type.
Hello there, Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.
We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.
Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6
Thank you for contributing to Nextcloud and we hope to hear from you soon!
This is an attempt to respond to issue #402 (and #981) by implementing
TextIPv4Address
andTextIPv6Address
column types that are compatible with both text and numericFilterIds
(all nine of them), thanks to natural sort.This is my first PR on this project, so please feel free to kindly point out anything I may have missed or done wrong.