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

Initialize a new advanced metadata field for tags #389

Merged
merged 16 commits into from
Mar 11, 2020

Conversation

ashmaroli
Copy link
Member

@ashmaroli ashmaroli commented May 21, 2017

Inspired by #380

  • create and delete tags
    • create new tags by pressing comma key ,
    • delete a tag by clicking on the x
  • prevent creating duplicate tags
  • also create tags with spacebar or Enter
  • delete the last tag with Backspace
  • Update metadata spec suite
  • Add autocomplete suggestions
    • Update API to enable requesting site.tags
    • update frontend to render a list of suggestions for new tags

@gsantner
Copy link

@ashmaroli Is this still a WIP or will this get discarded?

@ashmaroli
Copy link
Member Author

@gsantner its still in WIP.. waiting for the API to mature enough to easily facilitate get on the array of site.tags.
This won't be discarded. Something will eventually come out of the hat.. 😃

  - disable converting associated value-field to 'list' type
  - filter suggestions based on input value
  - misc. css adjustments
@mertkahyaoglu mertkahyaoglu self-requested a review March 8, 2020 18:47
Copy link
Member

@mertkahyaoglu mertkahyaoglu left a comment

Choose a reason for hiding this comment

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

This is an awesome feature 😍 Great job.

Just have a few comments.

@@ -21,6 +21,7 @@ export class MetaObject extends Component {
let type = 'simple';
if (_.isObject(value)) type = 'object';
if (_.isArray(value)) type = 'array';
if (_.isArray(value) && key === 'tags') type = 'simple';
Copy link
Member

Choose a reason for hiding this comment

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

Could you extract these conditions into a method which returns type given value?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good idea. Will handle this in a separate PR..

@ashmaroli
Copy link
Member Author

This feature lacks one thing currently: there's no way to select existing tag..
So was thinking of importing the MultiSelect component from react-widgets.. 🤷‍♂️

@mertkahyaoglu
Copy link
Member

That could be done in another pr maybe another release. This is quite enough IMO.

@ashmaroli ashmaroli merged commit cb1eb78 into jekyll:master Mar 11, 2020
@ashmaroli ashmaroli deleted the tags-input branch March 11, 2020 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants