autocompete with ajax

Is possible use autocompete plugin with ajax? For data load from server, something like this (but not woking):
$.ajax({
    url: $this.attr('data-url'),
    method: 'post',
    data: {
         city: $this.val()
    },
    dataType: 'json',
   success: function (res) {
          if (res != false) {
                $this.autocomplete({
                     data: res
                });
          }
     }
});

create pull request https://github.com/Dogfalo/materialize/pull/3541

Here's another approach #3423 I've been thinking about. :smile: It's more general and moves custom logic outside of the component.
I'm not very fond of the solution using "classes" and I'd like to rework it in terms of simple functions some day. But I didn't have feedback yet, so didn't want to work advance any further without knowing if it's acceptable.

@Ketcap send you an email

This is so very necessary! The current autocomplete feature is incomplete. And the other options I've seen, including https://icefox0801.github.io/materialize-autocomplete/ , don't quite do it either.
Unlike a select (which can accommodate both a database id and visible value ... as in <option value="51234">Blahblah</option> ... the current autocomplete only shows the visible value, making it relatively useless for async database queries.

@neokio exactly. What we need is an implementation like this: https://www.devbridge.com/sourcery/components/jquery-autocomplete/

I came up with something that works pretty great. It requires jquery.auto-complete.min.js and jquery.auto-complete.css from https://github.com/Pixabay/jQuery-autoComplete ... which is beautifully coded, and only requires 3.4k.
Let's say you want an autocompleted city search input that shows the city name but returns the city_id ...
HTML:

			<input type="hidden" name="city_id" value="">
			<input id="city_autoselect" name="city_autoselect" type="text">
			In which city do you live?

JS:
	$('#city_autoselect').autoComplete({
		source: function(term, response){
			$.getJSON('/path/to/search.php', { q: term }, function(data){ response(data); });
		},
        renderItem: function (item, search){
            // escape special characters
            search = search.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
            var re = new RegExp("(" + search.split(' ').join('|') + ")", "gi");
            return '
' + item[1].replace(re, "$1") + '
';
        },
		onSelect: function(e, term, item){
			$('#city_id').val( item.data('id') );
		}
	});

(The renderItem is almost identical to the default, just added [0] to the item. If, like me, you will only ever do this kind of autocomplete, you can just add [0] to the source code, and omit the renderItem from the JS call above.)
PHP:
	require '/path/to/requires.php';

	$res = [];
	$sql = $db->query("SELECT `id`,`name` FROM `cities` WHERE `name` LIKE '%". safeGET($_GET['q']) ."%' LIMIT 10");
	while ($r = $sql->fetch()) {
		$res[] = [$r['id'],$r['name']];
	}
	echo json_encode($res);

(Basically the PHP just outputs a JSON array like [[255,'New York'], [1261,'New Orleans'], [8212,'Neward'], ...]. Be sure to replace safeGET() with your own injection proofing methods.)

+1 for asynchronous data sources

check that code https://github.com/Dogfalo/materialize/pull/3694

@dellert Your modification to the existing Autocomplete Plugin is really amazing, but wouldn't it be better if instead of changing the existing plugin, you make another autocompleteajax function that can be used for ajax purposes and the normal ajaxcomplete function can be used for autocomplete purposes only. This way the existing code written using the autocomplete function wont have to be altered and would also ensure the backwards compatibility for versions 0.97.7 and below.
So basically adding your plugin just below the existing plugin (autocomplete) with different name like autocompleteajax
You also wont have to remove the existing Markup in forms.html file, but only add the documentation for the new plugin. You get the gist.

@aashay0101 the term "ajax" is pretty much not used anymore. Also, many projects do not rely on jQuery's $.ajax function either. For example, with Meteor, the data source is from a Collection, using subscriptions.
Personally, I would see this kind of API instead of the proposed one :
$('#city_autocomplete').autoComplete({
  datasource: {
    query: function (term) {
      return someFunctionReturningPromise('cities', term);
    }
  },
  renderItem: function (item, search){
    // escape special characters
    search = search.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
    var re = new RegExp("(" + search.split(' ').join('|') + ")", "gi");
    return '
' + item[1].replace(re, "$1") + '
';
  },
  onSelect: function(e, term, item){
    $('#city_id').val( item.data('id') );
  }
});

Returning a Promise implementation is becoming a standard, and even jQuery has implemented it since version 1.5, and now it is using the normalized PromiseA implementation. Promises have the advantage of better handling asynchronous errors, and may be chained (no callback hell). And, since a promise is always returned, it does not matter if the resolved value is synchronous or asynchronous.
Bottom line is, do not use "ajax" anymore; we don't use much XML anymore for asynchronous communications :stuck_out_tongue:

@yanickrochon If you go through @dellert 's implementation it would break the websites which use the .autocomplete implementation, my suggestion was to separate both of them so that users can use any one of them depending on the need.

@aashay0101 so, you base your suggestion to have 2 essentially same functionality components on a conflicting PR? Usually, PRs follow and address issues, not the other way around. Meaning that, before accepting a PR, one should discuss the issue.
In this case, a PR was made, and it is, de facto, not approved until it actually resolve all the concerning issues. And, in that sense, I say that

having two different components, essentially duplicating the functionality of each other, is not only redundant, but undesired in a framework
relying on the term "ajax" is not only limiting, but a bat design pattern; where features should not be based on a technology, but a functionality. The functionality, now, is to have asynchronous data not that the component should necessarily make the actually HTTP requests.

Therefore, the exact same component can be utilized for both situations seamlessly.
Synchronous data
Providing data locally, using plain old JSON (i.e. an Object) (also, see #3586)
$('input.autocomplete').autocomplete({
  data: {
    "Apple": null,
    "Microsoft": null,
    "Google": ...
  }
});

Where searching the input will simply gather results from the locally provided data. The actual underlying implementation can use a Promise, or not, it is irrelevant in the functionality.
Asynchronous data
For example, using Meteor and subscriptions
$('input.autocomplete').autocomplete({
  datasource: {
    query: function (term) {
      return new Promise(function (resolve) {
        Subs.subscribe('brands', term);
        Subs.onReady(function () {
          var data = {};
          Brands.find().forEach(function (brand) {
            data[ brand.name ] = null;
          });
          resolve( data );
        });
      });
    }
  }
});

Searching will update the autocomplete dropdown when the Promise is resolved with the subscribed documents (ex. ordered by relevance on the server). The idea of datasources can even be applied to, in fact, returned ordered lists of relevancy, and decouple that responsibility from Materialize. (Or Materialize could provide a basic datasource that would do the job...)
Mixed data
Why not?
$('input.autocomplete').autocomplete({
  data: {
    "Apple": null,
    "Microsoft": null,
    "Google": 'http://placehold.it/250x250'
  },
  datasource: {
    query: function (term) {
      return new Promise(function (resolve) {
        Subs.subscribe('brands', term);
        Subs.onReady(function () {
          var data = {};
          Brands.find().forEach(function (brand) {
            data[ brand.name ] = null;
          });
          resolve( data );
        });
      });
    }
  }
});

Both synchronous and asynchronous data can simply be merged and update the autocomplete dropdown. This can be done in a smart way.
Conclusion
There is no need for two exact same components, especially when everything can preserve BC with no drawbacks. This feature can simply be a drop-in functionality in an application, which will require minimal refactor and trivial changes.

so, I rewrite and set better my autocomplete. But I will not create pull request, will use it just for my projects. If you don't want add normal  functionallity to your plugin, I'm very sorry.

Besides, materialize has many many troubles in functionallity and usage, but materialize developers ignore patches and pull requests from another programmers

Why did you close this issue? The idea is good.

@yanickrochon because I found that materialize developers ignore patches and pull requests from another programmers:) I they want, they add self functional for this

@yanickrochon So, if you need, you can just replace autocomplete code with my:
/**************************
 * Auto complete plugin  *
 *************************/
$.fn.autocomplete = function (options) {
    // Defaults
    var defaults = {
        data: {},
        ajax: {},
        callback: null,
        delay: null,
        minLength: 2
    };

    options = $.extend(defaults, options);

    return this.each(function() {
        var $input = $(this);
        var data = options.data,
            $inputDiv = $input.closest('.input-field'); // Div to append on

        // Create autocomplete element
        var $autocomplete = $('

');

        // Append autocomplete element
        if ($inputDiv.length) {
            $inputDiv.append($autocomplete); // Set ul in body
        } else {
            $input.after($autocomplete);
        }

        var highlight = function(string, $el) {
            var img = $el.find('img');
            var matchStart = $el.text().toLowerCase().indexOf("" + string.toLowerCase() + ""),
                matchEnd = matchStart + string.length - 1,
                beforeMatch = $el.text().slice(0, matchStart),
                matchText = $el.text().slice(matchStart, matchEnd + 1),
                afterMatch = $el.text().slice(matchEnd + 1);
            $el.html("" + beforeMatch + "" + matchText + "" + afterMatch + "");

            if (img.length) {
                $el.prepend(img);
            }
        };

        var timer;

        // Perform search
        $input.on('keyup', function (e) {
            if($(this).val().length > options.minLength) {
                // Send ajax request
                if (timer){
                    clearTimeout(timer);
                }

                timer =  setTimeout(function() {
                    if(!$.isEmptyObject(options.ajax)) {
                        $.ajax({
                            url: options.ajax.url,
                            method: options.ajax.method,
                            data: {
                                data: $input.val(),
                                ajax_data: options.ajax.data
                            },
                            dataType: options.ajax.dataType,
                            error: options.ajax.error,
                            beforeSend: function(jqXHR, settings) {
                                options.ajax.beforeSend ? options.ajax.beforeSend(jqXHR, settings) : null;
                            },
                            success: function(res) {
                                data = res;

                                // If wanna work with response result
                                if(options.callback != null) {
                                    options.callback(res);
                                }
                            }
                        });
                    }

                    // Capture Enter
                    if (e.which === 13) {
                        $autocomplete.find('li').first().click();
                        return;
                    }
                }, options.delay);
            }

            var val = $input.val().toLowerCase();
            $autocomplete.empty();

            // Check if the input isn't empty
            if (val !== '') {
                $.each(data, function(i, value) {
                    if (value.value.toLowerCase().indexOf(val) !== -1 &&
                        value.value.toLowerCase() !== val) {
                        var autocompleteOption = $('

');

                        if(!!value.image) {
                            autocompleteOption.append(''+ value.image +'');
                        } else {
                            autocompleteOption.append(''+ value.value +'');
                        }

                        $autocomplete.append(autocompleteOption);
                        highlight(val, autocompleteOption);
                    }
                });
            }
        });

        // Set input value
        $autocomplete.on('click', 'li', function () {
            $input.val($(this).text().trim());

            if($('.autocomplete-id').length == 0) {
                $input.after("<input type='hidden' class='autocomplete-id' name='autocomplete-id' value='" + $(this).attr('data-id') + "'>");
            } else {
                $('.autocomplete-id').val($(this).attr('data-id'));
            }

            $autocomplete.empty();
        });
    });
};

Here you can send ajax & get data with ajax, set delay and min input value length if you need, can set custom data for send request & cal callback function if need

When this line is executed : data = res; (in the request's success handler), the list of suggestion does not get automatically updated?

@yanickrochon oh! it's from old code:) updated

Materialize currently lacks AJAX/XHR backed autocomplete functionality, which makes it a prototype-grade library. You can’t really load all the data in the browser in the real world applications. I am sad that this will be a deal-breaker for me...

this project seems dying... can somebody else forge into another project and continue?

IMHO last two comments "lack" real criteria.
For sure there are tons of issues and potential improvements, but it doesn't mean it'd "dying".
And for sure, a back server communication "AJAX/XHR"  is not the scope of this project.

So, get it here https://github.com/dellert/autocompleteajax

Much appreciated! Thanks for creating a new repo. This will let folks send patches and make it better independently.

@ahmetb You can make it better:)

Hi, i have a developed an ajax autocomplete using the devridge plugin. Get it using https://ampersandacademy.com/tutorials/materialize-css/materialize-css-framework-ajax-autocomplete-example-using-php

Thanks @dellert to create this repo, I also believe that is a good idea make it independently.

I also added it here


Upload KartingCoins

In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:

[ ] Filename in the lowercase format
[ ] Image format: png
[ ] Image size: 256 by 256 px

@billethekid can you lowercase files names?

@billethekid please follow guidelines for adding a new token image.

I did nr iT dont work ?
Met vriendelijke groet,
Kartbaan Winterswijk

Op 6 jul. 2018 om 21:01 heeft Viktor Radchenko<EMAIL_ADDRESS>het volgende geschreven:
@billethekid please follow guidelines for adding a new token image.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

@billethekid it had too many files with a wrong naming. Please upload only one you want to use.
or send me in telegram @vikmeup so I can do it for you quicker.

I am at my business now will do it later
Met vriendelijke groet,
Kartbaan Winterswijk

Op 6 jul. 2018 om 21:09 heeft Viktor Radchenko<EMAIL_ADDRESS>het volgende geschreven:
@billethekid it had too many files with a wrong naming. Please upload only one you want to use.
or send me in telegram @vikmeup so I can do it for you quicker.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.


Added pytest-cov and addressed outdated references to pip-tools

The issue
#4996
The fix
We don't actually vendor in pip-tools and we have a laundry list of TODOs in this method _build_package_list and I think this correctly addresses them.  We end up dropping is_installable_file but based on my grepping, that method exists in requirementslib as well so I think the code still accounts for is_installable_file and we have tests that install from files, so I think its a non-issue.
The checklist

[X] Associated issue
[X] A news fragment in the news/ directory to describe this fix with the extension .bugfix, .feature, .behavior, .doc. .vendor. or .trivial (this will appear in the release changelog). Use semantic line breaks and name the file after the issue number or the PR #.

Since this one addresses problems with the lockfile, but has to drop py3.6 to do it, going to defer it until right before the pip 22.0.4 vendoring so that I can get these Pipfile/lock file improvements ahead of that PR.
Note:  it works now to just run pipenv lock from Windows, since there are windows specific requirements in the lock file.


Feature Request: Promise retry

hi,
feature request here :
this library does not possess the ability to retry a promise.
i would very much like to see that kind of functionality being added

Hi,
I'm also looking for a possibilty to retry or reuse a promise. Maybe by resetting the state?
Or is there a description anywhere how to initialize a new Promise with the function of a already rejected promise?
Greetings

You cannot reset state of a promise. I don't think any promise implementation supports this. And for a good reason.
You have to create new promise each time. Exactly like you did.


Update interaction.md

You left click to block select

Docs Build status updates of commit 3bd9a79:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

TerminalDocs/customize-settings/interaction.md
:white_check_mark:Succeeded
View

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel

Thanks @kodedylf! Merged.


Need tuple-desc-elem-implicit workaround

We need to either implement function variance or find a workaround for tuple-desc-elem-implicit, which was only typechecking before because the typechecker was actually broken. Currently it fails with this:
Lua error raised inside reducer collect_tuple file testfile.alc, line 983 character 60:
.\evaluator.lua:2980: both values are neutral, but they aren't equal: value.neutral(neutral_value.host_unwrap_stuck(neutral_value.tuple_element_access_stuck {
 subject = neutral_value.host_application_stuck {
  function = Lua function(_, ...): @.\terms-generators.lua:123,
  arg = neutral_value.host_tuple_stuck {
   leading = [],
   stuck_element = neutral_value.host_wrap_stuck(neutral_value.free(free.placeholder {
    index = 114,
    debug = placeholder_debug {
     name = "U",
     start_anchor = file testfile.alc, line 982 character 45,
    },
   })),
   trailing = [],
   --end neutral_value.host_tuple_stuck
  },
  --end neutral_value.host_application_stuck
 },
 index = 1,
 --end neutral_value.tuple_element_access_stuck
})) ~= value.neutral(neutral_value.host_unwrap_stuck(neutral_value.tuple_element_access_stuck {
 subject = neutral_value.host_application_stuck {
  function = Lua function(_, ...): @.\terms-generators.lua:123,
  arg = neutral_value.host_tuple_stuck {
   leading = [],
   stuck_element = neutral_value.host_wrap_stuck(neutral_value.free(free.metavariable(<table: 0x01d78eda0fa8> {
    usage = 43205,
    value = 43205,
    block_level = 3,
    trait = false,
   }))),
   trailing = [],
   --end neutral_value.host_tuple_stuck
  },
  --end neutral_value.host_application_stuck
 },
 index = 1,
 --end neutral_value.tuple_element_access_stuck
})) (printed diff)

