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

Use consistent naming conventions #4032

Merged
merged 2 commits into from
Oct 6, 2023
Merged

Use consistent naming conventions #4032

merged 2 commits into from
Oct 6, 2023

Conversation

janette
Copy link
Member

@janette janette commented Oct 2, 2023

QA Steps

  • Visit the dkan menu
  • Confirm the link to metastore config is "Metastore settings" to be consistent with Datastore settings, and Data Dictionary settings.

@@ -89,7 +89,7 @@ public function buildForm(array $form, FormStateInterface $form_state) {

$form['html_allowed_properties'] = [
'#type' => 'checkboxes',
'#title' => $this->t('Properties that allow HTML'),
'#title' => $this->t('Dataset properties that allow HTML'),
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we consider distribution properties other referenced entity properties also dataset properties? That was the reason I used just "properties"

Copy link
Member Author

Choose a reason for hiding this comment

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

Why are we listing every property, most of these should never have html allowed.

Copy link
Contributor

Choose a reason for hiding this comment

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

We actually aren't listing every property - only string properties. But DKAN prides itself on swappable schemas, so we cannot hardcode assumptions about what the properties are.

Copy link
Member Author

Choose a reason for hiding this comment

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

Not suggesting we hardcode anything, just be more specific where html could be useful. Can this config be put into the *.ui.json files?

Copy link
Member

Choose a reason for hiding this comment

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

@janette that's an interesting idea. The thing is this would apply for harvests and API posts as well, so it's not exactly intuitive that such config would live in the ui schema... but in theory we could check it and allow HTML in any text area fields, or add a property to the UI schema like allowHTML. Hmmm....

Copy link
Contributor

Choose a reason for hiding this comment

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

I would say this would be a different ticket; the one I was working stored the configuration as a Drupal configuration setting. You could re-write it to be part of the schema, but as Dan said it would need to work for harvests and API posts which don't really use the ui schema.

Copy link
Member

Choose a reason for hiding this comment

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

Yeah. And I think "dataset" is appropriate here, we are showing the dataset and including other schemas within it but they are all really experienced as part of the dataset tree.

@@ -27,4 +27,4 @@ metastore.data_dictionary.settings_form:
description: Data-Dictionary Settings
parent: metastore.data_dictionary
route_name: metastore.data_dictionary.settings
weight: 2
Copy link
Contributor

Choose a reason for hiding this comment

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

If updating the menu, you'll need to add a post update hook.

Copy link
Member Author

Choose a reason for hiding this comment

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

I think anyone updating code is familiar with clearing cache afterwards.

@dafeder dafeder merged commit f285310 into 2.x Oct 6, 2023
12 checks passed
@dafeder dafeder deleted the rename-link branch October 6, 2023 19:33
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.

None yet

3 participants