Code Monkey home page Code Monkey logo

emblor's Introduction

Hi there. I'm Jaleel ๐Ÿ‘‹

Junior Cloud Engineer | Full Stack Devloper

I enjoy working on challenging projects and I'm passionate about web design, automation, and building scalable solutions/applications

My Tech Stack

  • TypeScript, Javascript, Python, Go
  • React. js, Next.js
  • Tailwind, Figma
  • Prisma, MySQL, PostgreSQL
  • Docker, Github Actions, AWS, Terraform, Ansible

While most of my repositories are currently private, I'm actively working on making more of my projects public for the community to benefit from.

emblor's People

Contributors

aryanprince avatar bhaleraosaurabh avatar garnerp avatar github-actions[bot] avatar jaleelb avatar lp-francois avatar maros-o avatar rohmanhm avatar wenwei-lin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

emblor's Issues

Issue on mobile devices

When tag-input is the last input field in shadcn form we can enter tags as the button is submit but when it's not the last input the button is tab (to go to the next input), so we can't submit and no tag is entered.

Inline tags show horizontal in input

You recently implemented the inline tags (which look awesome), but it would be best, if there was an option to have the tags show horizontally in the input, like the image attached. Thanks :)

image

No gap between tags and input

With enableAutocomplete = true and inlineTags = false, there is no gap between the tags and the input. Maybe this is due to an update to shadcn.

Is there a good fix?

image

[bug]: Autocomplete broken (even in docs demo) - popover does not appear while typing

Describe the bug

I expect the autocomplete popover to appear as soon as I start typing, but it doesn't. I'm on latest (1.4.4). failure is created by minimal reproduction with only required props enableAutocomplete={true} and autocomplete options like so

  const autocompleteOptions = [
    { id: "1", text: "outdoor" },
    { id: "2", text: "indoor" },
    { id: "3", text: "level 1" },
    { id: "4", text: "level 2" },
    { id: "5", text: "east" },
    { id: "6", text: "south" },
    { id: "7", text: "west" },
    { id: "8", text: "north" },
  ];

How to reproduce

Check the demo example, the autocomplete popup does not appear. https://emblor.jaleelbennett.com/api-reference

Link to reproduction

https://github.com/JaleelB/emblor

Additional information

No response

[feat]: Allow keyboard โ†‘โ†“ to select autocomplete suggestion

Feature description

Currently, when working with the autocomplete variant, the user needs to use their mouse to select a suggestion.

It would be nice to be able to โ†‘โ†“ between them.

Additional Context

Additional details here...

Before submitting

  • I've made research efforts and searched the documentation
  • I've searched for existing issues and PRs

Vite bundling error

I'm having trouble using emblor in a Remix (vite) project. Getting the following errors:

In the vite dev server:

[vite] Error when evaluating SSR module {filepath}/form.tsx: failed to import "emblor"

In the browser:

Named export 'SortableItem' not found. The requested module 'react-easy-sort' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:

import pkg from 'react-easy-sort';

I believe vite is supposed to automatically convert commonJS modules but it's not playing nice in this case. Any pointers?

add npm i uuid

First I used this its awesome. second, you forgot to put npm i uuid in docs ... I got this error while using it

`className` doesn't get applied to the `input` element properly

Class name attributes are not getting applied at all

Example:

    <TagInput
      placeholder={placeholder}
      tags={tags}
      className="bg-red-500"
      setTags={setTags}
      activeTagIndex={activeTagIndex}
      setActiveTagIndex={setActiveTagIndex}
    />
image

The red bg should be applied to the input

UI issue with inline tags

I saw you recently implemented the inline tags, and when I tried to implement it in my app, I got this styling issue.
image

Tag Shapes Property - Rounded vs Pill

Summary

Hey, just wanted to point out that the pill shape buttons and rounded shape buttons in the UI components seem to be swapped. I could be totally wrong, but I thought I'd ask if that's what you intended. I'd like to make a PR for this if this was unintentional :)

Possible solution

In the shape property for the tag-input.tsx component, rounded could be rounded-lg and pill could be rounded-full, like the image I found online on the right:

image image

Current screenshots from demo website:

Rounded (for shadcn-tag-input):

image

Pill (for shadcn-tag-input):

image

Inline tags

Add the ability for the tags to appear in the input field, similar to the image attached below

image

Inline tags - Remove tag when backspace key pressed

@JaleelB : One handy feature I can think of right now is if we press backspace in the input field that should have removed the last tag and so on, what do you say? May be one additional prop removeOnBackspace: boolean will do the trick.

Thank you!

[bug]: TypeError: Cannot read properties of undefined (reading 'filter') after upgrading to version 1.4.2

Describe the bug

After upgrading from version 1.4.0 to 1.4.2 of the emblor library, my application crashes with the following error:

TypeError: Cannot read properties of undefined (reading 'filter')

How to reproduce

  1. Install version 1.4.2 of the emblor library.
  2. Set up a React component with the following code:
import { Tag, TagInput } from "emblor";
import { useState } from "react";

function App() {
  const [tags, setTags] = useState<Tag[]>([]);
  const [activeTagIndex, setActiveTagIndex] = useState<number | null>(null);
  return (
    <main className="flex flex-col items-center justify-center h-screen">
      <p>Tag input:</p>
      <TagInput
        tags={tags}
        setTags={(newTags) => setTags(newTags)}
        placeholder="Add a tag"
        styleClasses={{
          input: "w-full sm:max-w-[350px]",
        }}
        activeTagIndex={activeTagIndex}
        setActiveTagIndex={setActiveTagIndex}
      />
    </main>
  );
}

export default App;
  1. Run the application.