This error was fixed, now we're hitting what seems like an error in substitution:
 -- Here we need to add the new arg placeholder to a map of things to substitute
-- otherwise it would be left as a free.unique in the result
mappings[unique] = typed_term.bound_variable(context_len + 1)
local val_typed = substitute_inner(val, mappings, context_len + 1)

I don't think the substitute inner unique should survive to the typechecking invocation. I suspect that indicates that the substite_inner function isn't actually finishing the substitution in that case, but I'm not sure why. I think maybe these two type expressions should actually be equal and a substitution is messing one of them up.

The stack trace:
check_concrete [./alicorn-utils.lua:30] (<table: 0x7f542a4c2e28> {
 use = value.neutral(neutral_value.tuple_element_access_stuck {
  subject = neutral_value.free(free.unique(<table: 0x7f5428ad33e0> {
   debug = "substitute_inner, val:is_closure @ @./evaluator.lua:354",
  })),
  index = 1,
 }),
 val = value.neutral(neutral_value.tuple_element_access_stuck {
  subject = neutral_value.free(free.unique(<table: 0x7f5429f17910> {
   debug = "TupleDescRelation.constrain @ @./evaluator.lua:279",
  })),
  index = 1,
 }),
 block_level = 2,
})

@AstroSnail managed to push this forward by fixing a missing tuple_desc_type_cons in #137, it now errors on two nuetral values with a deeply nested differing runtime context.

currently erroring here
https://github.com/Fundament-Software/Alicorn0/blob/fb9c2c2e53c8cc2228de3fb6f80ee26af6c9e0c3/testfile.alc#L1346


release gil in core cython/PROJ code

[x] Closes #386
[x] Fully documented, including history.rst for all changes and api/*.rst for new API

@jorisvandenbossche mind trying this out?

@snowman2 Thanks a lot for looking into this!
I think we need to do some timings to check the overhead of releasing the GIL in single threaded cases (releasing/re-acquiring the GIL many times for tiny computations can give quite some overhead).
(I can try to help with that, but that might take a few days)

Looks fine to me:
In [1]: import numpy as np
   ...: from pyproj import Transformer, transform

In [2]: transformer = Transformer.from_proj(2263, 4326)
   ...: x_coords = np.random.randint(80000, 120000)
   ...: y_coords = np.random.randint(200000, 250000)

In [3]: %timeit transform(2263, 4326, x_coords, y_coords)
63.9 ms ± 4.85 ms per loop (mean ± std. dev. of 7 runs, 10 loops each)

In [4]: %timeit transformer.transform(x_coords, y_coords)
6.18 µs ± 67.7 ns per loop (mean ± std. dev. of 7 runs, 100000 loops each)

@snowman2 I don't think those timings can tell us much (or at least we should compare them with the timing before this PR).
I did some timings on a bigger array, and also looked at how it performs when parallelizing: https://nbviewer.jupyter.org/gist/jorisvandenbossche/a97d780c04959812c40b22d6c866f4fa
So I think the conclusion from that can be that the nogil added in _Proj._fwd does more harm than good.
That said, I was wondering: is there something that those _fwd and _inv methods do differently compared to Transformer? Could they use Transformer under the hood? Because in those methods, we iterate over the coordinates and feed them one by one to proj_trans, while Transformer also handles arrays of coordinates but passes them in one go as array to proj_trans_generic, making this easier to release the GIL.

Interesting! Thanks for taking a look. I just looked at the transformer so it sounds like timing will be needed for the others for verification.

For the transformer it is fine, but for _Proj._fwd, I would remove it (can do a PR if you want). The geodesic one I didn't time.

I will think on it. I think there is probably a way to wrap the whole loop in a nogil with some better reorganization.

See my note above about that. At least conceptually, Proj._inv/fwd seems the same as transform. Does it behave differently is some corner cases?

Could they use Transformer under the hood?

The Transformer can do essentially the same thing.  Re-directing people to use it instead of Proj is my current plan as I don't know everyone's use case to fully test the transition and mostly have Proj for backwards compatibility and don't plan on adding the same functionality. Currently, only has the original functionality.

In that case, I would personally also not do the effort to refactor that for loop to be able to wrap the fool loop in nogil (as such a refactor can then also change corner cases), and simply don't bother with nogil in this function (transform is faster anyway).

Ha, I had the same thought after writing that. If you would like to remove the nogil stuff from Proj, that would be helpful. Thanks!

It was a simple enough fix for Proj, so I added it in #446


Improved CutefishOS support

Description
This pull request brings improved support for Cutefish OS/DE.

Features

Terminal font detection
Wallpaper detection
Cutefish DE version detection
CutefishOS ASCII logo

Issues
There's currently no issues I could found with the changes.

Thank you for your contribution!
This PR is merged into hyfetch since this repo (dylanaraps/neofetch) seems no longer maintained.
HyFetch is a fork of neofetch with LGBTQ pride flags, but the repo also maintains an updated version of the original neofetch, addressing many pull requests that are not merged in the original repo.
Read the "Running Updated Original Neofetch" section for more info!

Thanks! It's a little bit sad that neofetch now (kinda) discontinued.


Correctly rendering js page

Is there a way for revealing hidden js info in page, like using
exec_script(self, js): for ALL js inside?

I don't understand the question.


Port scripts to Python 3

It's the future.
The future is quite ugly in this case, because the code can't decide if a base64 encoded blob is text (to be split by lines), or bytes to be run through an external command.
This is the minimum set of changes necessary to make the script work on Python 3. It could probably be neatened up with further changes.

Thanks!


Add Antonis' presentation "Docker for Mac/Windows"

Presentation includes the basic of both platforms, plus some demos on OSXFS and some first observations.

🎆 thanks @ah3rz !


Authentication On Empty Token

Authentication may not be handling this case properly when the header for auth is passed, but no token is.

@Aeusman I think this is now resolved?

This is resolved follow creation of custom TokenAuth Class


fix: file_delete method is not implemented

Check the ServiceImp.java file. It seems that the service is always returning null:
@WebMethod public ResStatus file_delete (ReqFileDelete args) { return null; }

Just noticed :sweat_smile:

Please create a new release once this is fixed so that the proxies can finish implementing this feature


Firebase analytics not recognized.

When I attempt to use firebase analytics like this
import 'package:firebase_analytics/observer.dart';
I get a error that says the target of the URI doesn't exist. Here's the dependencies section of my pubspec.yaml
dependencies:   audioplayers: ^0.12.0   flutter:     sdk: flutter   firebase_core: ^0.4.0+6   firebase_analytics: ^3.0.3   cupertino_icons: ^0.1.2
Thanks.

Fixed this by changing my IDE settings.


Support AllowUsers, DenyUsers, AllowGroups, DenyGroups

Support for restricting logins to particular users or groups from all or particular hosts.

Thanks for your work.


Fix a out-of-date comment

Tips

Thanks very much for contributing to Apache DolphinScheduler.
Please review https://dolphinscheduler.apache.org/en-us/community/index.html before opening a pull request.

What is the purpose of the pull request
fix a comment
Brief change log
From the default of the parameter master.heartbeat.interval, it can be seen that the default heart beat interval is 10s.

Codecov Report

Merging #1620 into dev will not change coverage.
The diff coverage is n/a.

@@          Coverage Diff          @@
##             dev   #1620   +/-   ##
=====================================
  Coverage   8.11%   8.11%
=====================================
  Files        282     282
  Lines      13785   13785
  Branches    2201    2201
=====================================
  Hits        1118    1118
  Misses     12583   12583
  Partials      84      84

Impacted Files
Coverage Δ

...e/dolphinscheduler/server/master/MasterServer.java
0% <ø> (ø)
:arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update be5fc11...37d5657. Read the comment docs.

because this is a very small issue fix, I want to merge it when I reviewed


MDXEditor has no styling

Hi, first of all, thanks for much for this repo, it's amazing! I tried using MDXEditor in my React project but couldn't figure out a way to style it. This is what it looks like when imported.

I'm using

NextJS 13.4.8
React 18.2.0
tailwindcss 3.2.4
mdx-editor 0.3.0

I'm using MDXEditor inside a client component in NextJS. This is how I'm setting it up:
<div>
  <MDXEditor
    markdown={markdown}
    onChange={(markdown) => {
      setMarkdown(markdown);
    }}
  />
</div>

Oh, so exciting :). The first issue!
You need to import @mdxeditor/editor/style.css in there. This assumes that your bundling respects this package line. If not, the actual css file is here.
Please let me know how it goes, I am happy to help with your evaluation. It's a new project of mine, and I am happy to receive and act on feedback.

Added this to the getting started docs.

it worked, thanks!!

@petyosi Any suggestions for how to get styles included with a simple import rather than manually copying styles in?
Is it webpack that's unable to incorporate the exports key in your package.json?
I'm using:

webpack 5.88.2
mdx-editor 0.14.1

@braincore I'm not sure what you mean. What's the problem you have?

The toolbar had no styling before and after adding import '@mdxeditor/editor/style.css';. I assumed (but did not independently verify) that it's as you said: the bundler (webpack) does not respect the exports line in package.json.
If you don't think that's it, I'll dig in further.

Thanks for the clarification.
As far as I can tell, exports should work with your webpack version. Do you see any kind of error? Does it work if you use<EMAIL_ADDRESS>(the actual location of the file?).
If you have the whole thing reproducible somewhere, I should be able to help further and document it properly. Thank you!

Sorry for the delay.
Using<EMAIL_ADDRESS>doesn't work: ./dist/style.css is not exported from package.
I'm trying to test this with a large existing project so I don't have anything small and reproducible unfortunately. I assume it works for a fresh project.

@braincore in this case, it looks like your system does understand the exports field, but something else goes in the way. I'm not sure what goes on, but I would suggest that you poke around with the webdev tools and see where the style.css ends up. It could be many things, hard to say without being familiar with the project structure.

I am facing this same issue. The styling is missing from the mdx-editor components after running npm build in a standard create-react-app. I can confirm the browser receives the @mdxeditor/editor/style.css stylesheet after npm build, but the styles are not applied.
This is my package.json file
{
  "name": "my-app",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "@auth0/auth0-react": "^2.2.0",
    "@emotion/react": "^11.11.1",
    "@emotion/styled": "^11.11.0",
    "@fec/remark-a11y-emoji": "^3.1.0",
    "@fontsource/poppins": "^5.0.3",
    "@geoffcox/react-splitter": "^2.1.2",
    "@loadable/component": "^5.15.3",
    "@logtail/browser": "^0.4.9",
    "@mdxeditor/editor": "^0.22.5",
    "@monaco-editor/react": "^4.5.1",
    "@mui/icons-material": "^5.11.16",
    "@mui/lab": "^5.0.0-alpha.134",
    "@mui/material": "^5.13.5",
    "@mui/x-date-pickers": "^6.12.0",
    "@reduxjs/toolkit": "^1.9.5",
    "@tanstack/match-sorter-utils": "^8.8.4",
    "@tanstack/react-query": "^4.29.15",
    "@tanstack/react-table": "^8.9.2",
    "@tanstack/react-virtual": "^3.0.0-beta.54",
    "@testing-library/jest-dom": "^5.17.0",
    "@testing-library/react": "^13.4.0",
    "@testing-library/user-event": "^13.5.0",
    "ajv": "^8.12.0",
    "axios": "^1.4.0",
    "axios-cache-interceptor": "^1.2.0",
    "dayjs": "^1.11.9",
    "endent": "^2.1.0",
    "figlet": "^1.6.0",
    "flourite": "^1.2.4",
    "framer-motion": "^10.16.2",
    "highlight.js": "^11.8.0",
    "html-react-parser": "^4.0.0",
    "humanize-duration": "^3.28.0",
    "import-lazy": "^4.0.0",
    "lexical": "^0.12.2",
    "localstorage-slim": "^2.4.0",
    "match-sorter": "^6.3.1",
    "material-react-table": "^1.14.0",
    "object-hash": "^3.0.0",
    "package.json": "^2.0.1",
    "qs": "^6.11.2",
    "react": "^18.2.0",
    "react-content-loader": "^6.2.1",
    "react-dom": "^18.2.0",
    "react-error-boundary": "^4.0.11",
    "react-helmet": "^6.1.0",
    "react-icons": "^4.9.0",
    "react-markdown": "^8.0.7",
    "react-redux": "^8.1.1",
    "react-router-dom": "^6.15.0",
    "react-scripts": "^5.0.1",
    "react-spinners": "^0.13.8",
    "react-syntax-highlighter": "^15.5.0",
    "react-use-websocket": "^4.3.1",
    "redux-persist": "^6.0.0",
    "redux-persist-transform-compress": "^4.2.0",
    "rehype-katex": "^6.0.3",
    "remark-gfm": "^3.0.1",
    "remark-math": "^5.1.1",
    "sugar": "^2.0.6",
    "throttle-debounce": "^5.0.0",
    "tinyld": "^1.3.4",
    "web-vitals": "^2.1.4"
  },
  "jest-w": "jest --watch",
  "jest": {
    "transform": {
      "^.+\\.[t|j]sx?$": "babel-jest"
    }
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject"
  },
  "eslintConfig": {
    "extends": [
      "react-app",
      "react-app/jest"
    ]
  },
  "browserslist": {
    "production": [
      ">0.2%",
      "not dead",
      "not op_mini all"
    ],
    "development": [
      "last 1 chrome version",
      "last 1 firefox version",
      "last 1 safari version"
    ]
  }
}

This is my component file:
import { useEffect, useState } from "react";
import { Box, Divider, Stack } from "@mui/material";
import { truncateString } from "../../utils";
import { detect } from "tinyld/light";
import {
  BoldItalicUnderlineToggles,
  InsertCodeBlock,
  InsertImage,
  MDXEditor,
  UndoRedo,
  headingsPlugin,
  listsPlugin,
  quotePlugin,
  thematicBreakPlugin,
  toolbarPlugin,
  imagePlugin,
  codeBlockPlugin,
  codeMirrorPlugin,
  CodeToggle,
  linkPlugin,
  linkDialogPlugin,
  CreateLink,
  InsertTable,
  tablePlugin,
  ListsToggle,
  BlockTypeSelect,
  ConditionalContents,
  ChangeCodeMirrorLanguage,
  InsertThematicBreak,
  DiffSourceToggleWrapper,
  diffSourcePlugin,
} from "@mdxeditor/editor";
import<EMAIL_ADDRESS>// Seems to do nothing in production
import { COLORS } from "../../styles/Styles";

const TEXT = require("../../text.json");

const TextEditor = (props) => {
  const [value, setValue] = useState(props.initialText || "");
  const [focus, setFocus] = useState(false);
  useEffect(() => {
    // Sync local state with incoming prop
    setValue(props.initialText);
  }, [props.initialText]);

  const onChange = (editorValue) => {
    const shortenedValue = truncateString(editorValue, props.maxLength);
    setValue(shortenedValue);
    let lang = detect(value);
    if (!lang || !lang.length) {
      lang = "en";
    }
    props.handleChange(lang, shortenedValue);
  };

  useEffect(() => {
    const parentDiv = window.document.getElementById(props.uniqueId);

    if (!parentDiv) {
      console.error(`Parent element #${props.uniqueId} was not found.`);
      return;
    }

    parentDiv
      .querySelectorAll("._editorWrapper_npm11_133")
      .forEach((element) => {
        // @ts-ignore
        const css = element.style;
        css.setProperty("border-radius", "6px");
        css.setProperty("margin", `${focus ? 1 : 2}px`);
        css.setProperty("border", `${focus ? 2 : 1}px solid #4178bc`);
        //css.setProperty("border-right", `${focus ? 2 : 1}px solid #4178bc`);
        //css.setProperty("border-left", `${focus ? 2 : 1}px solid #4178bc`);
      });

    // Content container base
    parentDiv
      .querySelectorAll("._contentEditable_npm11_339")
      .forEach((element) => {
        // @ts-ignore
        const css = element.style;
        css.setProperty("min-height", `${props.minHeight || "20vh"}`);
        css.setProperty("max-height", `${props.maxHeight || "80vh"}`);
        css.setProperty("height", `${props.height || "20vh"}`);
        css.setProperty("resize", `vertical`);
        css.setProperty("overflow", `auto`);
      });

    // Content container top layer
    parentDiv
      .querySelectorAll(`._rootContentEditableWrapper_npm11_1016`)
      .forEach((element) => {
        // @ts-ignore
        const css = element.style;
        css.setProperty("border-bottom-left-radius", "6px");
        css.setProperty("border-bottom-right-radius", "6px");
        css.setProperty("background", focus ? "#fff" : COLORS.primaryGrey);
      });

    //Toolbar
    parentDiv.querySelectorAll(`._toolbarRoot_npm11_140`).forEach((element) => {
      // @ts-ignore
      const css = element.style;
      css.setProperty("border-radius", "0px");
      css.setProperty("border-top-left-radius", "6px");
      css.setProperty("border-top-right-radius", "6px");
      css.setProperty("border-bottom", `1px solid #4178bc`);
      css.setProperty(
        "background-color",
        focus ? COLORS.primaryGrey : COLORS.altMidGrey
      );
    });

    //Toolbar redo/undo buttons
    parentDiv
      .querySelectorAll("._selectWithLabel_npm11_922 ._selectTrigger_npm11_267")
      .forEach((element) => {
        // @ts-ignore
        const css = element.style;
        css.setProperty("border", `1px solid ${COLORS.primaryLightBlue}`);
        css.setProperty("cursor", "pointer");
      });

    //Toolbar other buttons
    parentDiv
      .querySelectorAll(
        `._toolbarToggleItem_npm11_181, ._toolbarButton_npm11_210, ._toolbarToggleSingleGroup_npm11_196`
      )
      .forEach((element) => {
        // @ts-ignore
        const css = element.style;
        css.setProperty("color", COLORS.primaryDarkBlue);
        css.setProperty("cursor", "pointer");
      });
  });

  useEffect(() => {
    const parentDiv = window.document.getElementById(props.uniqueId);

    if (!parentDiv) {
      console.error(`Parent element #${props.uniqueId} was not found.`);
      return;
    } // Exit if the parent div doesn't exist.

    const divElement = parentDiv.querySelector("._contentEditable_npm11_339");

    const handleFocusIn = (e) => {
      setFocus(true);
    };

    const handleFocusOut = (e) => {
      setFocus(false);
    };

    if (divElement) {
      divElement.addEventListener("focusin", handleFocusIn);
      divElement.addEventListener("focusout", handleFocusOut);
      //divElement.addEventListener("click", handleClick);
    } else {
      console.error(
        `Parent element #${props.uniqueId} > ._contentEditable_npm11_339 was not found.`
      );
      return;
    }

    // Cleanup the event listeners on component unmount
    return () => {
      if (divElement) {
        divElement.removeEventListener("focusin", handleFocusIn);
        divElement.removeEventListener("focusout", handleFocusOut);
        //divElement.removeEventListener("click", handleClick);
      }
    };
    // The effect will run once after the first render and won't run again unless
    // the component is unmounted and then remounted.
    // eslint-disable-next-line react-hooks/exhaustive-deps
  }, []);

  return (
    <Box id={props.uniqueId} sx={{ p: "1px", width: 1 }}>
      <MDXEditor
        markdown={value}
        onChange={onChange}
        placeholder={props.placeholder}
        plugins={[
          headingsPlugin(),
          listsPlugin(),
          quotePlugin(),
          thematicBreakPlugin(),
          imagePlugin(),
          linkDialogPlugin({
            linkAutocompleteSuggestions: [
              "https://"
            ],
          }),
          tablePlugin(),
          linkPlugin(),
          listsPlugin(),
          thematicBreakPlugin(),
          diffSourcePlugin({
            diffMarkdown: "An older version",
            viewMode: "rich-text",
          }),
          codeBlockPlugin({
            defaultCodeBlockLanguage: props.defaultCodeBlockLanguage || "python",
          }),
          codeMirrorPlugin({
            codeBlockLanguages: {
              cpp: "C++",
              java: "Java",
              javascript: "JavaScript",
              json: "JSON",
              python: "Python",
              sh: "Shell",
              txt: "Text",
              yml: "YAML",
              sql: "SQL",
            },
          }),
          toolbarPlugin({
            toolbarContents: () => (
              <Box sx={{ width: "100%" }}>
                <ConditionalContents
                  options={[
                    {
                      when: (editor) => editor?.editorType === "codeblock",
                      contents: () => (
                        <DiffSourceToggleWrapper>
                          <Stack
                            direction="row"
                            justifyContent="flex-start"
                            alignItems="center"
                            spacing={2}
                            useFlexGap
                            flexWrap="wrap"
                            divider={
                              <Divider orientation="vertical" flexItem />
                            }
                          >
                            <UndoRedo />
                            <ChangeCodeMirrorLanguage />
                          </Stack>
                        </DiffSourceToggleWrapper>
                      ),
                    },
                    {
                      when: (editor) => editor?.editorType === "codeblock",
                      contents: () => (
                        <DiffSourceToggleWrapper>
                          <Stack
                            direction="row"
                            justifyContent="flex-start"
                            alignItems="center"
                            spacing={2}
                            useFlexGap
                            flexWrap="wrap"
                            divider={
                              <Divider orientation="vertical" flexItem />
                            }
                          >
                            <UndoRedo />
                            <Stack
                              direction="row"
                              justifyContent="flex-start"
                              alignItems="center"
                              useFlexGap
                              flexWrap="wrap"
                              spacing={0.5}
                            >
                              <BlockTypeSelect />
                              <BoldItalicUnderlineToggles />
                            </Stack>
                          </Stack>
                        </DiffSourceToggleWrapper>
                      ),
                    },
                    {
                      fallback: () => (
                        <DiffSourceToggleWrapper>
                          <Stack
                            direction="row"
                            justifyContent="flex-start"
                            alignItems="center"
                            spacing={2}
                            useFlexGap
                            flexWrap="wrap"
                            divider={
                              <Divider orientation="vertical" flexItem />
                            }
                            sx={{ width: "100%" }}
                          >
                            <UndoRedo />
                            <Stack
                              direction="row"
                              justifyContent="flex-start"
                              alignItems="center"
                              useFlexGap
                              flexWrap="wrap"
                              spacing={0.5}
                            >
                              <BlockTypeSelect />
                              <BoldItalicUnderlineToggles />
                            </Stack>
                            <Stack
                              direction="row"
                              justifyContent="flex-start"
                              alignItems="center"
                              useFlexGap
                              flexWrap="wrap"
                              spacing={0.5}
                            >
                              <CodeToggle />
                              <InsertCodeBlock />
                            </Stack>
                            <Stack
                              direction="row"
                              justifyContent="flex-start"
                              alignItems="center"
                              useFlexGap
                              flexWrap="wrap"
                              spacing={0.5}
                            >
                              <CreateLink />
                              <ListsToggle />
                              <InsertTable />
                              <InsertImage />
                              <InsertThematicBreak />
                            </Stack>
                          </Stack>
                        </DiffSourceToggleWrapper>
                      ),
                    },
                  ]}
                />
              </Box>
            ),
          }),
        ]}
      />
    </Box>
  );
};

TextEditor.defaultProps = {
  height: "200px",
  initialText: "",
  handleChange: () => {},
  options: {},
  placeholder: TEXT.components.markdown_text_field.default_help_text,
  uniqueId: "description-editor",
  defaultCodeBlockLanguage: "python",
};

export default TextEditor;

You might say the useEffect() block with the CSS editing is the issue, but even when that's completely removed, the basic CSS is missing after the build.
When I run it via npm start it looks like this:

When I run it after building in a docker container, it looks like this:

This is the Dockerfile:
# Step 1: Build the React application
FROM node:18 AS build
ENV NODE_OPTIONS="--max-old-space-size=16384"

# Set working directory
WORKDIR /app

# Copy package.json and package-lock.json
COPY ./frontend/package*.json ./

# Install dependencies
RUN npm install

# Copy local files to container
COPY ./frontend .

# Build the React app
RUN npm run build

# Step 2: Serve the React application from Nginx
FROM nginx:alpine

# Install curl for health check
RUN apk update \
    && apk --no-cache  \
      add curl bash jq \
    && mkdir -p "/data/nginx/cache"

# Copy nginx configuration
COPY docker/webapp/node/default.conf.template /etc/nginx/templates/nginx.conf.template
COPY docker/webapp/node/nginx.conf /etc/nginx/nginx.conf
COPY docker/webapp/node/entry.sh /entry.sh

RUN chmod +x /entry.sh

# Copy the build app to the nginx container
COPY --from=build /app/build /usr/share/nginx/html

# Expose ports
EXPOSE 80

# Start Nginx
CMD ["/entry.sh"]

I found a workaround for the issue by using react-helmet to inject the mdxeditor style into the style in the page's head. I have little experience with frontend dev, and I am not proud of this solution, yet it works. I am open to any suggestions.
More specifically, below you can see at the top of my js component mentioned earlier, I added the following snippet to inject the mdxeditor into the style component of the page's head:
import {mdEditorStyle} from "./MdEditorStyle";

...

<Box id={props.uniqueId} sx={{ p: "1px", width: 1 }}>
     <Helmet>
         <style type="text/css">{mdEditorStyle}</style>
    </Helmet>
    ...

The ./MdEditorStyle file contains a string with the CSS from the @mdxeditor/editor/style.css:
export const mdEditorStyle = `
:root, .light-theme {
  --blue1: hsl(206, 100%, 99.2%);
  --blue2: hsl(210, 100%, 98.0%);
  --blue3: hsl(209, 100%, 96.5%);
...
`

I hope this helps

When I run it after building in a docker container, it looks like this:

@HWilliams64 this sounds like a build step issue. Your workaround is dangerous; the package may update its CSS contents, breaking your app in subtle ways. I may suggest that you debug what happens in the production step using your web inspector.

For anyone who finds this issue and experiences something similar: there's nothing special about the MDXEditor styling setup - it boils down to including a style file from an NPM package. The style file is declared as an export field. All modern bundlers understand that.
The mdx-editor organization includes several sample setups in Next.js (both routers), CRA, and Vite. If you have problems with the styling, compare your setup with the respective repo. If you still have troubles, isolate your problem down to a simple reproduction in a public repo and open a new issue. I should be able to help you if I can reproduce the problem on my side.
I am going to lock this issue as it turns into a catch-all problem of unrelated reports.


Routing won't work if methods field is not present in api configuration

By the docs:
https://hellofresh.gitbooks.io/janus/proxy/request_http_method.html
By default, Janus will route a request to an API regardless of its HTTP method.

Unfortunately if I remove methods array from api definition none of methods are accepted and I got a message:
{
    "message": "no API found with those values"
}

Just remove methods from example config to test it out.
Please fix this to state from documentation.
Janus version: latest docker image

@jzyinq Thanks for reporting this. We will work on this a soon as possible


[SUPPORT]  RowDataToAvroConverters does not support data in flink timestamp_ltz (timestamp_with_local_time_zone) format.

Tips before filing an issue

Have you gone through our FAQs?

Join the mailing list to engage in conversations and get faster support at<EMAIL_ADDRESS>

If you have triaged this as a bug, then file an issue directly.

Describe the problem you faced
A clear and concise description of the problem.
To Reproduce
Steps to reproduce the behavior:
1.
Expected behavior
A clear and concise description of what you expected to happen.
Environment Description

Hudi version :

Spark version :

Hive version :

Hadoop version :

Storage (HDFS/S3/GCS..) :

Running on Docker? (yes/no) :

Additional context
Add any other context about the problem here.
Stacktrace
Add the stacktrace of the error.

@hanjun996 can you share environment configs, software versions, and code snippet to help us reproduce the issue?

Environment Description
Hudi version :0.10.0
flink version :1.13.0
Steps to reproduce the behavior:
mysql timestamp type, such as: 1970-01-01T00:00:01Z, the corresponding type in flink is TIMESTAMP_WITH_LOCAL_TIME_ZONE, which is not supported by avro during conversion in hudi version 0.10.0
code：
public static final DataType ROW_DATA_TYPE = DataTypes.ROW(
    DataTypes.FIELD("id", DataTypes.STRING()),
    DataTypes.FIELD("timestamp", DataTypes.TIMESTAMP_WITH_LOCAL_TIME_ZONE()))
    .notNull();
public static final RowType ROW_TYPE = (RowType) ROW_DATA_TYPE.getLogicalType();

@Test
public void test() {
    String inferredSchema = AvroSchemaConverter.convertToSchema(ROW_TYPE).toString();
    Configuration configuration = new Configuration();
    configuration.setString(FlinkOptions.PATH, "test");
    configuration.setString(FlinkOptions.TABLE_NAME, "test");
    configuration.setString(FlinkOptions.TABLE_TYPE, "MERGE_ON_READ");
    configuration.setString(FlinkOptions.RECORD_KEY_FIELD, "id");
    configuration.setString(FlinkOptions.SOURCE_AVRO_SCHEMA, inferredSchema);

    Map<String, String> record1 = new HashMap<>();
    record1.put("id", "1");
    record1.put("timestamp", "1970-01-01T00:00:01Z");

    StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
    DataStreamSource source = env.fromElements(record1);
    Pipelines.bootstrap(configuration, ROW_TYPE, 1, source).print();
}

ERROR:
java.lang.UnsupportedOperationException: Unsupported to derive Schema for type: TIMESTAMP_LTZ(6)
at org.apache.hudi.util.AvroSchemaConverter.convertToSchema(AvroSchemaConverter.java:292)
at org.apache.hudi.util.AvroSchemaConverter.convertToSchema(AvroSchemaConverter.java:263)
at org.apache.hudi.util.AvroSchemaConverter.convertToSchema(AvroSchemaConverter.java:169)
Expected behavior:
support TIMESTAMP_WITH_LOCAL_TIME_ZONE

**hanjun996 ** commented 33秒钟前

Environment Description
Hudi version :0.10.0
flink version :1.13.0

Steps to reproduce the behavior:
mysql timestamp type, such as: 1970-01-01T00:00:01Z, the corresponding type in flink is TIMESTAMP_WITH_LOCAL_TIME_ZONE, which is not supported by avro during conversion in hudi version 0.10.0
code：
public static final DataType ROW_DATA_TYPE = DataTypes.ROW(
DataTypes.FIELD("id", DataTypes.STRING()),
DataTypes.FIELD("timestamp", DataTypes.TIMESTAMP_WITH_LOCAL_TIME_ZONE()))
.notNull();
public static final RowType ROW_TYPE = (RowType) ROW_DATA_TYPE.getLogicalType();
@Test
public void test() {
String inferredSchema = AvroSchemaConverter.convertToSchema(ROW_TYPE).toString();
Configuration configuration = new Configuration();
configuration.setString(FlinkOptions.PATH, "test");
configuration.setString(FlinkOptions.TABLE_NAME, "test");
configuration.setString(FlinkOptions.TABLE_TYPE, "MERGE_ON_READ");
configuration.setString(FlinkOptions.RECORD_KEY_FIELD, "id");
configuration.setString(FlinkOptions.SOURCE_AVRO_SCHEMA, inferredSchema);
Map<String, String> record1 = new HashMap<>();
record1.put("id", "1");
record1.put("timestamp", "1970-01-01T00:00:01Z");

StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
DataStreamSource source = env.fromElements(record1);
Pipelines.bootstrap(configuration, ROW_TYPE, 1, source).print();

}
ERROR:
java.lang.UnsupportedOperationException: Unsupported to derive Schema for type: TIMESTAMP_LTZ(6)
at org.apache.hudi.util.AvroSchemaConverter.convertToSchema(AvroSchemaConverter.java:292)
at org.apache.hudi.util.AvroSchemaConverter.convertToSchema(AvroSchemaConverter.java:263)
at org.apache.hudi.util.AvroSchemaConverter.convertToSchema(AvroSchemaConverter.java:169)
Expected behavior:
support TIMESTAMP_WITH_LOCAL_TIME_ZONE

@danny0405 @leesf : Can you folks loop in someone to assist here please.

Yeah, the timestamp_LTZ is not supported yet for flink, i have fired a JIRA to support this feature: https://issues.apache.org/jira/browse/HUDI-3388

thanks!

Yeah, the timestamp_LTZ is not supported yet for flink, i have fired a JIRA to support this feature: https://issues.apache.org/jira/browse/HUDI-3388

It's not solved by 0.14.0，why don't fix it？

Do you have intreast to contribute that part?

Do you have intreast to contribute that part?

yes， I have fixed it in my code by alter
org.apache.flink.formats.avro.typeutils.AvroSchemaConverter
org.apache.flink.formats.avro.AvroToRowDataConverters
just add a case code for this scenario，I can submit it to flink, but I just confused that is there any other people meet this issue?
I think It's a very common scenario. and It's not hard to fix it.


Mthree error mitigation Wouldnt work for Dynamic Circuits

Here in the circuit below, we are doing mid-circuit measurements & resetting the qubit for some more usage. Apply mthree breaks the code.
what you are doing with the measurement results ? we are using that for phase correction in the next iteration.

So in principle M3 works, but the automated tools for finding the final_measurements does not yet support it.  That is basically what #127 is about.
What you can do in the mean time is just pass a list of repeated qubit indices into the apply_correction method.
E.g.
For this circuit

one would then calibrate the measured qubits, here just physical qubit 1, and then use that index repeatedly in the correction:

mit = mthree.M3Mitigation(backend)
mit.cals_from_system([1])

mit.apply_correction(raw_counts, [1,1])

Closing this as it is not a bug, and making the automated tools handle these situations is the goal of #127


Replace result enum with single struct

Stack:

#1260
#1249 ⬅

⚠ Part of a stack created by spr. Do not merge manually using the UI - doing so may have unexpected results.

Please rebase

Closing pull request: commit has gone away


WIP: Proposal for plugin system with Babylon 3D physics implementation

WIP, but would like to get some early feedback:

Separated interfaces used in FRUK-Simulator/Simulator in a dedicated folder (src/engine/interface)
Created a plugins folder (src/engine/plugins) providing multiple implementations of those interfaces
One such implementation is what is already provided using three.js and planck.js (src/engine/plugins/three). Basically, I just moved existing files into this plugin directory and didn't really make any changes to those files.
A new implementation is added using Babylon.js, featuring 3D physics (src/engine/plugins/babylon)
Add demo2, showcasing the Babylon 3D physics implementation

Note that the Babylon implementation is not complete: certain objects are missing (e.g. cones and cylinders) and zones are not implemented yet.

Its a nice idea and would be a great addition, however im not sure we want to support this while were implementing the first release version


Remove third-party notice for local commands

This patch provides functionality to exclude local commands (defined as anything not in the vendor directory) from resulting in a prompt warning that a third-party command is about to be executed (when executed as part of a chain).
It does so by checking if the command class is defined in the configured Composer vendor-dir, but not within a laminas, laminas-api-tools, or mezzio subdirectory. If it is one of those subdirectories, or not defined in the vendor-dir, we consider it a local command.
Fixes #44

@michalbundyra Okay, updated the check for third-party commands such that this now looks to see if the command class is defined within the configured vendor-dir, and is not in one of the laminas, laminas-api-tools, or mezzio subdirectories.

@michalbundyra Okay, updated the check for third-party commands such that this now looks to see if the command class is defined within the configured vendor-dir, and is not in one of the laminas, laminas-api-tools, or mezzio subdirectories.

I've tested this in an app I maintain, and can confirm:

I no longer get the "third party command" notice for app-specific commands.
Chained commands continue to work correctly.
All of the above is true even when config.vendor-dir is configured to another path.

I've tested this in an app I maintain, and can confirm:

I no longer get the "third party command" notice for app-specific commands.
Chained commands continue to work correctly.
All of the above is true even when config.vendor-dir is configured to another path.


Refactor/organize the whole project, e.g. move participant and coordinator to inside frost-client. Possibly remove their old CLI interface?

We should also improve the usage of frost-client as a library, making sure the pubic API makes sense and improving error handling for the public API.

Also desirable

Refactor out the challenge/login flow out of participant (http.rs), coordinator (http.rs), and frost-client (session.rs) into a single function
Create a client object to query the API, so that it's not required to use raw reqwest everywhere (though that may be more useful as an example?)


Example for overrride/extending the field components?

How can i overrride/extending the component to use custom components?
I wanted to use compoents from carbon for example.
https://github.com/carbon-design-system/carbon-components-svelte

@cnf-blueware svelte-formly and carbon-components-svelte are two different packages for Svelte UI so you cannot merge both.


:bookmark: Fix: Update effect schema

Description
Version mismatch causing issues
Testing
Explain the quality checks that have been done on the code changes
Additional Information

[ ] I read the contributing docs (if this is your first contribution)

Your ENS/address:

Current dependencies on/for this PR:

main

PR #686   👈

This stack of pull requests is managed by Graphite.


Crash in tutorial notebook feature_contributions.ipynb

Thank you very much for developing this project further.
Recently, I took another look at your tutorial notebooks. In this and a second issue I'd like to discuss some suggestions.
I used the following versions for the underlying Python modules:

pandas: 1.1.5
scikit-learn: 1.0.2
shap: 0.40.0
py-mint: 0.2.6

In order to use the current scikit-learn version 1.1 further adaptions would be necessary. To keep up with the version changes of the underlying Python modules can be a hard job, as far as I know. Maybe, it's a good idea to print out the version numbers of the underlying Python modules in the notebooks?
This issue is about your notebook feature_contributions.ipynb which crashes in the local_contributions() function with the parameter method='shap'. I made it working again with two modifications in main/local_interpret.py:

the call of self._get_feature_contributions() in line 172 needs the additional argument shap_kwargs=shap_kwargs
the output of shap seems to have changed; in line 235 I tried to fix it by setting bias = shap_results.base_values[0]

The patch file looks like this:
--- local_interpret.py.orig	2022-07-12 21:21:48.300547909 +0200
+++ local_interpret.py	2022-07-20 21:39:22.572689921 +0200
@@ -172,6 +172,7 @@
                     cont_dict = self._get_feature_contributions(
                         estimator=estimator,
                         X=self.X.iloc[indices, :],
+                        shap_kwargs=shap_kwargs,
                     )

                     contributions_dict[estimator_name][key] = cont_dict
@@ -232,7 +233,7 @@
             shap_results = shap_results[...,1]

         contributions = shap_results.values
-        bias = shap_results.base_values
+        bias = shap_results.base_values[0]

         return contributions, bias

I didn't dig deep into the Shap package. So maybe, the right correction looks different?
Best regards,
Jörg.

I will note that py-mint has been re-branded as scikit-explain (https://github.com/monte-flora/scikit-explain). New changes to the package will be made there. Several changes have been made to improve the package. If you continue to have this use with scikit-explain, please raise the issue on that github page.  If you have any questions, feel free to ask!


Display Chatbot response message in HTML format?

Thanks for writing an excellent chatbot framework. Is it possible to display the chatbot response in HTML? I successfully followed the getting started videos, which were great, but I'm struggling to display the results from my query that I send back to the chatbot message in HTML. It's just looks like basic text, even the /n new line breaks don't even render.

You can write fully formatted HTML code in your response if you use customMessages.  As an example, this is my customMessage where I pass an HTML message and render it:
`const CustomMessage = ( props ) => {
const lastMessageIndex = props.state.messages.length - 1;
if(lastMessageIndex<0){
    return null;
}
const customContent = props.state.messages[lastMessageIndex].message;
return (

);

};`

Just to add on. You don't even need to use custom messages like this. createChatBotMessage will also allow you to pass HTML

I have this:
const botMessage = createChatBotMessage(

,
      { withAvatar: false }
    );
    addMessageToState(botMessage);

I have this:
const botMessage = createChatBotMessage(

,
      { withAvatar: false }
    );
addMessageToState(botMessage);

Thanks OliverThomas2000. I get a "SyntaxError: Unexpected token '<'" error.
const message = this.createChatBotMessage(
);     this.setChatbotMessage(message);

@jamesmonek This works for me, at least as part of initialMessages.


WEB USB not seen

Tried;
Chrome Version 107...
Cheom Version 108.0.5359.124 (Official Build) (arm64)
Macos Ventura 13
Macos Ventura 13.1
This link works normally (double checked) https://tasmota.github.io/install/

@kiralikbeyin Previously esp-launchpad would only show devices based on CP2102 usb-serial converter. In the latest version, a few more VID:PID combinations have been added. If this issue is still relevant to you, could you please try again?


Fix the live test issue with the SDK pipelines

Fix Live test issue.
We have to make sure we load the test mode environment variable from the pipeline and override the common config to run the live tests.

/azp run net - digitaltwins - tests

/azp run net - iot - tests

/azp run net - digitaltwins - tests


How to catch permission denied (properly?)

Hi there,
I am new to vue and currently using your extension. There is a possibility that the permissions of the camera get denied, and i dont see a 'easy' / implemented way to catch such an error. Is there something im missing?
If not, I do have a fix available, in the form of a @error callback if you are interested.
Thanks,

Thanks, but its unfortunately not 100% what im looking for; I need to know if the permissions were accepted at the time of the request (eh..). A simple try-catch block would do the trick. I will make a pull request, so you can see what i mean.

Thank you for your contribution. I just published version 1.1.1 with your fix.


Dependency indicator not shown anymore for non-pending tasks

Describe the bug
Dependency indicator is no longer shown for non-pending tasks.
This is a regression introduced by ec1e89d to fix #256
To Reproduce
Display reports showing depends.indicator column, i.e. active, all, list, ls, newest, oldest, ready, recurring and waiting in the default config, and compare to associated task report output.
Expected behavior
Dependency indicator should be shown when a task has a dependency on a non-pending task
Test case
generate-non-pending-deps-indicator.sh.txt

Cannot reproduce. See attached screenshots.

For the newest report, parent commit (4c1190c) showed the following:

Task 2 depend indicator is shown is your screenshot, but its dependency task 1 is pending, and this issue is about dependency on non-pending tasks, so indicators surrounded by red rectangles in my screenshot is what has disappeared with ec1e89d.
Maybe the issue title wasn't clear/precise enough, I'll update it from "Dependency indicator not shown anymore for non-pending tasks" to "Dependency indicator not shown anymore when a task has a dependency on a non-pending task"
task newest shows:

What you're showing seems like a bug in TaskWarrior. Why would you list dependencies for tasks that are non-pending? They've already been handled, IMO that's actually more confusing.

In this case, you don't really list dependencies, but rather state the fact that is has (or had if only non-pending depencencies) a dependency (hence depends.indicator).
Note it is also present in task export so the dependency is  not really removed, but merely hidden in reports like e.g. next showing the list of dependencies for a task (depends column).
While I agree that the added value of knowing that a task has a dependency even if only on one or more non-pending tasks is debatable (might be used in some scripts I guess), as a front-end / user interface to TaskWarrior, VIT should be presenting the same information, for compatibility IMHO.

as a front-end / user interface to TaskWarrior, VIT should be presenting the same information, for compatibility IMHO

This is definitely debatable. VIT is not TaskWarrior, and it is specifically not when it's related to how data is displayed.
Take the coloring for example. I took a completely different approach, because all things considered, it seemed superior. I personally think VIT can diverge from TaskWarrior in places where it leads to a better user experience.
This particular difference I'm not sure about, but I can tell you after spending too many hours chasing the goal of 'just like TaskWarrior', I gave that up for a more practical approach, one free to branch out in ways that makes sense.

Sure, by "presenting the same information", I meant the same info ("model") is displayed, not that it should presented the same way ("view"), where e.g. difference of coloring, addition of (BG) helper info, clearer duration formatting (e.g. "yearly" instead of "P365D"), etc. can lead to a better interface without diverging from the underlying "model".

I'm still not sure I agree with your argument. In TaskWarrior, the dependency is preserved in the data, and VIT doesn't do anything to change that.
depends.indicator is a report option, which dictates how the data is displayed. In fact, even in the VIT codebase, depends.indicator is implemented as a formatter. Formatters can be fully customized for different display as detailed here: https://github.com/vit-project/vit/blob/2.x/CUSTOMIZE.md#formatters
This particular case seems like a grey area, and I'm still pondering on which side it falls.

I'm not sure what the behavior should be. It might help to make progress if we had a use case for wanting to see dependencies on non-pending tasks. Why would that information be useful? This includes the case that a task is waiting, right? It is hard for me to think about a use case displaying a dependency on a completed task, but I think it makes more sense to think about dependencies on waiting tasks. I suppose that "waiting" means that a task cannot currently be completed, for whatever reason. Thus, in some sense a task that depends on a waited task is blocked.


Items list

Hello Abel, I hope you are doing well.
In this branch, I did the following

Add Meals item dynamically
Add render functionality
Update the style of meals item

If you have any questions, I am here @Lul-Abdifan :desktop_computer: Happy Coding :smile:

Hi @Lul-Abdifan ,
You did an excellent job in listing the items.
I was able to resolve the conflict. There is some linter issue though.
please fix these issues.


Added "Referenced By" and "Depends On" section for each SQL file

Problem
When one is trying to view SQL files and their immediate relationships to other SQL files in DBT docs, they have to go through a rather annoying process of clicking the lineage graph, and possibly few other clicks just to view the parent or child of the currently selected SQL file.
Solution
To make this process more convenient for the user, this PR adds a "Referenced By" and "Depends On" section in addition to the description of each SQL file, thus allowing the user to view the immediate parent and immediate child files (of any type) of the currently selected SQL file.

To accomplish this, the following changes were made to most files in src/app/docs :

Additional section components were added for "Referenced By" and "Depends On" in the HTML docs files
Added utils.js, which includes the functions to obtain the files that are "Referenced By" or "Depends On" the current SQL file. This is imported into all of the JavaScript files in the docs folder.
In macro.js, unique versions of the above two functions are written, mainly to accommodate for the fact that macro's can only have parents that are other macros (this change does not appear in src/manifest.json)

Other Information

Resolves #102
@Matt343 is also a collaborator on this PR

FWIW this is a lovely addition - well done!

hey @stephen8chang - this is AWESOME! I'll try to dig in here today, but just wanted to give you an early heads up that

I really love this and
I'm definitely interested in figuring out how to get this merged

Thanks for sending through this PR @stephen8chang (and h/t to @Matt343 as well!). I've spent some time clicking around in here today, and I do buy the utility of some new components in the UI for "referenced by" and "depends on" for sure.
I think that at a certain point, we're going to need to rethink the UI/layout of this page. I don't love the fact that our only place for information like this today is inline in the page. Ideally, I'd like to consider some alternative layouts that keep the primary information front-and-center, while still making information like this accessible when it is relevant. @amy-byrum, you think maybe we can use this PR as an opportunity to give some thought to the future of the Docs UI?
All this said, I don't think we need to block merging this PR on a redesign of the Docs site :D. @jtcohen6 adding you for review here. I'll take care of the code review piece, but it would be awesome if you could spend some time clicking around in here and noting your thoughts. I would really like to get this change shipped for 0.18.0 if we can!
Thanks again all - super exciting!

Agreed—this is really cool!
A couple of oddities I noticed:

Models include schema tests in the Referenced By section, as well they should. This is weird only because, while schema tests do populate pages in the docs site, they don't map to anything in the Project, Database, or DAG view. (example). Every other resource maps to one or more of those.
Macros do not appear as each others' dependencies. E.g. dbt_utils.date_spine calls dbt_utils.dateadd, but dbt_utils.dateadd says no resources reference it. That's true in the docs today.
The placeholder text, for both Referenced By and Depends On,  appears to be No resources reference this macro, regardless of resource type.

The only change I'd request of the current PR relates to the last point. I think the simplest solution would be to exclude the Referenced By/Depends On section if it's completely empty.

Macros do not appear as each others' dependencies. E.g. dbt_utils.date_spine calls dbt_utils.dateadd, but dbt_utils.dateadd says no resources reference it. That's true in the docs today.

The reason for this is that the relevant sections in the manifest.json file are always empty for macros. I'm not sure why that is, but depends_on.macros is always empty for a macro node, even if it does contain macro references. To fix this, we'd need to fix that bug in dbt core.

@jtcohen6 The References By/Depends On section now appears only if it exists for that specific table.

Re: inter-macro dependencies: it sounds like we're not recording those in the manifest as we should be.
Thanks for making the change around empty Depends On / Referenced By. I think we may now be missing some in cases where a model is referenced by or depends on only non-model nodes. In the deploy preview, e.g.

stg_customers should have a "Depends On" for the seed raw_customers
the schema test unique_dim_customers_customer_id depends on dim_customers, but dim_customers does not include a Referenced By section listing that test

@jtcohen6 Sorry for the late response! Looks like the issue was with the conditional for the HTML components I had for commit 39345e5. Let me know how it looks on your end.


Implement NEP8

neo-python should be ready to support NEP8 as soon as it is on Testnet/Mainnet.
Relevant changes in neo-vm here: https://github.com/neo-project/neo-vm/pull/39

what is NEP8? I see many open PR's for NEPs that are not officially numbered yet, so I'm not sure which one is going to be NEP8.

Updated issue with changes.

@ixje  debugged my smart contract and noticed the C# compiler already utilizes NEP-8. So many contracts built in C# can not be invoked in neo-python atm.

I'm going to look into this on Monday.

FWIW I don't believe NEP8 is on Mainnet CN yet.

also requires https://github.com/neo-project/neo/commit/0de8b8867326405265e3daa24128269e33d914de


Hi, could you please provide more detailed information about the environment, like how to deploy kubernetes?

Hi, could you please provide more detailed information about the environment, like how to deploy kubernetes?

Hi, thank you for your interest!
Please use our provided dockerfiles to build the required docker images.
Regarding the Kubernetes deployment, please make sure you have an available Kubernetes cluster, and then you can e.g. refer to our repo for a brief intro.


Update Client & Server Dependencies

This updates both client and server dependencies to their respective latest version.
We do not include TypeScript 4 as changes to the delete keyword are breaking the build. This needs to be resolved in a follow up.

Some of the dependency updates won’t work, eg katex
Please let me do the update when I’m back from vacations

I also played around with typescript 4 and java 15 and I think I have a good solution which could prevent „undefined“ errors better in the future


Add script to call the service so users can try that as well.

Refer to this link for build results (access rights to CI server needed):
https://fabric8-ci.fusesource.com/job/fabric8-quickstarts-master-pullreq/636/
Test PASSed.


How to load a buffer containing a pdf ?

I have a buffer loaded from server, can I open it with this code ? If yes, how to please ?
Thanks for this project, it work fine.

You can, by sending DocumentInitParameters object or just sending the data in the src param.
Examples:
const { pdf } = usePDF({
    data: pdfBytes /*pdfBytes can be UInt8Array, Buffer or string bytes"*/
})