Expected Behavior:
The application should run without errors, and TagInput component should work as expected.

Actual Behavior:
The application crashes with the following error:

TypeError: Cannot read properties of undefined (reading 'filter')

Link to reproduction

https://github.com/riadhmouamnia/emblor-bug

Additional information

Upon inspecting the console, the error seems to be related to the filtering of tag.text. The relevant code snippet causing the error is:

reactExports.useMemo(() => _ ? f.filter((d) => _(d.text)) : f.filter((d) => d.text.toLowerCase().includes(O.toLowerCase())), [O, f, _])

Screenshots:
image

It appears that the filter function is being called on an undefined value, potentially due to an issue with the tag.text property filtering.

Environment:

  • React version: 18.3.1
  • React DOM version: 18.3.1
  • emblor version: 1.4.2
  • tailwindcss: 3.3.2
  • vite: 4.3.9

[bug]: emblor showcount not working with enableAutocomplete option

Describe the bug

Screenshot 2024-08-06 165818

Here in the Autocomplete component setState function which is responsible for updating the count with "setTagCount" is not passed?

Screenshot 2024-08-06 170113
Screenshot 2024-08-06 170436

So when "toggleTag" function is triggered by onClick event from option that is not updating the tagCount.

Screenshot 2024-08-06 162412

For this issue when i am clicking options from the select options it's not updating the count.

Screenshot 2024-08-06 162525

On the other hand, when i am removing those that time "setTagCount" is updating, but as is deducting count going to a minus figure.

Screenshot 2024-08-06 162819

How to reproduce

  1. import { TagInput } from 'emblor'
  2. Pass showCount and enableAutocomplete options as true

Link to reproduction

https://github.com/JaleelB/emblor/tree/main

Additional information

No response

Feature request: Autocomplete Overflow

Currently the autocomplete shows all existing tags, the list can become very long.

It would be perfect to use autocomplete in an overflow. Perhaps even in a popover so that other elements underneath are not moved too far.

Great work and many thanks

React hook form

Please add the ability to use the register object directly with the input, so that we can validate them with React Hook form

Autocomplete suggestions are muted and unclickable?

Tried using the autocomplete, this is from the props section.

image

<TagInput
      placeholder="Enter a topic"
      tags={autocompleteTags}
      enableAutocomplete
      restrictTagsToAutocompleteOptions
      autocompleteOptions={autoCompleteOptions}
      className="sm:min-w-[450px]"
      setTags={(newTags) => {
          setAutocompleteTags(newTags);
      }}
  />

Can you remove console.logs?

Describe the bug

There's a console log for styling that is polluting my console.

console.log('styling: ', styleClasses);

How to reproduce

  1. Added values to styleClasses
  2. View the console

Link to reproduction

N/A

Additional information

No response

Disabled prop accepted but not implemented

The tag input has the disabled prop but giving the prop does not disable the input or the tags. Even with the disabled prop given, it is possible to remove or add tags.

2024-06-29.21-29-42.mp4

Draggable - UX suggestion

Hey!
First off, great contribution to OSS.

I have a minor feature that could be cool to implement for the draggable tags.
When dragging between each tag, it would increase the UX if there was some sort of visual cue (other than the dragging icon), indicating that they can be dragged.

An idea I have in mind is that when you drag a tag over another, the stationary tag moves out of the way, indicating that the dragged tag can be dropped. Maybe also add a slight bg-color to further visualize that it can be dropped there.

Example of the tag moving out of the way:
https://react-beautiful-dnd.netlify.app/iframe.html?id=board--simple

Kind regards

Copy/Paste to create multiple tags at ones

Feature description

Hello โœŒ๐Ÿฝ,

I was wondering if its possible to copy/paste a bunch of strings, comma sepatated, and make emblor create multiple tags, instead of just 1.

Do you think this can be made somehow?

Thanks!

Additional Context

Additional details here...

Before submitting

  • I've made research efforts and searched the documentation
  • I've searched for existing issues and PRs

license info

hey,

awesome work - could you provide a license to the project?

Auto complete options

Feat: Prevent tags from being added if they are not in the autocomplete options or implement new functionality for this scenario

Autocomplete feature not working properly

I've noticed that the autocomplete is not working properly. After the second character input, all the options disappear. I've been trying to debug this issue, but so far, I haven't had any luck in identifying the root cause.

Any guidance or suggestions would be greatly appreciated.

Despite this issue, I find the tool very useful and appreciate the effort put into developing it.
Thanks a lot.

No styling for Clear All button

Currently, there is no styling provided for the Clear All button, and, I believe for the submit button (I've encountered users being confused with the useability and so use a FormDescription to indicate to them).

Providing more options for styling along with documentation would help adopt different use cases.

PS: This is my first time opening a proper issue, so apologies if it's lacking content. However I'm actively using this project in my clients websites and would love to contribute.

Autocomplete suggestions aren't clickable and don't always appear

I'm running into the same issue as #19, where autocomplete suggestions aren't clickable. The solution in that issue didn't work for me.

Additionally, I don't see any autocomplete suggestions when the name of a tag is partially typed, but then the autocomplete panel is opened.

image

Thanks for the great repo and the help :)

Closing of Tag Popover when clicking outside

Hi,
Great component.

I just can'd to figure out how to close the Tag Popover when clicking outside the selection box. Do you know how to achiev it?

For example, in the first example in https://emblor.jaleelbennett.com/api-reference it is only possible to close the popover by clicking the down arrow, which is anoying and not very user friendly.

I think it migh be missing adding the PopoverClose from Radix UI library. This is suggested in https://stackoverflow.com/questions/77144813/how-to-close-radix-shadcn-popover-from-inside-of-it

thank out

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.