const { pdf } = usePDF(pdfBytes /*pdfBytes can be UInt8Array or Buffer*/)

Run fine, thanks

@TaTo30
Should I use this feature to hold an empty PDF before the onMounted can decide the actual url of PDF?

I think you could do it and there are an example that could be helpful: https://tato30.github.io/VuePDF/examples/advanced/multiple_pdf.html.
But i'd rather just hide the component and show it when url has resolved.


[feature]: sign in with google, github, whatsapp support

sign in with google, github, whatsapp support

A base class is required which can be inherited to implement these functionalities.


fix: preserve more dictionaries when coercing types

Which issue does this PR close?
Closes https://github.com/apache/datafusion/issues/10220
Rationale for this change
Loosen the restriction on when type coercion will preserve dictionary types to prevent slow casting of columns with dictionary type.

What changes are included in this PR?

Are these changes tested?
There are already tests that would fail on type coercion. Let me know if there additional tests you'd like to see.

Are there any user-facing changes?
Certain coercion operations will now preserve dictionary encoding where before they would downcast to the value type

There is a test failure in sqllogictests
External error: query failed: DataFusion error: Error during planning: No function matches the given name and argument types 'coalesce(Int64, Dictionary(Int32, Int8))'. You might need to add explicit type casts.
        Candidate functions:
        coalesce(CoercibleT, .., CoercibleT)
[SQL] select coalesce(34, arrow_cast(123, 'Dictionary(Int32, Int8)'));
at test_files/scalar.slt:1794

here is the test case:
https://github.com/erratic-pattern/arrow-datafusion/blob/3a6c04ec8f989ddcf3b13a871a782c0bf56b9f8e/datafusion/sqllogictest/test_files/scalar.slt#L1795

There could be unintended consequences to this change for casting so I will look into it

Can we please add a test to https://github.com/apache/datafusion/blob/main/datafusion/sqllogictest/test_files/dictionary.slt with the explain plan showing the correct filter being added?

The test failure is from comparison_coercion being used in function argument type coercion for the coalesce function and other Signature::VariadicEqual functions.
https://github.com/apache/datafusion/blob/7fe8eeb698802776744cbba6d71abd30cc850968/datafusion/expr/src/type_coercion/functions.rs#L186-L201

There are other places comparison_coercion is used so we may want to look for additional unintended side effects of this change.
array prepend/append:
https://github.com/apache/datafusion/blob/7fe8eeb698802776744cbba6d71abd30cc850968/datafusion/expr/src/type_coercion/functions.rs#L138
list type coercions:
https://github.com/apache/datafusion/blob/7fe8eeb698802776744cbba6d71abd30cc850968/datafusion/expr/src/type_coercion/other.rs#L25-L34
CASE WHEN ... :
https://github.com/apache/datafusion/blob/7fe8eeb698802776744cbba6d71abd30cc850968/datafusion/expr/src/type_coercion/other.rs#L39-L54
IN subquery:
https://github.com/apache/datafusion/blob/7fe8eeb698802776744cbba6d71abd30cc850968/datafusion/optimizer/src/analyzer/type_coercion.rs#L151-L172
BETWEEN:
https://github.com/apache/datafusion/blob/7fe8eeb698802776744cbba6d71abd30cc850968/datafusion/optimizer/src/analyzer/type_coercion.rs#L236-L270

It looks like the failing test case is no longer throwing an error after I added @jayzhan211 's suggestion:
DataFusion CLI v37.1.0
> select coalesce(34, arrow_cast(123, 'Dictionary(Int32, Int8)'));
+----------------------------------------------------------------------------+
| coalesce(Int64(34),arrow_cast(Int64(123),Utf8("Dictionary(Int32, Int8)"))) |
+----------------------------------------------------------------------------+
| 34                                                                         |
+----------------------------------------------------------------------------+
1 row(s) fetched.
Elapsed 0.071 seconds.

I think it's now complaining that the type is no longer an integer and is instead Dictionary<Int32, Int8>
External error: query columns mismatch:
[SQL] select coalesce(34, arrow_cast(123, 'Dictionary(Int32, Int8)'));
[Expected] [I]
[Actual  ] [?]
at test_files/scalar.slt:1794

Marking as draft as I think this PR is still in progress and the CI is not yet passing

I think it's now complaining that the type is no longer an integer and is instead Dictionary<Int32, Int8>

That seems like you could just update the test. Perhaps via https://github.com/apache/datafusion/tree/main/datafusion/sqllogictest#updating-tests-completion-mode

I may try to approach a solution from a different angle here, to avoid needing to refactor the type coercion logic too much without any clear understanding of what the impacts could be.
Think a more specific optimization might look something like
ValueType(column) <binary op> CAST(<constant or expression> as ValueType)
to:
column <binary op> CAST(<constant or expression> as Dictionary<InnerType, ValueType>)

I may try to approach a solution from a different angle here, to avoid needing to refactor the type coercion logic too much without any clear understanding of what the impacts could be.

FWIW I think the coercion is the right approach here. Let me take a look at this PR and see if I can find something

Or even more generally, you could ignore whether the operands are column references or constants and just have:
ValueType(<expr> :: Dictionary<IndexType, ValueType>) <binary op> ValueType(<expr> :: <any type>)
becomes:
(<expr> :: Dictionary<IndexType, ValueType>) <binary op> CAST(<expr> as Dictionary<IndexType, ValueType>)

I may try to approach a solution from a different angle here, to avoid needing to refactor the type coercion logic too much without any clear understanding of what the impacts could be.

FWIW I think the coercion is the right approach here. Let me take a look at this PR and see if I can find something

I think it is the right approach for this one particular case, but the coalesce example in the tests is a good example of where you probably do want to convert to a simple integer type rather than converting everything to dictionaries.
Maybe we need to decouple the non-comparison type coercions from using the comparison_coercion function and have their own coercion function(s). For example VariadicEqual functions can use a new operand_coercion function which does the same thing as the previous comparison_coercion function, but with preserve_dictionaries flag set to false.

this comment also seems to hint at a possible refactor:
https://github.com/apache/datafusion/blob/f47e74d6d52000eed6f9472bc2cc43a16b8814a8/datafusion/expr/src/type_coercion/functions.rs#L190-L194
we could potentially rewrite coalesce  coercion to use maybe_data_type which allows restricting coercion to a list of output types
https://github.com/apache/datafusion/blob/f47e74d6d52000eed6f9472bc2cc43a16b8814a8/datafusion/expr/src/type_coercion/functions.rs#L262-L271

This diff shows a list of types that coalesce can accept. There might be others but this would serve as a good starting point:
https://github.com/apache/datafusion/pull/9459/files#diff-9b644c479dfb999609b40e8da6d3b2a40c7adadf88296eeefd2f803201e7ab6dL25-L43

I think it's now complaining that the type is no longer an integer and is instead Dictionary<Int32, Int8>

That seems like you could just update the test. Perhaps via https://github.com/apache/datafusion/tree/main/datafusion/sqllogictest#updating-tests-completion-mode

I updated the tests, but I'm still unsure if it's okay to ignore this change in behavior. It seems like this could be a regression in other cases where we might be converting things to dictionaries for no reason.
It would be nice to have some issue tracking this, or maybe there is one already.
A possibly easy change to make in the short-term is to refactor away from using comparison_coercion for non-comparisons and instead use coercion logic specifically tailored to those expressions.
I just feels like we're playing Jenga with type coercion logic right now. The coercion logic should prioritize avoiding expensive casts, I think.

I updated the tests, but I'm still unsure if it's okay to ignore this change in behavior. It seems like this could be a regression in other cases where we might be converting things to dictionaries for no reason.

I think the reason to convert to a dictonary is that the other side of the comparsion is already a dictionary, which thus avoids convering both arguments (though I may be missing something)
Maybe @viirya  has some thoughts given he worked on coercion as part of https://github.com/apache/datafusion/pull/9459 recently

It would be nice to have some issue tracking this, or maybe there is one already.

Perhaps https://github.com/apache/datafusion/issues/5928 ?
There appear to be a bunch of open tickets about coercion https://github.com/apache/datafusion/issues?q=is%3Aissue+is%3Aopen+coercion

A possibly easy change to make in the short-term is to refactor away from using comparison_coercion for non-comparisons and instead use coercion logic specifically tailored to those expressions.

This seems reasonable to me (aka have special rules for coerce). Other functions like BETWEEN I think can be thought of as syntactic sugar for comparisons (namely x > low AND x < high)

I just feels like we're playing Jenga with type coercion logic right now. The coercion logic should prioritize avoiding expensive casts, I think.

The key to ensuring we don't break existing code is to rely on the tests.
I agree the type coercion logic could be improved -- specifically I think it needs to have some encapsulation rather than being spread out through a bunch of free functions.
Is this something you are interested in helping out with? I think the first thing to do would be to try and explain how the current logic works (and in that process we will likely uncover ways to make it better). Then,  would improve the code the structure to encapsulate the logic (into structs / enums perhaps -- like I did recently in https://github.com/apache/datafusion/pull/10216).  Once the logic is more encapsulated, then I think we'll be able to reason about it and feel good about how it fits into the overall picture
I think the difference in casting a scalar integer to a scalar dictionary is neglible. The difference casting a column to a different type is likely subtantial (though casting string --> dictionary doesn't require any data copying)

coalesce

I'm wondering why coalesce has the signature VariadicEqual, since it takes a first non-null value, ideally, coercion is not necessary.

rebased onto main

I had a chat with @erratic-pattern  the plan:
We'll put this PR into draft mode

He is going to make a ticket + PR will improve unwrap cast comparison to handle dictionaries
I will review https://github.com/apache/datafusion/pull/10268 from @jayzhan211  and hopefully get that sorted out
Once that is complete, we'll revisit the approach in this PR and decide how to proceed.

I believe this is superceded by https://github.com/apache/datafusion/pull/10323


Updated colors for question threads in the listing

Fixes MA-2323
Separate colors applied for the post-type icon, incase of an answered/unanswered question on the threads list screen.
Here's how the screen looks now:

Before
After

@1zaman @BenjiLee @mdinino plz review

@aleffert previously we used [this link] (http://ux.edx.org/elements/colors/) for colors to use in app, which is now returning a "Page not found" error.
Alternately, there's a new link now on that page, which lists all the colors, which are slightly different from the ones we were using before.
I've updated/added some colors in this commit 99fe47a, but was wondering if we should update the colors or not ?

@miankhalid I expect we should just use the same colors as the web site. Note that we did deliberately tweak the iOS ones slightly since iOS seems to run darker than properly color corrected desktops. cc @chris-mike @andyarmstrong

What about the discussions icon? They seem out of place when the other icons are so heavily colored.

👍 I agree with @BenjiLee's point though. I suppose we should forward this to the UI team?

👍  for this PR. I can go poke the UI team.

https://openedx.atlassian.net/browse/MA-2421

I agree that the colors are a little weird at this point.  We're in the process of changing colors on discussion platform, to better signify read vs. unread states.  Mobile is a little different, so let me review the mobile color palette for discussions, which uses "grayscale cool" so is different.


Follow instructions to send email with azure cli, did not work on my mac

Followed the instructions from https://learn.microsoft.com/en-us/azure/communication-services/quickstarts/email/send-email?tabs=unix&pivots=platform-azcli&tryIt=true&source=docs#code-try-0
This is autogenerated. Please review and update as needed.
Describe the bug
Command Name
az communication email send Extension Name: communication. Version: 1.5.1.
Errors:
The command failed with an unexpected error. Here is the traceback:
No module named 'azure.communication'
Traceback (most recent call last):
  File "/opt/homebrew/Cellar/azure-cli/2.46.0/libexec/lib/python3.10/site-packages/knack/cli.py", line 233, in invoke
    cmd_result = self.invocation.execute(args)
  File "/opt/homebrew/Cellar/azure-cli/2.46.0/libexec/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 663, in execute
    raise ex
  File "/opt/homebrew/Cellar/azure-cli/2.46.0/libexec/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 726, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
  File "/opt/homebrew/Cellar/azure-cli/2.46.0/libexec/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 697, in _run_job
    result = cmd_copy(params)
  File "/opt/homebrew/Cellar/azure-cli/2.46.0/libexec/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 333, in __call__
    return self.handler(*args, **kwargs)
  File "/opt/homebrew/Cellar/azure-cli/2.46.0/libexec/lib/python3.10/site-packages/azure/cli/core/commands/command_operation.py", line 112, in handler
    client = self.client_factory(self.cli_ctx, command_args) if self.client_factory else None
  File "/Users/***/.azure/cliextensions/communication/azext_communication/manual/_client_factory.py", line 85, in cf_communication_email
    from azure.communication.email import EmailClient
ModuleNotFoundError: No module named 'azure.communication'

Azure CLI version:
az --version
azure-cli                         2.46.0

core                              2.46.0
telemetry                          1.0.8

Extensions:
communication                      1.5.1

Dependencies:
msal                              1.20.0
azure-mgmt-resource             21.1.0b1

Python location '/opt/homebrew/Cellar/azure-cli/2.46.0/libexec/bin/python'
Extensions directory '/Users/***/.azure/cliextensions'

Python (Darwin) 3.10.10 (main, Feb 16 2023, 02:49:39) [Clang 14.0.0 (clang-14<IP_ADDRESS>)]

Legal docs and information: aka.ms/AzureCliLegal

Your CLI is up-to-date.

To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

Put any pre-requisite steps here...
az communication email send --connection-string {} --sender {} --to {} --subject {} --text {}

Expected Behavior
Environment Summary
macOS-13.2.1-arm64-arm-64bit, Darwin 22.3.0
Python 3.10.10
Installer: HOMEBREW

azure-cli 2.46.0

Extensions:
communication 1.5.1

Dependencies:
msal 1.20.0
azure-mgmt-resource 21.1.0b1

Additional Context

route to CXP team

@magom001 Thanks for reaching out to us and reporting this issue. Please follow the below action plan and check if that helps:
Plan 1:
Please update your communication extension by running the below command and then test your CLI command again:

az extension update -n communication

Plan 2:
If the above plan doesn't work try running the below command and test again:

pip install azure-communication-email

Hope this helps.

@magom001 I wanted to do quick follow-up to check if you had a chance to look at my above comment. Please let us know if you had any updates on this. Awaiting your reply.

@magom001 The action is currently pending on you to try the above suggested action plan. If you need any further assistance on this issue in future, please feel free to reopen this thread. We would be happy to help.


Gerrit bot does't understand multiple commits. I'll do this the gerrit way.


Captcha verification soap call times out when there are large amount of DB entries

Closing as the new kernel which contains the fix is included in the in product-is


Use Cop::Base API for Layout department [F-M]

Follow #7868.
This PR uses Cop::Base API for almost Style department's cops.
It targets cop that names begin between F and M. And some F-M cops will be excluded from this PR target and addressed separately.

Before submitting the PR make sure the following are checked:

[x] Wrote good commit messages.
[ ] Commit message starts with [Fix #issue-number] (if the related issue exists).
[x] Feature branch is up-to-date with master (if not - rebase it).
[x] Squashed related commits together.
[ ] Added tests.
[ ] Added an entry to the Changelog if the new code introduces user-observable changes. See changelog entry format.
[x] The PR relates to only one subject with a clear title and description in grammatically correct, complete sentences.
[x] Run bundle exec rake default. It executes all tests and RuboCop for itself, and generates the documentation.

Another great PR!


missing external div className

The component creates an external div containing the "react-datepicker__wrapper" and "react-datepicker__popper"

This external div doesn't have a className, and have been trying a lot to find a workaround to set it the display:inline property without a decent result.
Is it possible to add a class to it?
Thanks!

https://github.com/Hacker0x01/react-datepicker/issues/932


Generate models and endpoints from the middleware into the UI SDK

Look into generating models and endpoints from the middleware into the UI SDK

I have looked into a few options for generating the api layer and I am leaning towards ng-openapi-gen, however it would require a complete refactor of the current SDK project, so I am enquiring into the original tool used to minimise effort.

ng-openapi-gen: An OpenAPI 3 code generator for Angular.
ng-swagger-gen: A Swagger 2.0 code generator for Angular.
swagger-angular-generator: Generate minimalistic TypeScript API layer for Angular with full type reflection of backend model.


What to do with Android submodule?

Should we remove the android submodule and have people check it out manually? Marina's further thoughts:
"Yeah I agree, we should still reference it in the main page such that users are aware of it, also add mention of the GDS repo in the main readme.
I'll look into how to make submodules optional. Maybe we can add it to the install instructions, clearly stating what the repos are for and letting the user decide according to the needs as an add-on?"

Removed from default install instructions but decided to leave the submodule.


[#171404935] Rebase on 74.14.0

What
Takes our two additional commits, and rebases them on top of the v74.14.0 tag from upstream.
How to review
Deploy the release PR. I've already deployed it down my dev env and all the tests passed as normal.
Who can review
Anyone

I'm merging this by doing
git checkout gds_master
git merge -X theirs rebase_on_74.14.0_171404935